Log of #ghostscript at irc.freenode.net.

Search:
 <<<Back 1 day (to 2017/09/11)20170912 
halabund I wrote a small piece of software that partly relies on Ghostscript. Today I got a support request that it’s not working, and Ghostscript seems to be showing the following errors on that user’s computer:12:41.51 
  stdout:12:42.00 
  GPL Ghostscript 9.21 (2017-03-16)12:42.01 
  Copyright (C) 2017 Artifex Software, Inc. All rights reserved.12:42.02 
  This software comes with NO WARRANTY: see the file PUBLIC for \12:42.03 
  details.12:42.04 
  **** Unable to open the initial device, quitting.12:42.05 
  stderr:12:42.06 
  GPL Ghostscript 9.21: **** Could not open temporary file ''12:42.19 
kens I'm guessing they are using pdfwrite ?12:42.31 
halabund Does this ring a bell for anyone? Do you have any idea what may be causing it?12:42.34 
  This is the command line:12:42.41 
  "D:\Program Files\gs\gs9.21\bin\gswin64c.exe" -o mt-gs.pdf -dNoOutputFonts -sDEVICE=pdfwrite mt.pdf12:42.50 
kens Yes, pdfwrite as I suspected12:42.58 
halabund This command is run within a subdirectory of the user’s temp directory.12:43.03 
  I cannot reproduce it myself, and my package has plenty of users who don’t have any problems. It must be a rare occurrence.12:43.27 
kens Well I'm guessing tehy are running it as a service or somethign similar, maybe from Python or Apache or whatever. I'd further guess that the 'user' they are runnign as does not have permission to write to the temp directory12:43.49 
halabund Thanks for the tips kens ! I’ll ask him to check for permission issues12:44.13 
kens Hence why the error says 'Could not open temporary file'12:44.14 
  These come up a lot with people trying to run GS from web front ends12:44.30 
halabund It actually says “temporary file ‘’”, i.e. an empty file name ''12:44.36 
kens You might like to remind him of the licence at the same time, AGPL covers software as a service12:44.54 
  Hmm.12:44.58 
  I suspect that's just a formatting error12:45.12 
  But I'll have a look12:45.16 
halabund This time it is actually being run as a sub-process of Mathematica on a personal computer, not server. And Mathematica can write to the temp directory, according to the test scripts I asked him to run.12:45.23 
kens Yeah but maybe the sub process doesn't have those permissions.12:46.04 
  I don't recall offhand how CreateProcess inherits12:46.32 
  Assuming they are using that. THinking about it if htey are using Mathematica they are probably using fork()12:46.50 
  You should rpobably confirm the OS, make sure its a real Windows port and not being called from Msys or something12:47.22 
halabund According to my debug log, he has it installed in D:\Program Files\gs\gs9.21\bin\gswin64c.exe That sounds like the official distribution12:48.15 
kens FWIW that error is returned from gp_open_scratch_file_generic() and hsould have a filename12:48.23 
  Yes, but it doens't tell you what he's running it from12:48.41 
  MSYS can launch Windows executables12:48.48 
  He could be using Windows 10 bash12:49.04 
  I don't knwo much about that12:49.09 
  In any event the filename shold not be empty12:49.17 
  There are really too many places where this could occur12:49.58 
halabund It’s run directly from Mathematica. I don’t know how Mathematica starts sub-processes, but it works fine on my own Windows machine wit the same Ghostscript and Mathematica versions. Something must be specific to his machine.12:50.02 
  He said it started happening after installing this Inkscape extension:12:50.24 
  https://pav.iki.fi/software/textext/12:50.33 
kens And it weas working before ? Then he broke it, not our problem :-)12:50.44 
halabund It wasn’t 100% clear to me that it was really related to that though12:50.47 
kens There's only one call to gp_open_scratch_file in pdfwrite fortunatley12:51.11 
  Umm, but that is called form a number of places :-(12:51.52 
halabund Thanks for the help!12:52.50 
  Don’t spend more time on this12:52.53 
kens I cna't see any real way to get there with an empty filename, sorry12:53.07 
halabund I just asked in case it’s a common or obvious problem, but it seems it isn’t.12:53.45 
kens Nope, the only times I'vwe seen that kind of problem its been permissions problems12:54.03 
  This seems different12:54.13 
  halabund I just checked and all cases where pdfwrite opend a temporary file, we prefix the filename with _temp_ so I can't see how the filename could be empty12:57.54 
halabund And that ‘’ really denotes and empty file name, right?12:58.15 
  â€œCould not open temporary file ‘’”12:58.31 
kens The error message uses %s to pritn 'fname' which is the filename12:58.58 
halabund Maybe after the installation of some other software, Ghostscript picks up some bad DLLs and malfunctions.12:58.58 
kens I was going to suggest that meybe they have ended up with another version of Ghostscript installed12:59.18 
  Its hard to see how, but installing an extension could conceivably do it12:59.35 
acukan hi guys i am having a problem with pdftk burst output some times it writes 0k pdf file14:14.48 
  like this14:14.51 
  -rw-r--r-- 1 www-data www-data 0 Sep 12 15:42 multipage_adv_belge_234328_page_10.pdf14:14.57 
kens And ts is related to Ghostscript how ?14:15.10 
acukan do you have any idea why it can do like this14:15.12 
kens pdftk is nothign to do with us, as far as I know14:15.23 
acukan i assumed pdftk uses ghostscript14:15.24 
kens Not to the best of my knowledge14:15.36 
acukan oh shit man14:15.37 
  i remembered it that way sorry guys for your time :(14:15.53 
kens NP14:15.57 
acukan long work hours :(14:16.01 
bencc is it ok to use gs or mupdf in a commercial project on a server if all I do is execute the command line tool?14:50.04 
  no modification14:50.08 
  no linking14:50.11 
kens Depends14:50.20 
bencc on what?14:50.26 
kens If you are offering software as a service14:50.28 
bencc yes14:50.34 
kens Then you need to read te AGPL, I'm afraid there are on lwayers here, we cannot give you a legal opinion14:51.03 
  Software as a service is a gray area for me, so I can't advise you14:51.27 
bencc not that gray :)14:52.15 
  I would like to use mupdf to convert pdf to svg14:52.26 
kens It is to me, but I'm not a lawyer14:52.26 
bencc as a command line tool14:52.30 
kens Well this is the Ghostscript channel, for Mupdf you want the MuPDF channel #mupdf14:52.43 
  Broadly though, if you are returning the SVG files to the submitter of the PDF, then I think that would be covered and you'd have to open source your whole chain of tools, or seek a commercial licence14:54.00 
bencc ok15:02.56 
  thanks15:02.58 
kens YW15:03.05 
 Forward 1 day (to 2017/09/13)>>> 
ghostscript.com #mupdf
Search: