To merge pdf but don't know the last report

edited March 2013 in Devices
Hello,

In your demo to merge pfd file I must set for last report de property
lPDFDevice.EndPrintJob := True;
But I have a loop with 3 kinds of reports. Sometimes I get 6 reports and for
another one I get 2 reports.
I never know when I have the last report.
When I get out of the loop then I know that the last report was executed.

Is it possible to merge then an empty report to set lPDFDevice.EndPrintJob
:= True;

regards christophe


Comments

  • edited March 2013
    Ok, I fond the solution.

    I set in the loop
    APdfDevice.Publisher := .Publisher;
    APdfDevice.StartPrintJob := False;
    APdfDevice.EndPrintJob := False; //--> can't set True because don't
    know if aReport is the last one
    .PrintToDevices;
    and after the loop
    lPDFDevice.EndPrintJob:= True;
    lPDFDevice.EndJob;



This discussion has been closed.