Nconvert with portable Ghostscript?

Discussions on NConvert - the command line tool for image conversion and manipulation

Moderators: XnTriq, helmut, xnview

Post Reply
Wizard
Posts: 1
Joined: Sun Jan 24, 2016 6:10 pm

Nconvert with portable Ghostscript?

Post by Wizard »

Hi!
I would like to use nconvert to convert pdf to png using portable Ghostscript from http://portableapps.com/apps/utilities/ ... t_portable
I put nconvert.exe inside "bin" folder of portable Ghostscript which contains gsdll32.dll, gsdll64.dll, gswin32.exe, gswin32c.exe, gswin64.exe and gswin64c.exe
I run "nconvert -out png a.pdf" and I get:
my_error_exit...<Not a JPEG file: starts with 0x25 0x50>
Error: Don't know how to read this picture (a.pdf)
So, nconvert doesn't recognise portable Ghostscript.
Is there anything I can do to fix this like some variable or temporary registry key to set or is portable Ghostscript too specific for portableapps.com apps?
User avatar
xnview
Author of XnView
Posts: 43598
Joined: Mon Oct 13, 2003 7:31 am
Location: France
Contact:

Re: Nconvert with portable Ghostscript?

Post by xnview »

you need to set XNVIEW_GS_DLL variable
Pierre.
chris38
Posts: 10
Joined: Mon Feb 17, 2014 1:12 pm

Re: Nconvert with portable Ghostscript?

Post by chris38 »

What is XNVIEW_GS_DLL variable ?
environnment variable ? (doesn't work)
User avatar
XnTriq
Moderator & Librarian
Posts: 6339
Joined: Sun Sep 25, 2005 3:00 am
Location: Ref Desk

Re: Nconvert with portable Ghostscript?

Post by XnTriq »

foxyshadis ([url=http://newsgroup.xnview.com/viewtopic.php?p=89973#p89973]XnView 1.97.8 browser crashes with some PDF files.[/url]) wrote:
Bobf wrote:hello Pierre

i have the same problem.
When i open a folder where PDF documents are located, XNView hangs (NO RESPONDING).
WINXP SP3 with Acrobat Reader 10.0 x, as default PDF reader, and PDFCreator 1.1.0 and PDF XChangeReader (without shell extention installed) on the system as well. No Ghostscript installed on the system.

Where (in which file e.g. xnview.ini) should the XNVIEW_GS_DLL & XNVIEW_GS_LIB environment variables set?

manay thanks and rgs Bob
btw, in case you still have issue and for anyone else who finds the topic, environment variables are set in the control panel, not in XnView. They are under System -> Advanced -> Environment Variables, you have to create them if they aren't listed. Setting this should allow XnView to remain compatible with PDF-XChange, which is installed with dozens of applications. (Less so now that free alternatives like DoPDF and CutePDF exist.)
  • XNVIEW_GS_DLL = path of gsdll32.dll
  • XNVIEW_GS_LIB = path of Ghostscript's lib folder
chris38
Posts: 10
Joined: Mon Feb 17, 2014 1:12 pm

Re: Nconvert with portable Ghostscript?

Post by chris38 »

Thanks XnTriq,

For the community, I reproduce a response of Pierre that could enhance the response.
I must work totally with portable application. So I think this solution (sent by Pierre) could be better (no environment variable)
[Pierre]
You must place a directory "Plugins\gs" with GS "bin" and "lib"
So XnView/NConvert will recognise it.
I'm going to try the solution and will be back for the result.
chris38
Posts: 10
Joined: Mon Feb 17, 2014 1:12 pm

Re: Nconvert with portable Ghostscript?

Post by chris38 »

So it works fine !

You must unzip GhostScript Portable (GhostscriptPortable_9.18.paf.exe for me) in the directory ...xnview\plugins\gs (so it exists ...xnview\plugins\gs\bin, ...xnview\plugins\gs\lib ...)
And nconvert.exe MUST be in ...xnview\ directory (so don't move it)

The process seems to be quite long when working with (to) some USB key devices probably because of communication and recording in these special devices (sometimes very slow writing devices).
For example, converting to an USB key (known as slow - Lexar) is more than 60s time long, while the same to hard disk is 1/2 second.
User avatar
XnTriq
Moderator & Librarian
Posts: 6339
Joined: Sun Sep 25, 2005 3:00 am
Location: Ref Desk

Re: Nconvert with portable Ghostscript?

Post by XnTriq »

Thanks for the tutorial, chris38 (-:
Post Reply