Print to File


An example workflow is for the user to print a customer receipt to a physical printer and the system will also create an archive by printing the same content to a PDF file using a PDF output printer driver.

In this example:
Print report
The printHtmlEx() API is used to print content that has been assembled at the client to the printer you select and a copy will then also be printed to a file using the "Microsoft Print to PDF" driver.
Print page
This document is printed using the Print() API and once printed, a copy is then also printed to a file using the "Microsoft Print to PDF" driver.

A moment while things get organised ....

ScriptX will not overwrite an existing file, so this file must not exist. If it does, you must delete it first.


A production system system would probably output to a file share with a unique name generated by the application server. The application server will process the file after printing by, for example, archiving the file in a central repository.


Please note that ScriptX.Services v2.11 is required and if using the javascript emulation of .Addon, v1.7.0 or later of the library is required.

Activity log  ::