Home General
New Blog Posts: Merging Reports - Part 1 and Part 2

how do I know when a document has finnished printing.

edited June 2004 in General
Hello.

I have a postscript printer that I have set a port for printing to file.

What I like to do is when the postscript file is printed I like to work a
bit with it. (merge with some other files and the convert to pdf using
ghostscript).

My problem is when I have done

ppReport.Print;
and start merging the files with ghostscript by calling
CreateProcess

It seems that the postscript file is not complete (it's empty). If I wait
for 10 sec then it's ok.

Is there any way to know when it is finnished.

I tried to set it to print to the printer diectly (not spooling) but that
did not help.

/M

Comments

  • edited June 2004
    Hi Mangus,

    I do not believe there is a way to do this directly from ReportBuilder.
    After a quick search on Google, I found that you may be able to check the
    print job status using the EnumJobs Windows API array. This array contains
    the JOB_INFO structure which will give you the print status of a certain
    job. You may be able to check this status and use it to find out if the
    print job has finished or not.

    --
    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
This discussion has been closed.