PDF Creation and Management
_Pdf_Close()
Purpose: Finalizes the PDF document, closing it for further changes.
Syntax: __Pdf_Close()
_Pdf_Create(Pdf_FileName_Full_Path, Creator_String, Author_String, Title_String, Width, Height, Pdf_Options)
Purpose: Creates a new, blank PDF document.
Parameters:
Pdf_FileName_Full_Path
:
Full path (including filename) where the PDF will be saved.
Creator_String
,
Author_String
,
Title_String
:
Metadata for the PDF.
Width
,
Height
:
Page dimensions.
Pdf_Options
:
Optional. "topdown" is the default.
_Pdf_Show(URL_Address_for_PDF_File, Width, Height)
Purpose: Displays a PDF document inline, often within an HTML page.
Parameters:
URL_Address_for_PDF_File
:
URL path to the PDF.
Width
,
Height
:
Can be specified in pixels or percentages.
Text Handling
_Pdf_Font(FontName, FontSize)
Purpose: Sets the font to be used for subsequent text output.
Parameters:
FontName
:
Name of the font (e.g., "Arial", "Times New
Roman").
FontSize
:
Size of the font in points.
_Pdf_FontDefault()
Purpose: Resets the font to the default ("Calibri", size 11).
Syntax: __Pdf_FontDefault()
_Pdf_Pos(x, y)
Purpose: Sets the current text position on the PDF page.
Parameters:
x
,
y
:
Coordinates on the page.
_Pdf_Text(Text_to_Print)
Purpose: Outputs text at the current position on the PDF page.
Parameters:
Text_to_Print
:
The text string to be written.
_Pdf_Text_Flow(Text_to_Print)
Purpose: Outputs a block of text with word wrapping and advanced formatting options (like justification).
Parameters:
Text_to_Print
:
The text string to be written.
_Pdf_Text_Flow_Options(Options)
Purpose:
Sets formatting options for _Pdf_Text_Flow
,
such as font, size, alignment, and leading (line spacing).
Parameters:
Options
:
A string containing formatting directives (e.g.,
"fontname=Helvetica fontsize=14 encoding=unicode leading=120%
alignment=justify")
_Pdf_Text_Flow_Fit_Options(Options)
Purpose:
Configures options for drawing a border around a _Pdf_Text_Flow
block.
Parameter:
Options
:
Options string (e.g., "showborder")
Other
_Pdf_Color(r, g, b, alpha)
Purpose: Sets the current drawing color.
Parameters:
r
,
g
,
b
:
Red, green, blue values (0-255)
alpha
:
Opacity (0-1)
_Pdf_Image(FullPath_Image_File, x, y, options)
Purpose: Inserts an image into the PDF document.
Parameters:
FullPath_Image_File
:
Full path to the image file.
x
,
y
:
Coordinates for image placement.
options
:
[Optional] Controls image size and fitting (e.g., "boxsize={80
50} position={center bottom} fitmethod=meet")
_Pdf_PageBreak(x, y)
Purpose: Ends the current page and starts a new one.
Parameters:
x
,
y
:
[Optional] Coordinates for the start of the new page (default 50,
50).
_Pdf_Right_Margin(Options)
Purpose: Sets the width of the right margin.
Parameter:
Options
:
Margin size (default is 30)