4D v16.3

Integration of PDFCreator driver under Windows

Home

 
4D v16.3
Integration of PDFCreator driver under Windows

Integration of PDFCreator driver under Windows  


 

 

Support for PDF printing differs depending on the version of Windows:

  • for Windows 8 and previous versions, you need to use the PDFCreator driver.
  • starting with Windows 10, a native Microsoft driver is integrated.

Note: Under Mac OS, PDF printing is supported natively by the system.

The support of PDF printing under Windows relies on the PDFCreator driver to offer simple and functional PDF printing functions. The GET PRINT OPTION and SET PRINT OPTION commands both make use of this driver. 

PDFCreator is a free driver (OpenSource) governed by the AFPL (Aladdin Free Public License). To use the PDFCreator driver, you must download the appropriate version and install it in your environment. (It is not installed by default by 4D.) You must have Administrator access rights in order to install the driver. You can download PDFCreator here: http://sourceforge.net/projects/pdfcreator/files/PDFCreator/

Warning: you must use a PDFCreator version that is compatible with 4D. To find out the compatible and certified versions of PDFCreator, please consult the certification matrices of 4D products, found on the Resources page (Compatibility section) of the 4D Web site.

During installation, a new virtual printer named "PDFCreator" by default is installed in your system. You can change this name if desired.

Windows 10 includes a native PDF driver which allows 4D to create PDFs directly without needing to use a third-party driver like PDFCreator.

The driver name is "Microsoft Print to PDF".

Here is an example of creating a PDF document under Windows 10 using 4D print commands:

 $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

 
PROPERTIES 

Product: 4D
Theme: Printing

 
HISTORY 

 
ARTICLE USAGE

4D Language Reference ( 4D v16)
4D Language Reference ( 4D v16.1)
4D Language Reference ( 4D v16.2)
4D Language Reference ( 4D v16.3)