Allows to set PDF File generation options using LAUNCHER Office PDF print driver.
Syntax
CHGVAR |
VAR(&CMD) VALUE('PDFPRINTER') |
CHGVAR |
VAR(&PARM1)
VALUE(' [;Directory="Output
file directory"] [;JPEGCompress=
True / False] |
CHGVAR |
VAR(&PARM2) VALUE(' ') |
CALL |
PGM(LNCCMD) PARM(&HANDLE &CMD &OPT &PARM1 + &PARM2 &RESULT) |
Parameters
Parameters |
|
Parm1 |
File : Path to PDF result file.
Directory: Directory path to the resulting PDF file. This path can be ommited if it is set with the file name in the File property.
Resolution :
Output resolution in DPI.
PaperSize : Page format. Possible values : 1=Letter ; 5=legal ; 9=A4 ; 8=A3 ; 256=custom.
PaperWidth : Page width in tenth of millimeter.
PaperLength : Page length in tenth of millimeter.
Orientation: Orientation. 1=Portrait; 2=Landscape.
Append: True
for add the new document at the end of PDF file if exist.
EmbedFonts: True for embark the fonts in the PDF document. False by default.
WMText : Watermark print text.
WMFont : Watermark font name (Default=Arial).
WMSize : Size in 1/100 inch (Default=70).
WMOrientation : Orientation in 1/10 degree (Default=3150).
WMColor : RGB color (Default=12632256).
WMHPos, WMVPos : Horizontal and vertical position in 1/100 inch (Default= 100, 500).
WMForeground : true = Watermark in foreground.
JPEGCompress : True to activate the compression of JPEG images.
JPEGLevel
can
have the following values :
Default : True to make LAUNCHER_PDF as default printer.
Encrypt : True to protect the output PDF document. A protected PDF file cannot be printed, saved or edited.
HyperLinks : True to transform text begining with "http:" or "www.", into hyperlinks. ScalingOption
:
If ScalingOption = 1, the content is adjusted to the size of the PDF (extended
or shrunk). Default value =0 : no adjustment. |
|
Note
PDFPRINTER command initialises the LAUNCHER_PDF driver.
The print command that follows the PDFPRINTER command call must indicate that the destination printer is "LAUNCHER_PDF".
If
WMText is indicated, a watermark will be added on each page.
WMColor is set as red, Green, Blue, levels as shown bellow :
((Blue * 256) + Green) * 256) + Red.
Example 1
This
example generates a PDF File from a Word file.
"DUPLICATE" will be watermark printed on each page.
PGM
LNCOPEN
LNCCMD CMD(WORDOPEN)
LNCCMD CMD(WOPENFILE) PARM1('C:\PROGRAM FILES\LAUNCHER400\+
SAMPLES\LNCSHELL.DOC') PARM2(VISIBLE)
LNCCMD CMD(PDFPRINTER) +
PARM1('FILE="C:\TEMP\LNCSHELL.PDF";wmtext+
="DUPLICATA"')
LNCCMD CMD(WPRINT) PARM1('PRINTER="LAUNCHER_PDF"')
LNCCMD CMD(WORDCLOSE)
LNCSHELL CMD('C:\TEMP\LNCSHELL.PDF') WAITCMD(*NO) +
VISIBLE(*YES) MINCURWIN(*YES) +
ACTION(OPEN) EXESRV(*CURRENT)
ENDPGM
Example 2
Create PDF from Excel file:
PGM
LNCOPEN
LNCCMD CMD(EXCELOPEN) PARM1('')
LNCCMD CMD(XLOPENFILE) +
PARM1('C:\MAGALIE\MIGRATIONAVEC.XLS')
LNCCMD CMD(PDFPRINTER) +
PARM1('FILE="C:\TEMP\MIGRATIONAVEC.PDF"')
LNCCMD CMD(XLPRINT) PARM1('PRINTER="LAUNCHER_PDF"')
LNCCMD CMD(EXCELCLOSE)
LNCSHELL CMD('C:\TEMP\MIGRATIONAVEC.PDF') +
WAITCMD(*NO) VISIBLE(*YES) +
MINCURWIN(*YES) ACTION(OPEN) EXESRV(*CURRENT)
ENDPGM