IM is not checking if a PDF was read successfully by Ghostscript. When I annotate or identify a PDF via JMagick, everything seems fine. However, when I view my log file, it shows output from Ghostscript indicating that it exited with a fatal error.
Thanks,
LaTonya
No status check in PDF coder
Re: No status check in PDF coder -- More Details
The PDF that I was annotating had 37 pages. I am annotating the PDF through code instead of the command line. Anyway, when Ghostscript read the PDF, it only read the two pages and exited on the third page because of a fatal error. Ghostscript copied the content of the two pages into my output file. When the controls returned to ImageMagick's ReadPDFImage method, it read the output file and returned to success to the calling method in my program. Then, my program annotated the PDF without any problems. When I viewed the content of the annotated PDF, I only saw the two pages not the full document. Also, Ghostscript printed an error message in my log file. When I viewed the ReadPDFImage method, it does not check the status from the InvokePostscriptDelegate method. I think ReadPDFImage should not read any file that generated an error from Ghostscript.
This scenario does not happen with other PDFs that I have.
This scenario does not happen with other PDFs that I have.