How can I know total number of pages in a postscript file?
The following may sound like a nit, but it’s not. A PostScript file does not “contain” pages. The output on a PostScript printer, naturally, is divided into physical pieces of paper which we call pages. The reason this is not a nit is that what notifies PostScript that a page is complete and can be sent to the printer is the PostScript showpage operator. It is possible for a PostScript file to contain one occurrence of the showpage operator for each page that is to be printed. In such a file, all you need to do is count the number of occurrences of the showpage operator, and you’re set. But it is also possible for a file which produces multiple pages to contain only one occurrence of showpage. This can happen if the showpage occurs within a loop (since PostScript is a real programming language), or within a function call. I imagine that a person will not likely want to actually dive in and read a PostScript file to figure this out. All he probably wants is a quick and dirty way to coun
Related Questions
- Ghostscript icon I am trying to print a PostScript file using the GhostScript application but the pages do not come out and my job fails. Why?
- When I view my Postscript file using Ghostview everything seems fine but when I print it the pages are in reversed order, how do I fix this?
- I am trying to print a PostScript file using the GhostScript application but the pages do not come out and my job fails. Why?