Log of #ghostscript at irc.freenode.net.

Search:
 <<<Back 1 day (to 2022/06/03)Fwd 1 day (to 2022/06/05) >>>20220604 
artifexirc-bot <unixbsd> hi09:16.56 
  <unixbsd> with GS on linux09:16.58 
  <unixbsd> how to know how much Pages has a given PDF ?09:17.08 
  <unixbsd> gs .... file.pdf ? to retun 60 pages09:17.16 
  <KenSharp> Depends which version you are using09:17.24 
  <KenSharp> For versions prior to 9.56.1 use the pdf_info.ps file in ghostpdl/lib09:17.58 
  <unixbsd> the one of debian retropie09:18.10 
  <unixbsd> gs --help09:18.23 
  <unixbsd> GPL Ghostscript 9.26 (2018-11-2009:18.24 
  <KenSharp> That means nothing to me, we don't package for Linux09:18.27 
  <KenSharp> Right that's old, you should upgrade anyway09:18.35 
  <KenSharp> But in tny event use the PostScript program in ghostpdl/lib.pdf_info.ps09:18.51 
  <unixbsd> gs vers https://termbin.com/cwc3o09:18.51 
  <unixbsd> does GS 9.26 have a feature to display how much pages09:20.56 
  <unixbsd> ?09:20.57 
  <KenSharp> Not directly, you need to use the PostScript progam which is supplied as part of Ghostscript.09:21.26 
  <KenSharp> In ghostpdl/lib look for pdf_info.ps One of the pieces of information supplied by that program is the number of pages in a PDF file09:22.09 
  <unixbsd> ok, pdf2ps is used. pdf ==> ps ... done . what next?09:22.37 
  <KenSharp> No, I didn't say anything about pdf2ps09:22.51 
  <KenSharp> Start with the PDF file, use Ghostscript and the pdf_info.ps program. That program will tell you how many pages are in a PDF file09:23.20 
  <unixbsd> gs -dNOPAUSE -sDEVICE=pdfwrite -sOUTPUTFILE=combine.pdf -dBATCH file.pdf <--- that was my workaround09:24.57 
  <KenSharp> I'm sorry I really don't understand you. Your question was 'How to find the number of pages in a PDF file'. The answer to your questions is 'Use teh pdf_info.ps program'. If you have a different question please ask that.09:25.54 
  <unixbsd> you mean by : ghostscript file.pdf and type pdf_info.ps ?09:34.04 
  <unixbsd> Error: /undefined in pdf_info.ps09:34.55 
  <KenSharp> No.09:39.42 
  <KenSharp> If you open the file pdf_info.ps then it has usage information in it. If you try to run the file (as one would normally do with Ghostscript) Eg:09:40.27 
  <KenSharp> gs /ghostpdl/lib/pdf_info.ps09:40.28 
  <KenSharp> Then it will display a usage message09:40.29 
  <KenSharp> % usage: gs -dNODISPLAY -q -sFile=____.pdf [-dDumpMediaSizes=false] [-dDumpFontsNeeded=false] [-dDumpXML]09:41.05 
  <KenSharp> % [-dDumpFontsUsed [-dShowEmbeddedFonts] ] lib/pdf_info.ps09:41.05 
  <KenSharp> The '%' characters are PostScript comments, obviously you do not include those09:41.26 
  <KenSharp> So for your prurpose, something like:09:41.54 
  <KenSharp> gs -dNODISPLAY -sFile=file.pdf /ghostpdl/lib/pdf_info.ps09:42.24 
  <KenSharp> The file pdf_info.ps is a PostScript program, not a Ghostscript command line switch, you need to execute the program with teh interpreter09:42.51 
 <<<Back 1 day (to 2022/06/03)Forward 1 day (to 2022/06/05)>>> 
ghostscript.com #mupdf
Search: