iText 8.0.5 API
|
This class is used for adding content directly onto a specified iText.Kernel.Pdf.Canvas.PdfCanvas. More...
Public Member Functions |
|
Canvas (PdfPage page, Rectangle rootArea) | |
Creates a new Canvas to manipulate a specific page content stream. More... |
|
Canvas (PdfCanvas pdfCanvas, Rectangle rootArea) | |
Creates a new Canvas to manipulate a specific content stream, which might be for example a page or iText.Kernel.Pdf.Xobject.PdfFormXObject stream. More... |
|
Canvas (PdfCanvas pdfCanvas, Rectangle rootArea, bool immediateFlush) | |
Creates a new Canvas to manipulate a specific document and page. More... |
|
Canvas (PdfFormXObject formXObject, PdfDocument pdfDocument) | |
Creates a new Canvas to manipulate a specific iText.Kernel.Pdf.Xobject.PdfFormXObject. More... |
|
virtual PdfDocument | GetPdfDocument () |
Gets the iText.Kernel.Pdf.PdfDocument for this canvas. More... |
|
virtual Rectangle | GetRootArea () |
Gets the root area rectangle. More... |
|
virtual PdfCanvas | GetPdfCanvas () |
Gets the iText.Kernel.Pdf.Canvas.PdfCanvas. More... |
|
virtual void | SetRenderer (CanvasRenderer canvasRenderer) |
Sets the iText.Layout.Renderer.IRenderer for this Canvas. More... |
|
virtual PdfPage | GetPage () |
The page on which this canvas will be rendered. More... |
|
virtual void | EnableAutoTagging (PdfPage page) |
Enables canvas content autotagging. More... |
|
virtual bool | IsAutoTaggingEnabled () |
|
|
virtual bool | IsCanvasOfPage () |
Defines if the canvas is exactly the direct content of the page. More... |
|
virtual void | Relayout () |
Performs an entire recalculation of the element flow on the canvas, taking into account all its current child elements. More... |
|
virtual void | Flush () |
Forces all registered renderers (including child element renderers) to flush their contents to the content stream. More... |
|
override void | Close () |
Closes the Canvas. More... |
|
Public Member Functions inherited from iText.Layout.RootElement< iText.Layout.Canvas > | |
virtual T | Add (IBlockElement element) |
Adds an element to the root. More... |
|
virtual T | Add (Image image) |
Adds an image to the root. More... |
|
virtual FontProvider | GetFontProvider () |
Gets iText.Layout.Font.FontProvider if presents. More... |
|
virtual void | SetFontProvider (FontProvider fontProvider) |
Sets iText.Layout.Font.FontProvider. More... |
|
override bool | HasProperty (int property) |
Checks if this entity has the specified property. More... |
|
override bool | HasOwnProperty (int property) |
Checks if this entity has the specified property, i.e. if it was set to this very element earlier More... |
|
override T1 | GetProperty< T1 > (int property) |
Gets the property from this entity. More... |
|
override T1 | GetOwnProperty< T1 > (int property) |
Gets own property from this entity. More... |
|
override T1 | GetDefaultProperty< T1 > (int property) |
Gets the default property from this entity. More... |
|
override void | DeleteOwnProperty (int property) |
Deletes the own property of this entity. More... |
|
override void | SetProperty (int property, Object value) |
Sets a property for this entity. More... |
|
virtual RootRenderer | GetRenderer () |
Gets the rootRenderer attribute, a specialized iText.Layout.Renderer.IRenderer that acts as the root object that other renderers descend from. More... |
|
virtual T | ShowTextAligned (String text, float x, float y, TextAlignment? textAlign) |
Convenience method to write a text aligned about the specified point More... |
|
virtual T | ShowTextAligned (String text, float x, float y, TextAlignment? textAlign, float angle) |
Convenience method to write a text aligned about the specified point More... |
|
virtual T | ShowTextAligned (String text, float x, float y, TextAlignment? textAlign, VerticalAlignment? vertAlign, float angle) |
Convenience method to write a text aligned about the specified point More... |
|
virtual T | ShowTextAligned (Paragraph p, float x, float y, TextAlignment? textAlign) |
Convenience method to write a text aligned about the specified point More... |
|
virtual T | ShowTextAligned (Paragraph p, float x, float y, TextAlignment? textAlign, VerticalAlignment? vertAlign) |
Convenience method to write a text aligned about the specified point More... |
|
virtual T | ShowTextAligned (Paragraph p, float x, float y, int pageNumber, TextAlignment? textAlign, VerticalAlignment? vertAlign, float radAngle) |
Convenience method to write a text aligned about the specified point More... |
|
virtual T | ShowTextAlignedKerned (String text, float x, float y, TextAlignment? textAlign, VerticalAlignment? vertAlign, float radAngle) |
Convenience method to write a kerned text aligned about the specified point More... |
|
Package Functions |
|
override RootRenderer | EnsureRootRendererNotNull () |
Package Functions inherited from iText.Layout.RootElement< iText.Layout.Canvas > | |
virtual void | CreateAndAddRendererSubTree (IElement element) |
Package Attributes |
|
PdfCanvas | pdfCanvas |
Rectangle | rootArea |
PdfPage | page |
Is initialized and used only when Canvas element autotagging is enabled, see EnableAutoTagging(iText.Kernel.Pdf.PdfPage). More... |
|
Package Attributes inherited from iText.Layout.RootElement< iText.Layout.Canvas > | |
bool | immediateFlush |
PdfDocument | pdfDocument |
IList< IElement > | childElements |
PdfFont | defaultFont |
FontProvider | defaultFontProvider |
ISplitCharacters | defaultSplitCharacters |
RootRenderer | rootRenderer |
This class is used for adding content directly onto a specified iText.Kernel.Pdf.Canvas.PdfCanvas.
This class is used for adding content directly onto a specified iText.Kernel.Pdf.Canvas.PdfCanvas. Canvas does not know the concept of a page, so it can't reflow to a 'next' Canvas. This class effectively acts as a bridge between the high-level layout API and the low-level kernel API.
Creates a new Canvas to manipulate a specific page content stream.
Creates a new Canvas to manipulate a specific page content stream. The given page shall not be flushed: drawing on flushed pages is impossible because their content is already written to the output stream. Use this constructor to be able to add iText.Layout.Element.Link elements on it (using any other constructor would result in inability to add PDF annotations, based on which, for example, links work).
If the iText.Kernel.Pdf.PdfDocument.IsTagged() is true, using this constructor would automatically enable the tagging for the content. Regarding tagging the effect is the same as using EnableAutoTagging(iText.Kernel.Pdf.PdfPage).
page | the page on which this canvas will be rendered, shall not be flushed (see iText.Kernel.Pdf.PdfObjectWrapper |
rootArea | the maximum area that the Canvas may write upon |
Creates a new Canvas to manipulate a specific content stream, which might be for example a page or iText.Kernel.Pdf.Xobject.PdfFormXObject stream.
pdfCanvas | the low-level content stream writer |
rootArea | the maximum area that the Canvas may write upon |
|
inline |
Creates a new Canvas to manipulate a specific iText.Kernel.Pdf.Xobject.PdfFormXObject.
formXObject | the form |
pdfDocument | the document that the resulting content stream will be written to |
|
inlinevirtual |
Closes the Canvas.
Closes the Canvas . Although not completely necessary in all cases, it is still recommended to call this method when you are done working with Canvas object, as due to some properties set there might be some 'hanging' elements, which are waiting other elements to be added and processed. Close() tells the Canvas that no more elements will be added and it is time to finish processing all the elements.
Implements iText.Layout.RootElement< iText.Layout.Canvas >.
|
inlinevirtual |
Enables canvas content autotagging.
Enables canvas content autotagging. By default it is disabled.
page | the page, on which this canvas will be rendered. |
|
inlinevirtual |
Forces all registered renderers (including child element renderers) to flush their contents to the content stream.
|
inlinevirtual |
The page on which this canvas will be rendered.
|
inlinevirtual |
Gets the iText.Kernel.Pdf.Canvas.PdfCanvas.
|
inlinevirtual |
Gets the iText.Kernel.Pdf.PdfDocument for this canvas.
|
inlinevirtual |
Gets the root area rectangle.
|
inlinevirtual |
Defines if the canvas is exactly the direct content of the page.
Defines if the canvas is exactly the direct content of the page. This is known definitely only if this instance was created by Canvas(iText.Kernel.Pdf.PdfPage, iText.Kernel.Geom.Rectangle) constructor overload, otherwise this method returns false.
|
inlinevirtual |
Performs an entire recalculation of the element flow on the canvas, taking into account all its current child elements.
Performs an entire recalculation of the element flow on the canvas, taking into account all its current child elements. May become very resource-intensive for large documents. Do not use when you have set RootElementtrue
.
|
inlinevirtual |
Sets the iText.Layout.Renderer.IRenderer for this Canvas.
canvasRenderer | a renderer specific for canvas operations |
|
package |
Is initialized and used only when Canvas element autotagging is enabled, see EnableAutoTagging(iText.Kernel.Pdf.PdfPage).
Is initialized and used only when Canvas element autotagging is enabled, see EnableAutoTagging(iText.Kernel.Pdf.PdfPage). It is also used to determine if autotagging is enabled.