Printing from Presence

From PresenceWiki
Revision as of 15:49, 26 February 2010 by Mattpryor (Talk | contribs)

(diff) ←Older revision | view current revision (diff) | Newer revision→ (diff)
Jump to: navigation, search

At present we support the automated printing of PDF documents from within a Presence Task. This is achieved using a custom function called "pdfprintviaXPdfPrint". Here are some instructions on how to install and configure our PDF print function. We hope you find them useful. If not, please let us know.

Please note that these instructions relate to Windows systems. At present we do not provide similar functionality for other platforms.

Downloading the required files

First, download "pdf_print.zip". Unzip it using Winzip, or some other zippy program, and you should find the following files:

  • PDFPrint.pfa - This is the actual Presence function.
  • PDFPrint.exe" - This is the executable file which the function will call.
  • readme.txt - Contains instructions on how to use this function
  • t1fonts folder - This contains the fonts required by the executable
  • XpdfPrint.dll - This is the dynamic link library required by the above exe.

Installing the files

Once you have extracted these files, you will need to perform the following simple steps:

1. Import "PDFPrint.pfa" into Presence. To do this, click the "Functions" icon. You should be presented with the functions dialog, as shown below. Right click on the list of functions to the left and select "Import" from the pop-up window. Browse to the location of "PDFPrint.pfa", select it and click "Okay". You should hopefully see a confirmation dialog to indicate that the function important was successful.

2. Move "PDFPrint.exe" into a directory named "pdfprint" on your C: drive.

3. Move "t1fonts" folder and "XpdfPrint.dll" into the C:\windows\system32 directory

4. Open a command prompt and enter the following command to register the service with Windows:

Function Parameters

At this stage you should be able to successfully call the function, using the following parameters:

  1. PDF File location (can be a local path or a UNC)
  2. Printer UNC - the network path location (e.g. "\\printserver\My Printer")
  3. Tray (Bin) - either id or name (leave blank to use default)
  4. Paper - either id or name (leave blank to use default)
  5. Number of copies
  6. Page - From (1 is the first page)
  7. Page - To (-1 represents the last page)
  8. Throw Errors? True or false - if true, errors will be thrown back to the Task. Otherwise they will be dealt with silently and the Task will continue.
  9. Duplex printing 'True' or 'False' (optional, default is false)
  10. Short Edge Binding 'True' or 'False' (optional, default is false) applies with duplex printing
  11. Timeout - specify how long Presence should wait before giving up, in milliseconds.