Allows to create a PDF from a text file.
Syntax
|
CHGVAR |
VAR(&CMD) VALUE('PDFFRTXT') |
|
CHGVAR |
VAR(&PARM1)
VALUE(' [;FontSize=Font size] [;LineSpacing=Line
height] [;RightMargin=Right margin] [;TopMargin=Top margin] [;BottomMargin=Bottom margin] [;Orientation=0|1|2] [;PageSize="The page size to use"] [;StandardFont="Name of the standard font"] [;TrueTypeFont="Name
of TrueType font"] |
|
CHGVAR |
VAR(&PARM2) VALUE(' ') |
|
CALL |
PGM(LNCCMD) PARM(&HANDLE &CMD &OPT &PARM1 + &PARM2 &RESULT) |
Parameters
|
Parameters |
|
|
Parm1 |
Text: Full path of the text file to be converted to PDF.
Dest: Full path to the PDF file to be created.
FontSize: Font size used in the PDF. If this parameter is not specified, then the font size will be 10.
LineSpacing: Line
height factor.
LeftMargin: Left margin of the PDF. Specify in PDF points (1 point = 1/72 inch). If this parameter is not specified, the margin will be 40 PDF points.
RightMargin: Right margin of the PDF. Specify in PDF points (1 point = 1/72 inch). If this parameter is not specified, the margin will be 40 PDF points.
TopMargin: Top margin of the PDF. Specify in PDF points (1 point = 1/72 inch). If this parameter is not specified, the margin will be 40 PDF points.
BottomMargin: Bottom margin of the PDF. Specify in PDF points (1 point = 1/72 inch). If this parameter is not specified, the margin will be 40 PDF points.
Orientation: PDF
orientation. This setting can take the following values:
PageSize: PDF page size. This setting can take the following values: LETTER (default), LEGAL, A0, A1, A2, A3, A4, A5, A6. StandardFont: Font
to use for the PDF. Either this parameter or the TrueTypeFont parameter is
specified, but not both. This parameter can take the following values:: TrueTypeFont: If the
Windows PC/Server does not have the specified standard font, the PDF reader
will use a different font for the PDF.
|
Example
PGM
LNCOPEN
LNCCMD CMD(PDFFRTXT) +
PARM1('Text="C:\A\TEST.txt";Dest=+
"C:\A\\res2.pdf";StandardFont="Cou+
rier";FontSize=16;PageSize="A4"')
LNCCMD CMD(PDFFRTXT) +
PARM1('Text="C:\A\TEST.txt";Dest=+
"C:\A\res3.pdf";TrueTypeFont="C:\+
Windows\Fonts\Candara.ttf";FontSize=16')
LNCCLOSE
ENDPGM