Log of #ghostscript at irc.freenode.net.

Search:
 <<<Back 1 day (to 2018/02/14)20180215 
kens netrate, as I said on comp.lang.postscript (and probably on Stack Overflow) and here, the developers are either in Europe or the US. I'm afraid you are trying to talk to us when there's nobody here. Don't ask to ask a question, just ask the question. Then come back and read tjhe logs for the answer.09:56.47 
netrate just wondering if anyone can help me with my question on how to install and run ghostscript. This is for non-commercial use15:33.06 
chrisl netrate: Can you restate your question please?15:33.45 
netrate ok, so my question is this. I want to install and run ghostscript on a networked computer15:34.31 
  I am not allowed to install anything to the Boot drive, but I do have a drive that I can install to...15:34.50 
kens The answer is the same as all the other times I've ststed it. Ghostscript deosn't need to be 'installed'. If you're having trouble using it, then you need to tell us what the problem actually is15:35.15 
netrate I am using python and pycharm and want to use ghostscript inside of python to convert ps to png/pdf/jpg15:35.20 
chrisl This is Windows?15:35.36 
netrate windows 715:36.01 
  ok, how do I go about using it in the manner where I can convert ps to pdf?15:36.16 
kens gswin32c (or gswin64c) -sDEVICE=pdfwrite -sOutputFile=<out.pdf>15:36.38 
  Oops forgot the input file, goes on the end15:36.50 
  Obviously you'll need to supply the path to the Ghostscript binaries15:37.10 
netrate ok where do I run the command from?15:37.12 
kens That would be the Windows COmmand Shell15:37.21 
netrate ok, so I would type cmd15:37.34 
  go into the directory that I have downloaded ghostscript15:37.50 
  and then type gswin32c (or gswin64c) -sDEVICE=pdfwrite -sOutputFile=<out.pdf> ?15:38.06 
kens The standard Windows binary is a Windows installer.15:38.08 
  You'll need to run that in order to get a Windows installation15:38.22 
  Then you can copy the contents of that folder to 'soemwhere else'15:38.32 
netrate ok I am confused, you said it didn't need to be installed? Did I understand that wrong?15:38.42 
chrisl Or just tell the installer to put it where you want15:38.50 
kens No there are two points15:38.53 
  WHat we supply as a binary for Windows is an installer, you haev to install that. But that's not Ghostscript, that's an installer15:39.44 
  Its just a way to get Ghostscript onto your maching15:39.53 
netrate ok I need to start over then because I am a bit confused now. I have downloaded the file to my personal drive. I have run the gs922w32.exe file.15:40.01 
kens Ghostscript itself doesn't actually need 'installing' you can copy it around15:40.06 
netrate it has created folders and such in that directory15:40.10 
kens Right15:40.14 
  Then you are good to go15:40.31 
netrate ok, so I don't know where to go from here. I am sorry about the confusion15:40.57 
kens Run gswin32c (or gswin64c) from that directory15:41.10 
  Actually I see you installed the 32-bit version so it'kll be gswin32c15:41.33 
netrate ok it opened up a command window15:41.44 
  and you are saying to type in the gswin32c (or gswin64c) -sDEVICE=pdfwrite -sOutputFile=<out.pdf>15:41.53 
  at this point?15:41.56 
kens That's the interactive prompt15:41.57 
  You don't want that15:42.02 
  type quit15:42.06 
netrate ok15:42.16 
  I have quit15:42.17 
kens Then type the command line I gave earlier15:42.19 
netrate I am not sure where you want me to type in this command since I just quit the command prompt15:42.41 
kens In case that's not clear :15:42.47 
  gswin32c -sDEVICE=pdfwrite -sOutptuFile=out.pdf <input.ps>15:42.47 
  Sorry that's a typo, shoudl be -sOutputFile=out.pdf15:43.26 
netrate Ken, I am really sorry, and I know that tech support isn't always easy, but I am not sure where I am supposed to type this command 15:44.08 
kens In the command shell15:44.16 
netrate do I need to be in the path of ghostscript?15:44.37 
kens Where you typed gswin32c, type :15:44.42 
  gswin32c -sDEVICE=pdfwrite -sOutptuFile=out.pdf <input.ps>15:44.42 
netrate right now I am in the C drive. 15:45.00 
kens If you haven't added this directory to your $PATH environment variable, then yes you will need to be in the directory where the Ghostscript binary is15:45.09 
netrate ok, how do I add the path directory?15:45.29 
  is this something I need to do in cmd or in python?15:45.42 
kens That's a question about Windows15:45.45 
  Lets leave that aside for now15:45.59 
netrate ok15:46.01 
kens Get Ghostscript working15:46.04 
netrate Ok I am in the ghostscript directory via the cmd prompt15:46.25 
kens So type the command I gave15:46.34 
  Remember of course that <input.ps> needs to be replaced by the full path and name of hte input PostScript file15:46.59 
Robin_Watts Urm, wait...15:47.15 
  There was a typo in kens line.15:47.21 
kens I said that earlier15:47.30 
netrate ok15:47.33 
Robin_Watts gswin32c -sDEVICE=pdfwrite -sOutputFile=out.pdf <input.ps>15:47.47 
kens Yeah I corrected myself above Robin_Watts15:47.55 
netrate I am using 64c, so I changed it to gswin64c, right?15:48.05 
Robin_Watts I can't see the correction, but OK.15:48.08 
kens If you're using the 64-bit version then yes, gswin64c15:48.22 
netrate syntax of the command is incorrect, double checking what I typed15:49.04 
kens Should be15:49.22 
  swin64c -sDEVICE=pdfwrite -sOutputFile=out.pdf <input.ps>15:49.38 
  Oh for Pete's sake I hate this keyboard....15:49.52 
  gswin64c15:49.56 
netrate Is there a way of copy/paste to the cmd prompt?15:50.52 
kens You don't want to do that15:51.03 
netrate I put the .ps file in the same directory as gs15:51.07 
kens OK15:51.14 
netrate does the ps file need to have the <> around it?15:51.16 
kens No, that's intended to show you its an argument you need to replace15:51.30 
  What is the name of the input file ?15:51.38 
netrate ok let me try again15:51.38 
  it says gswin64c is not recognized as an internal or external command15:52.09 
kens Then you are not in the directory where you installed Ghostscript15:52.29 
  list the directory contents using dir15:52.38 
netrate ok going to the bin file now15:52.40 
  ok it brought up the ghostscript window 15:54.24 
  and says press return to continue15:54.32 
kens so do that15:54.36 
netrate now at the gs prompt15:54.43 
kens right type quit15:54.47 
  and your PDF file should be in that directory15:54.54 
netrate ok it created the pdf, that works15:55.09 
kens Right15:55.14 
  So a couple more sueful switches15:55.22 
Robin_Watts It might be worth using: gswin64c -sDEVICE=pdfwrite -o out.pdf in.ps in future.15:55.29 
  That will avoid the prompts.15:55.33 
netrate ok, so I know that works. Thank you. My next issue is getting it to work inside of python15:55.42 
kens -dBATCH doesn't enter the command shell but exits traight away and -dNOPAUSE doesn't prompt between pages15:55.58 
  Can't tel lyou anything about Python15:56.12 
chrisl netrate: I'd suggest heading over and reading: https://docs.python.org/3/using/windows.html15:56.13 
  especially the bit about "Configuring Python"15:56.32 
netrate I know I need to set the paths15:56.40 
chrisl Well, you're good to go!15:57.10 
netrate no, not really. I don't know anything about configuring paths15:57.25 
  I always assumed that GS worked ,it is getting it working from inside of python15:57.44 
  the GS program does exactly what it is supposed to do. It is great for that.15:58.05 
  I will have to continue my research on how to get the paths set up. Thanks for that help15:58.24 
kens Setting the PATH environment variable:15:58.30 
  https://www.java.com/en/download/help/path.xml15:58.30 
chrisl Note that you probably need to set PYTHONPATH, rather than just PATH15:58.56 
kens Also:15:58.58 
  https://www.computerhope.com/issues/ch000549.htm15:58.58 
  And teh page Chris mentioned on configuring Python has instructions for this as well15:59.58 
netrate ok I will try. Thank you.16:00.09 
 Forward 1 day (to 2018/02/16)>>> 
ghostscript.com #mupdf
Search: