KNOWLEDGE BASE
Log In    |    Knowledge Base    |    4D Home
Tech Tip: Export Write Pro document to PDF
PRODUCT: 4D Write Pro | VERSION: 18 R | PLATFORM: Mac & Win
Published On: January 11, 2021

Newly available in v18 R4 is the ability to export your 4D Write Pro document directly to PDF format, without needing to install any print drivers or additional software. To do this programmatically, use the WP EXPORT DOCUMENT command with the new pdf constant in the 'format' parameter, like below:

WP EXPORT DOCUMENT(myArea;$filePath;wk pdf)

OR

WP EXPORT DOCUMENT(myArea;$filePath;5)


If you are using Write Pro with a widget, you can simply go to the import/export tab and select PDF:



OR



This feature also allows you set options such as image size optimization and max picture DPI for more control over the result.