简体   繁体   中英

How to count pages in a Postscript

I'm developing a C# Console Application and have to count the pages of a PostScript file. Is there an easyer way to count the pages other then parsing the text in the file.

Thanks!

If the file contains an arbitrary PostScript program, the only way is to execute the file, perhaps after redefining the showpage operator to count the number of pages.

If the file follows the DSC conventions, then you can count %%Page comments or perhaps directly use %%Pages if present.

See also http://en.wikibooks.org/wiki/PostScript_FAQ#How_to_count_pages_in_a_PS_file.3F .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM