TDocDefinition CLASS

<< Click to Display Table of Contents >>

Navigation:  EasyPDFMaker documentation > Getting started > Step by Step > Working with PDF file > Classes and methods >

TDocDefinition CLASS

Previous pageReturn to chapter overviewNext page

Sets page size and orientatin

pSize - One of predefined page sizes like 'A4' (see PDF::PageSizes)

pOrientation - portrait or landscape

PageSettings                   PROCEDURE(<STRING pSize>, <STRING pOrientation>)

 

Defines static page header text

pText - Header text

pStyle - Header style

PageHeader                     PROCEDURE(STRING pText, <STRING pStyle>)

 

Defines static page footer text

pText - Footer text

pStyle - Footer style

PageFooter                     PROCEDURE(STRING pText, <STRING pStyle>)

 

Defines background-layer

pObject - text, image, table, ...

pValue - text or image to be added on every page

pStyle - node style

Background                     PROCEDURE(STRING pObject, STRING pValue, <STRING pStyle>)

 

Adds document metadata

pName - Property name (like title, author...)

pValue - Property value

AddDocInfo                     PROCEDURE(STRING pName, STRING pValue)

 

Adds style to style dictionary

pName - Style property name (like color, fontSize...)

pValue - Style property value

AddStyle                       PROCEDURE(STRING pName, STRING pValue)

 

Defines default style to the document

pValue - key-value pairs

AddDefaultStyle                 PROCEDURE(STRING pValue)

 

Adds an image file to images dictionary

pImageName - Image name

pImageFile - Image file

AddDctImage                     PROCEDURE(STRING pImageName, STRING pImageFile)

 

Adds a BLOB to images dictionary

pImageName - Image name

pImageBlob - Image BLOB

AddDctImage                     PROCEDURE(STRING pImageName, *BLOB pImageBlob)

 

Adds a data to images dictionary

pImageName - Image name

base64ImageData - Image data (base64 encoded)

pFormat - Image pFormat: PNG or JPG

AddDctImageBase64               PROCEDURE(STRING pImageName, STRING base64ImageData, STRING pFormat)

 

Adds a property of a document

pName - Property name (like watermark, pageSize...)

pValue - Property value

AddGlobalProperty               PROCEDURE(STRING pName, STRING pValue)

 

Adds a property of a document's content

pName - Property name

pValue - Property value

AddContentProperty             PROCEDURE(STRING pName, STRING pValue)

 

 

Begins document's content

BeginContent                   PROCEDURE()

 

Ends document's content

EndContent                     PROCEDURE()

 

Begins Table of contents

BeginTOC                       PROCEDURE(<STRING pStyle>)

 

Ends Table of contents

EndTOC                         PROCEDURE(<STRING pStyle>)

 

Begins a paragraph

BeginParagraph                 PROCEDURE(<STRING pStyle>)

 

Ends a paragraph

EndParagraph                   PROCEDURE(<STRING pStyle>)

 

Begins a stack of objects

BeginStack                     PROCEDURE(<STRING pStyle>)

 

Ends a stack of objects

EndStack                       PROCEDURE(<STRING pStyle>)

 

Begins an ordered list

BeginOrderedList               PROCEDURE(<STRING pStyle>)

 

Ends an ordered list

EndOrderedList                 PROCEDURE(<STRING pStyle>)

 

Begins an unordered list

BeginUnorderedList             PROCEDURE(<STRING pStyle>)

 

Ends an unordered list

EndUnorderedList               PROCEDURE(<STRING pStyle>)

 

Begins columns

BeginColumns                   PROCEDURE(<STRING pStyle>)

 

Ends columns

EndColumns                     PROCEDURE(<STRING pStyle>)

 

Begins nested columns

BeginNestedColumns             PROCEDURE(<STRING pStyle>)

 

Ends nested columns

EndNestedColumns               PROCEDURE(<STRING pStyle>)

 

Begins a table

BeginTable                     PROCEDURE(<STRING pStyle>)

 

Ends a table

EndTable                       PROCEDURE(<STRING pStyle>) !- pass here table layout: '"layout": "noBorders"'

 

Begins a table's row

BeginRow                       PROCEDURE()

 

Ends a table's row

EndRow                         PROCEDURE()

 

Adds a text to document contents

pText - Text

pStyle - Style

AddText                         PROCEDURE(STRING pText, <STRING pStyle>)

 

Adds an image to document contents

pImageName - Image name from images dictionary, or image file name

pStyle - Style

AddImage                       PROCEDURE(STRING pImageName, <STRING pStyle>)

 

Adds an image to document contents

pImageBlob - Image BLOB

pStyle - Style

AddImage                       PROCEDURE(*BLOB pImageBlob, STRING pStyle) !- JPEG and PNG formats are supported.

 

Adds an image to document contents

base64ImageData - Image data

pFormat - Image pFormat: PNG or JPG

pStyle - Style

AddImageBase64                 PROCEDURE(STRING base64ImageData, STRING pFormat, STRING pStyle) !- JPEG and PNG formats are supported.

 

Adds QR code to document contents

pText - Text to encode

pStyle - Style

AddQR                           PROCEDURE(STRING pText, <STRING pStyle>)

 

Returns JSON representation of this document definition object

ToJSON                         PROCEDURE(), STRING