pythonpdfprintingreportlabjdf

How do I create a dynamic job ticket for Xerox printers?


I am programmatically creating PDF files in Python and Reportlab Toolkit, each containing several thousand documents, each document with a variable amount of pages.

My problem is that I need to instruct the printer which media type each page should be printed on (pre-printed letterhead for the first page of a document for example). It seems that I need to generate some kind of job ticket which hold this kind of information.

I've had some success with creating JDF job tickets, but these only run on my organisation's newest printers which run Xerox Freeflow Server version 8.

Ideally, I need a solution which also works with our Freeflow server version 7 and Xerox DocuSP printers. I have tried unsuccessfully to send JDF tickets to these printers.

Is there another type of ticketing system I could use, or a way to get all of our printers recognising JDF files?


Solution

  • I received this response from "RogerK-Xerox" on the Xerox support forum.

    Xerox uses an XML based ticketing system called Xerox Printing Instruction Format (XPIF). You can get an idea of how this format works by opening your Xerox custom print driver, programming some printing attributes, and then exporting the Xerox Job Ticket. This is accomplished by selecting the Advanced tab on the print driver, selecting the '+' next the Xerox Job Ticket and choosing 'Export Xerox Job Ticket...' and then pressing the 'Export...' button.

    In order to get full access the the XPIF programming guide I believe that you have to register on http://www.xerox-solutions.net/Partners

    I tried the above, and it did produce an XML file with job ticket instructions, which could presumably be re-loaded in the print driver. Now I'm looking for a way to use these files with printer hot folders, which is more in line with our current work-flow. The printer would need to know somehow which XPIF ticket belonged with which PDF file.

    It seems that the XPIF file can be added to the beginning of a PDF file by simply concatenating the two files. The file can then be dragged into a hotfolder and the Xerox printer knows how to separate a job ticket from PDF.

    I have tested this method, and it works as expected :-). Appending some arbitrary XML data to the beginning of a PDF file renders it un-openable in Adobe Acrobat. Surprisingly though, such files open just fine in Evince Document Viewer.