Ghostscript: PDF total pages

后端 未结 2 1247
余生分开走
余生分开走 2020-12-14 18:21

I\'m using Ghostscript library API (wrapping from C#) to print PDF documents from my application.
With the \'-dFirstPage\' and \'-dLastPage\' parameter

2条回答
  •  不知归路
    2020-12-14 18:41

    I tried to make this script:

    gswin32c ^
      -q ^
      -c "(input.pdf) (r) file runpdfbegin pdfpagecount =" ^
      -f input.pdf
    

    work in a c# wrapped solution and kept getting error "/undefinedfilename". In this case ensure that your filepath has Slashes "/" as DirectorySeperator and not Backslashes "\". I know Kurt Pfeifle already wrote it, but it happened to me i just overlooked it.

提交回复
热议问题