Tech Tip: PDF creation on Windows 10 (without PDF Creator)
PRODUCT: 4D | VERSION: 15 | PLATFORM: Win
Published On: September 23, 2015
Windows 10 includes a PDF printer driver, allowing 4D to directly create PDFs without the need of a 3rd party software, such as PDF Creator.
The name of the driver is "Microsoft Print to PDF".
Here is an example on how to create a PDF document through the print command 4D.
$pdfpath:=System folder(Desktop)+"test.pdf" $pdfprintername:="Microsoft Print to PDF" ARRAY TEXT($name1;0) PRINTERS LIST($name1) If(Find in array($name1;$pdfprintername)>0) SET CURRENT PRINTER($pdfprintername) SET PRINT OPTION(Destination option;2;$pdfpath) ALL RECORDS([Table_1]) PRINT SELECTION([Table_1];*) SET CURRENT PRINTER(“”) End if |