Log of #ghostscript at irc.freenode.net.

Search:
 <<<Back 1 day (to 2019/08/29)Fwd 1 day (to 2019/08/31) >>>20190830 
jhabjan Hi, It has been a while since last time chatting here. Not sure if you remember me but I'm the author of Ghostscript.NET. 07:38.37 
kens Morning Josip07:38.59 
jhabjan Lately I see a lot of reports people complaining about Ghostscript.NET not being able to retreive total PDF page count. It looks like it's not consistent and it works with some ghostscript versions and not with others.07:39.25 
kens As I understand what I'm seeing....07:39.44 
  Ghostscript.NET is trying to use teh PDF ProcSet dictionary07:40.02 
jhabjan I've put together all ps I'm using in Ghostscript net to get all pdf information: https://pastebin.com/YCvhRaFp07:40.16 
kens We removed access to that in 9.27 because people were using it to bypass the SAFER security. OK let me look at that07:40.35 
jhabjan I use %GSNET_VIEWER_PDF_PAGES: to trap STD out07:40.36 
chrisl Yep, using GS_PDF_ProcSet07:40.58 
kens OK you can no longer use GS_PDF_ProcSet begin07:41.08 
jhabjan is there any other alternative way of getting page count?07:41.31 
kens Yes, but I'll need to go look it up07:41.39 
jhabjan no worries, no pressure, I believe you have my email address so when you grab some time you can email me if you want07:42.40 
kens Not sure about your email address, but I bet I can find it07:43.01 
chrisl You can see the changes done for one of our tools here: http://git.ghostscript.com/?p=ghostpdl.git;a=commitdiff;h=db24f253409d5d085c2760c814c3e1d3fa2dac5907:43.08 
kens Yeah I think you just want to dump the GS_PDF_ProcSet begin07:43.53 
  And pdfdict begin07:44.28 
  Just do (filename.pdf) runpdfbegin and pdfpagecount07:45.44 
jhabjan Great, I'll give that a go. 07:47.31 
kens I don't see where that code actually does anything with the pages though07:47.48 
  jhabjan: with the current code (9.28 release candidate) you'll either need to run with -dNOSAFER or take action to permit the input file to be read07:48.37 
jhabjan I parse str out and put page count in variable so it's available from .NET 07:49.15 
kens Oh OK, I was just thinking I don't see anythign that runs the pages, as long as you know what its doing :-)07:50.03 
jhabjan what exactly do you mean by 'take action to permit' ?07:51.06 
kens You really ought to do a runpdfend on the file, and if all you want is the page count, then you don't need process_trailer_attributes07:51.11 
  jhabjan, we now default to using SAFER.07:51.19 
  That blocks access to directories and files.07:51.40 
  Unless (on the command line) you specifically add those files/directories to one of 3 lists07:51.58 
  PermitFileReading, PermitFileWriting, PermitFileControl07:52.10 
  Its documented in the latest release notes and manual07:52.23 
  One the interpreter is running, you csannot change access to files and directories07:52.42 
jhabjan ah, ok, got it07:52.55 
kens I need too fetch coffee, back in 5 minutes07:54.02 
jhabjan Thank you for help and tips07:54.06 
kens NP let me know if there are still problems08:05.45 
  LOL I just earned a gold badge for 'Ghostscript' in Stack Overflow08:08.04 
jhabjan Sure, np. Congrats on gold badge.08:08.55 
kens Just amused :-)08:09.08 
ator kens: a somewhat late reward, I would think :)09:38.37 
kens Well you have to earn it....09:38.54 
  Bet I've got the only one though :-)09:39.07 
svs Hi, I have a server that has 130 printers installed and I am trying to print a test PDF to one of the printers from the command line using gswin64. When I specify the printer using the -sOutputFile flag, I get a GPL Ghostscript has stopped working error, but if I leave this flag off and print to the default printer it works. Does anyone have any id21:44.19 
  eas what might be causing it?21:44.19 
  Here is the command I am running that is throwing the error: gswin64.exe -dPrinted -sDEVICE=mswinpr2 -sOutputFile=%printer%WL2D2 testing.pdf21:45.39 
 <<<Back 1 day (to 2019/08/29)Forward 1 day (to 2019/08/31)>>> 
ghostscript.com #mupdf
Search: