|
iText 9.7.0 API
|
Document is the default root element when creating a self-sufficient PDF. More...
Public Member Functions |
|
| Document (PdfDocument pdfDoc) | |
| Creates a document from a iText.Kernel.Pdf.PdfDocument. More... |
|
| Document (PdfDocument pdfDoc, PageSize pageSize) | |
| Creates a document from a iText.Kernel.Pdf.PdfDocument with a manually set iText.Kernel.Geom.PageSize. More... |
|
| Document (PdfDocument pdfDoc, PageSize pageSize, bool immediateFlush) | |
| Creates a document from a iText.Kernel.Pdf.PdfDocument with a manually set iText.Kernel.Geom.PageSize. More... |
|
| override void | Close () |
| Closes the document and associated PdfDocument. More... |
|
| virtual iText.Layout.Document | Add (AreaBreak areaBreak) |
| Terminates the current element, usually a page. More... |
|
| virtual iText.Layout.Document | Add (SectionBreak sectionBreak) |
| Terminates the current page if it's not the first one in the document. More... |
|
| override iText.Layout.Document | Add (IBlockElement element) |
| virtual PdfDocument | GetPdfDocument () |
| Gets PDF document. More... |
|
| virtual void | SetRenderer (DocumentRenderer documentRenderer) |
| Changes the iText.Layout.Renderer.DocumentRenderer at runtime. More... |
|
| virtual void | Flush () |
| Forces all registered renderers (including child element renderers) to flush their contents to the content stream. More... |
|
| virtual void | Relayout () |
| Performs an entire recalculation of the document flow, taking into account all its current child elements. More... |
|
| virtual float | GetLeftMargin () |
| Gets the left margin, measured in points More... |
|
| virtual void | SetLeftMargin (float leftMargin) |
| Sets the left margin, measured in points More... |
|
| virtual float | GetRightMargin () |
| Gets the right margin, measured in points More... |
|
| virtual void | SetRightMargin (float rightMargin) |
| Sets the right margin, measured in points More... |
|
| virtual float | GetTopMargin () |
| Gets the top margin, measured in points More... |
|
| virtual void | SetTopMargin (float topMargin) |
| Sets the top margin, measured in points More... |
|
| virtual float | GetBottomMargin () |
| Gets the bottom margin, measured in points More... |
|
| virtual void | SetBottomMargin (float bottomMargin) |
| Sets the bottom margin, measured in points More... |
|
| virtual void | SetMargins (float topMargin, float rightMargin, float bottomMargin, float leftMargin) |
| Convenience method to set all margins with one method. More... |
|
| virtual PageMarginBoxes | GetPageMargins (int pageNumber) |
| Gets page margins by specified page number. More... |
|
| virtual iText.Layout.Document | SetPageMargins (int pageNumber, PageMarginBoxes margins) |
| Sets page margins for page with provided number. More... |
|
| virtual iText.Layout.Document | SetPageMargins (Predicate< int > condition, PageMarginBoxes margins) |
| Sets page margins for page based on provided condition for page number. More... |
|
| virtual iText.Layout.Document | SetPageMargins (Func< int, PageMarginBoxes > function) |
| Sets page margins for page based on provided function for page number. More... |
|
| virtual bool | IsPageMarginsSpecified (int pageNumber) |
| Checks whether page margins have been specified for the given page number. More... |
|
| virtual FootnotesProperties | GetFootnotesProperties () |
| Gets iText.Layout.Properties.Margins.FootnotesProperties specified for the document to customize footnotes. More... |
|
| virtual void | SetFootnotesProperties (FootnotesProperties footnotesProperties) |
| Sets iText.Layout.Properties.Margins.FootnotesProperties for the document. More... |
|
| virtual Rectangle | GetPageEffectiveArea (PageSize pageSize) |
| Returns the area that will actually be used to write on the page, given the current margins. More... |
|
| override T1 | GetDefaultProperty< T1 > (int property) |
Public Member Functions inherited from iText.Layout.RootElement< iText.Layout.Document > |
|
| RootElement () | |
| Creates a new RootElement |
|
| 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 () |
| virtual void | CheckClosingStatus () |
| Checks whether a method is invoked at the closed document More... |
|
Package Functions inherited from iText.Layout.RootElement< iText.Layout.Document > |
|
| virtual void | CreateAndAddRendererSubTree (IElement element) |
| void | EnsureRootTagIsCreated () |
| Ensures that the root tag is created in the tagging structure. More... |
|
Additional Inherited Members |
|
Package Attributes inherited from iText.Layout.RootElement< iText.Layout.Document > |
|
| bool | immediateFlush |
| PdfDocument | pdfDocument |
| IList< IElement > | childElements |
| PdfFont | defaultFont |
| FontProvider | defaultFontProvider |
| ISplitCharacters | defaultSplitCharacters |
| RootRenderer | rootRenderer |
Document is the default root element when creating a self-sufficient PDF.
Document is the default root element when creating a self-sufficient PDF. It mainly operates high-level operations e.g. setting page size and rotation, adding elements, and writing text at specific coordinates. It has no knowledge of the actual PDF concepts and syntax.
A Document 's rendering behavior can be modified by extending iText.Layout.Renderer.DocumentRenderer and setting an instance of this newly created with SetRenderer(iText.Layout.Renderer.DocumentRenderer).
|
inline |
Creates a document from a iText.Kernel.Pdf.PdfDocument.
Creates a document from a iText.Kernel.Pdf.PdfDocument . Initializes the first page with the iText.Kernel.Pdf.PdfDocument 's current default iText.Kernel.Geom.PageSize.
| pdfDoc | the in-memory representation of the PDF document |
|
inline |
Creates a document from a iText.Kernel.Pdf.PdfDocument with a manually set iText.Kernel.Geom.PageSize.
| pdfDoc | the in-memory representation of the PDF document |
| pageSize | the page size |
|
inline |
Creates a document from a iText.Kernel.Pdf.PdfDocument with a manually set iText.Kernel.Geom.PageSize.
| pdfDoc | the in-memory representation of the PDF document |
| pageSize | the page size |
| immediateFlush | if true, write pages and page-related instructions to the iText.Kernel.Pdf.PdfDocument as soon as possible. |
|
inlinevirtual |
Terminates the current element, usually a page.
Terminates the current element, usually a page. Sets the next element to be the size specified in the argument.
| areaBreak | an iText.Layout.Element.AreaBreak , optionally with a specified size |
|
inlinevirtual |
Terminates the current page if it's not the first one in the document.
Terminates the current page if it's not the first one in the document. Sets the page size and/or page margins specified in the arguments for the next page.
| sectionBreak |
iText.Layout.Element.SectionBreak , optionally with a specified page size and/or page margins
|
inlinepackagevirtual |
Checks whether a method is invoked at the closed document
|
inlinevirtual |
Closes the document and associated PdfDocument.
Implements iText.Layout.RootElement< iText.Layout.Document >.
|
inlinevirtual |
Forces all registered renderers (including child element renderers) to flush their contents to the content stream.
|
inlinevirtual |
Gets the bottom margin, measured in points
float containing the bottom margin value
|
inlinevirtual |
Gets iText.Layout.Properties.Margins.FootnotesProperties specified for the document to customize footnotes.
iText.Layout.Properties.Margins.FootnotesProperties specified for the document
|
inlinevirtual |
Gets the left margin, measured in points
float containing the left margin value
Returns the area that will actually be used to write on the page, given the current margins.
Returns the area that will actually be used to write on the page, given the current margins. Does not have any side effects on the document.
| pageSize | the size of the page to |
|
inlinevirtual |
Gets page margins by specified page number.
| pageNumber | number of the page to get margins for |
iText.Layout.Properties.Margins.PageMarginBoxes page margins
|
inlinevirtual |
Gets PDF document.
|
inlinevirtual |
Gets the right margin, measured in points
float containing the right margin value
|
inlinevirtual |
Gets the top margin, measured in points
float containing the top margin value
|
inlinevirtual |
Checks whether page margins have been specified for the given page number.
Checks whether page margins have been specified for the given page number.
This method returns true if the margins for the page are determined by any of the following mechanisms (in order of precedence):
NOTE: the method returns true even if the value produced by the mechanisms is null. Only when none of the above apply and the default static margins are used, this method returns false.
| pageNumber | the page number to check |
true if margins for the page are defined explicitly by page number, by matching rule or by function, false otherwise
|
inlinevirtual |
Performs an entire recalculation of the document flow, taking into account all its current child elements.
Performs an entire recalculation of the document flow, 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 bottom margin, measured in points
| bottomMargin | a float containing the new bottom margin value |
|
inlinevirtual |
Sets iText.Layout.Properties.Margins.FootnotesProperties for the document.
| footnotesProperties |
iText.Layout.Properties.Margins.FootnotesProperties to customize footnotes
|
inlinevirtual |
Sets the left margin, measured in points
| leftMargin | a float containing the new left margin value |
|
inlinevirtual |
Convenience method to set all margins with one method.
| topMargin | the upper margin |
| rightMargin | the right margin |
| leftMargin | the left margin |
| bottomMargin | the lower margin |
|
inlinevirtual |
Sets page margins for page based on provided function for page number.
| function | function with page number as argument, return null in case result should be ignored and iText.Layout.Properties.Margins.PageMarginBoxes page margins return value |
|
inlinevirtual |
Sets page margins for page with provided number.
| pageNumber | number of the page to set margins for |
| margins |
iText.Layout.Properties.Margins.PageMarginBoxes page margins to set
|
inlinevirtual |
Sets page margins for page based on provided condition for page number.
| condition | matching rule with page number as argument |
| margins |
iText.Layout.Properties.Margins.PageMarginBoxes page margins to set
|
inlinevirtual |
Changes the iText.Layout.Renderer.DocumentRenderer at runtime.
Changes the iText.Layout.Renderer.DocumentRenderer at runtime. Use this to customize the Document's iText.Layout.Renderer.IRenderer behavior.
| documentRenderer | the DocumentRenderer to set |
|
inlinevirtual |
Sets the right margin, measured in points
| rightMargin | a float containing the new right margin value |
|
inlinevirtual |
Sets the top margin, measured in points
| topMargin | a float containing the new top margin value |