Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
Showing results for Show only | Search instead for Did you mean:/t5/acrobat-sdk-discussions/pdf-generation-using-postscript-and-distiller-just-stops-how-do-i-debug/td-p/8712943 Dec 06, 2016 Dec 06, 2016
Copy link to clipboard
I know very little about PostScript and Adobe Distiller so please bear with me and if I'm in the wrong place, suggest where I need to be.
At a very high level, I have inherited and am supporting an application that generates PostScript files and then asks Distiller to generate PDFs from these.
In most cases (for many years), both PDFs generate successfully. We have now encountered a case where PDF #1 generates successfully but PDF #2 does not. When the application asks Distiller to print PDF #2, Distiller starts to do so but stops prematurely. The application thinks the PDF generation was successful because it received no error/exception, there is no error/exception in the LOG file generated by Distiller, yet PDF #2 only contains the first N pages.
If anyone can tell me what we're doing wrong or at least tell me how I can better troubleshoot this, any and all help is greatly appreciated.
Some more detail about the data and what I've already tried/learned so far.
The pages in the book can contain text or full page graphics. The standard page size for the book is 8x11. The page size for full page graphics include 11x17 and 11x24 (i.e., foldouts). We thought this may be the first case where the book contains graphics requiring 11x24 page size and that the root case had something to do with this.
Distiller is run with the -F parameter.
PostScript for "chapter" files - Our code does not actually generate this PostScript. Our code executes in a 3rd party environment that takes care of this. Sending these files to Distiller individually results in a PDF with the correct number of pages, the correct content, the correct page sizes, and correct content/page orientation (i.e., graphics were properly rotated on 11x17 and 11x24 pages).
PDF #1 PostScript Sample:
PDF #2 PostScript Sample:
/ch1 (path/to/chapter1.ps) def
/ch2 (path/to/chapter2.ps) def
. (pattern repeats w/ different start/end page numbers
The start/end page counters for the PDF #2 PostScript seemed odd to me but in general the formula in use works. I wondered if something would be different for 11x24 pages but when we print the "chapter" PostScript file, the 11x24 page is considered one page (per the log file).
What I tried with the PDF #2 PostScript.
Alternative PDF #2 PostScript Sample:
/currentpage exch def
> dup 0 1 dict put def
/ch1 (path/to/chapter1.ps) def
/ch1pgs [1 3 6 10] def
/ch2 (path/to/chapter2.ps) def
/ch2pgs [15 21] def
ch1pgs ch1 processch
ch2pgs ch2 processch
Acrobat SDK and JavaScript Community guidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
4 Replies 4 Adobe Employee ,/t5/acrobat-sdk-discussions/pdf-generation-using-postscript-and-distiller-just-stops-how-do-i-debug/m-p/8712944#M36637 Dec 06, 2016 Dec 06, 2016
Copy link to clipboard
You don’t mention what version of Distiller – but support for referencing external files from Postscript was removed (by default) from the product back in Acrobat 9 (currently, a no longer supported version). However, reading further, I see that you are running Distiller with –F, which overrides that restriction, so you have addressed that.
Honestly – you are doing something that is hasn’t been a good idea for close to a decade now. I suggest that you work on rewriting this application to use a more modern approach to PDF generation. (aka direct to PDF, rather than via Postscript).
Community guidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
/t5/acrobat-sdk-discussions/pdf-generation-using-postscript-and-distiller-just-stops-how-do-i-debug/m-p/8712945#M36638 Dec 06, 2016 Dec 06, 2016
Copy link to clipboard
Thanks. Unfortunately, rewriting it to the extent you suggest is not a viable option at this time due to the time it would take to do so.
Community guidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Community Expert ,/t5/acrobat-sdk-discussions/pdf-generation-using-postscript-and-distiller-just-stops-how-do-i-debug/m-p/8712946#M36639 Dec 06, 2016 Dec 06, 2016
Copy link to clipboard
Debugging PostScript is hard and frustrating, and I am trying to not do it too often in order to keep the hair I still have
I would not go as far lrosenth - Distiller is still a product shipped and supported by Adobe, so it should work, and any workflow that worked in the past should still work with the current version of Distiller. PostScript to PDF is still a method that is used by a lot of automated workflows. Yes, it would be much easier for a lot of people if we could move to a direct to PDF model, but as long as there is a way to convert from PostScript to PDF, and you are OK with it's limitations, you should be able to use it.
The problem with PostScript is that it's a programming language, and just because we know what the symptoms are, does not mean that we can actually determine the cause without analyzing the data that is processed by Distiller. This means all the PostScript files, Distiller job options and anything else that is involved in the process.
The way I would approach something like this is to strip down the problem to a case that does not do much more than to trigger the problem. This may mean isolating pages to see if the problem is caused by page content (it could for example be some image data that is referenced in one of the PS files - even though that should trigger an error message). If that does not work, I would use a non-Adobe PS/PDF converter to see if I can get error messages about conditions that Distiller does not report.
If you don't feel comfortable doing this work yourself, you may want to hire somebody who can do this type of work for you. Look for somebody who has a solid background of doing this type of work. If you want to get an idea about what would be involved, feel free to get in touch with me via email - my contact information is on my profile page.