How To…Send Each Page as a PDF


“Is it possible to create a new PDF file for each page in the report?”


This can be done by manually taking control of the StartJob/EndJob routines of the TppDevice.  Start by creating a generic TppDevice object, assigning its OnPageReceive event and calling PrintToDevices.  Next implement the OnPageReceive event to create a PDF Device, start a new job, send the page, and end the job.  This will fire for each page of the report effectively creating a new PDF file for each page.


Sample Delphi code: