You are here

[Closed] XnConvert 1.102.0 64-bit can't find Ghostscript

15 posts / 0 new
Last post
staley
Offline
Last seen: 4 hours 43 min ago
Joined: 2011-05-12 19:47
[Closed] XnConvert 1.102.0 64-bit can't find Ghostscript

When trying to launch xnconvert to convert PDF to png, xnconvert needs to use Ghostscript. However, using the PortableApps version of both apps on the same drive, xnconvert doesn't seem to find Ghostscript. A trace with Process Monitor shows...
PATH NOT FOUND
C:\Program Files (x86)\bitfarm-Archiv\gs10.04.0\bin\gsdll64.dll

For some reason it keeps trying to get gsdll64.dll in the above directory, instead of %PAL:PortableAppsDir%\CommonFiles\Ghostscript\App\

Is this a bug in the PortableApps implementation or a bug in xnconvert?

I've tried to adjust the launcher ini file to the following and it doesn't work:
[Activate]
Ghostscript=find
Registry=false

[Environment]
CustomGSDirectory=%PAL:PortableAppsDir%\CommonFiles\Ghostscript\App\
xnconvert_GS_DLL=%CustomGSDirectory%\bin\gsdll64.dll
xnconvert_GS_LIB=%CustomGSDirectory%\bin;%CustomGSDirectory%\lib;%CustomGSDirectory%\fonts
PATH=%PAL:PortableAppsDir%\CommonFiles\Ghostscript\bin;%PAL:PortableAppsDir%\CommonFiles\Ghostscript\lib;%PATH%

I also tried installing Ghostscript on the host computer, and then it works. It references the correct dll in C:\Program Files\gs\gs10.05.1\bin

But I would ideally like it to run completely on the portable version of Ghostscript, so that the drive is computer independent.

John T. Haller
John T. Haller's picture
Offline
Last seen: 4 hours 33 min ago
AdminDeveloperModeratorTranslator
Joined: 2005-11-28 22:21
Confirmed

I can confirm the issue. I'll take a look at it later tomorrow.

Sometimes, the impossible can become possible, if you're awesome!

John T. Haller
John T. Haller's picture
Offline
Last seen: 4 hours 33 min ago
AdminDeveloperModeratorTranslator
Joined: 2005-11-28 22:21
Fixed in Ghostscript Portable 10.05.1

This is fixed in today's release of Ghostscript Portable 10.05.1. Turns out I made a packaging error in the last version a few weeks ago which broke Ghostscript usage with any app. Thanks for reporting.

Sometimes, the impossible can become possible, if you're awesome!

staley
Offline
Last seen: 4 hours 43 min ago
Joined: 2011-05-12 19:47
I'm still getting the same

I'm still getting the same error. Even after uninstalling xnconvert and deleting the Ghostscript and doing a fresh install. Is there anything else that should be cleared out? I can confirm that the Ghostscript Program Files directory isn't in my system's path.

John T. Haller
John T. Haller's picture
Offline
Last seen: 4 hours 33 min ago
AdminDeveloperModeratorTranslator
Joined: 2005-11-28 22:21
XnConvert Itself, Try 32-bit?

How can you tell in XnConvert itself that it can't find it? Is there something the app shows?

We don't actually configure the app to use Ghostscript. The XnConvertPortable.exe launcher creates those custom environment variables (GS_DLL, GS_LIB, xnconvert_GS_DLL, xnconvert_GS_LIB) and populates them. I can confirm that it is correctly setting those up as expected.

That said, I think it may be because I added 64-bit support to XnConvert but didn't update all the code to support both. Try opening up the XnConvertPortable.ini file within XnConvertPortable\App\AppInfo\Launcher and changing the two gsdll32.dll entries within Environment to gsdll64.dll. Let me know if that gets it working.

Sometimes, the impossible can become possible, if you're awesome!

staley
Offline
Last seen: 4 hours 43 min ago
Joined: 2011-05-12 19:47
Here is all the combinations

Here is all the combinations I have tried...

[Environment]
GS_DLL=%PAL:PortableAppsDir%\CommonFiles\Ghostscript\bin\gsdll64.dll
GS_LIB=%PAL:PortableAppsDir%\CommonFiles\Ghostscript\lib;%PAL:PortableAppsDir%\CommonFiles\Ghostscript\fonts
xnconvert_GS_DLL=%PAL:PortableAppsDir%\CommonFiles\Ghostscript\bin\gsdll64.dll
xnconvert_GS_LIB=%PAL:PortableAppsDir%\CommonFiles\Ghostscript\bin;%PAL:PortableAppsDir%\CommonFiles\Ghostscript\lib;%PAL:PortableAppsDir%\CommonFiles\Ghostscript\fonts
PATH=%PAL:PortableAppsDir%\CommonFiles\Ghostscript\bin;%PAL:PortableAppsDir%\CommonFiles\Ghostscript\lib;%PATH%

[Environment]
CustomGSDirectory=%PAL:PortableAppsDir%\CommonFiles\Ghostscript\App\
xnconvert_GS_DLL=%CustomGSDirectory%\bin\gsdll64.dll
xnconvert_GS_LIB=%CustomGSDirectory%\bin;%CustomGSDirectory%\lib;%CustomGSDirectory%\fonts
PATH=%PAL:PortableAppsDir%\CommonFiles\Ghostscript\bin;%PAL:PortableAppsDir%\CommonFiles\Ghostscript\lib;%PATH%

[Environment]
GS_DLL=%CustomGSDirectory%\bin\gsdll32.dll
GS_LIB=%CustomGSDirectory%\bin;%CustomGSDirectory%\lib;%CustomGSDirectory%\fonts
xnconvert_GS_DLL=%CustomGSDirectory%\bin\gsdll32.dll
xnconvert_GS_LIB=%CustomGSDirectory%\bin;%CustomGSDirectory%\lib;%CustomGSDirectory%\fonts

[Environment]
CustomGSDirectory=%PAL:PortableAppsDir%\CommonFiles\Ghostscript
GS_DLL=%CustomGSDirectory%\bin\gsdll32.dll
GS_LIB=%CustomGSDirectory%\bin;%CustomGSDirectory%\lib;%CustomGSDirectory%\fonts
xnconvert_GS_DLL=%CustomGSDirectory%\bin\gsdll32.dll
xnconvert_GS_LIB=%CustomGSDirectory%\bin;%CustomGSDirectory%\lib;%CustomGSDirectory%\fonts

[Environment]
CustomGSDirectory=%PAL:PortableAppsDir%\CommonFiles\Ghostscript
GS_DLL=%CustomGSDirectory%\bin\gsdll32.dll
GS_LIB=%CustomGSDirectory%\bin;%CustomGSDirectory%\lib;%CustomGSDirectory%\fonts
xnconvert_GS_DLL=%CustomGSDirectory%\bin\gsdll32.dll
xnconvert_GS_LIB=%CustomGSDirectory%\bin;%CustomGSDirectory%\lib;%CustomGSDirectory%\fonts
PATH=%PAL:PortableAppsDir%\CommonFiles\Ghostscript\bin;%PAL:PortableAppsDir%\CommonFiles\Ghostscript\lib;%PATH%

[Environment]
CustomGSDirectory=%PAL:PortableAppsDir%\CommonFiles\Ghostscript
xnconvert_GS_DLL=%CustomGSDirectory%\bin\gsdll32.dll
xnconvert_GS_LIB=%CustomGSDirectory%\bin;%CustomGSDirectory%\lib;%CustomGSDirectory%\fonts

[Environment]
CustomGSDirectory=%PAL:PortableAppsDir%\CommonFiles\Ghostscript
xnconvert_GS_DLL=%CustomGSDirectory%\bin\gsdll64.dll
xnconvert_GS_LIB=%CustomGSDirectory%\bin;%CustomGSDirectory%\lib;%CustomGSDirectory%\fonts

[Environment]
CustomGSDirectory=%PAL:PortableAppsDir%\CommonFiles\Ghostscript
GS_DLL=%CustomGSDirectory%\bin\gsdll32.dll
GS_LIB=%CustomGSDirectory%\bin;%CustomGSDirectory%\lib;%CustomGSDirectory%\fonts

[Environment]
CustomGSDirectory=%PAL:PortableAppsDir%\CommonFiles\Ghostscript
GS_DLL=%CustomGSDirectory%\bin\gsdll64.dll
GS_LIB=%CustomGSDirectory%\bin;%CustomGSDirectory%\lib;%CustomGSDirectory%\fonts

[Environment]
CustomGSDirectory=%PAL:PortableAppsDir%\CommonFiles\Ghostscript
GS_DLL=%CustomGSDirectory%\bin\gsdll32.dll
GS_LIB=%CustomGSDirectory%\bin;%CustomGSDirectory%\lib;%CustomGSDirectory%\fonts
xnconvert_GS_DLL=%CustomGSDirectory%\bin\gsdll32.dll
xnconvert_GS_LIB=%CustomGSDirectory%\bin;%CustomGSDirectory%\lib;%CustomGSDirectory%\fonts

[Environment]
GS_DLL=%CustomGSDirectory%\bin\gsdll32.dll
GS_LIB=%CustomGSDirectory%\bin;%CustomGSDirectory%\lib;%CustomGSDirectory%\fonts
xnconvert_GS_DLL=%CustomGSDirectory%\bin\gsdll32.dll
xnconvert_GS_LIB=%CustomGSDirectory%\bin;%CustomGSDirectory%\lib;%CustomGSDirectory%\fonts

32-Bit Version tries to load (via P:\PortableApps\XnConvertPortable\App\XnConvert\xnconvert.exe)
P:\PortableApps\XnConvertPortable\App\XnConvert\Plugins\gs\bin\gsdll32.dll - PATH NOT FOUND

64-bit Version tries to load (via P:\PortableApps\XnConvertPortable\XnConvertPortable.exe)
C:\Program Files (x86)\bitfarm-Archiv\gs10.04.0\bin\gsdll64.dll - PATH NOT FOUND
Not sure why it's looking in (x86) Program Files but for the 64-bit of Ghostscript.

Tried all of these combinations with the two following settings:

[Activate]
Ghostscript=find
Registry=true

[Activate]
Ghostscript=find
Registry=false

John T. Haller
John T. Haller's picture
Offline
Last seen: 4 hours 33 min ago
AdminDeveloperModeratorTranslator
Joined: 2005-11-28 22:21
How can you tell in XnConvert itself that it can't find it?

How can you tell in XnConvert itself that it can't find it? Is there something the app shows?

Sometimes, the impossible can become possible, if you're awesome!

staley
Offline
Last seen: 4 hours 43 min ago
Joined: 2011-05-12 19:47
Not that I can see

Not that I can see... there isn't a plug-in info screen or anything.

John T. Haller
John T. Haller's picture
Offline
Last seen: 4 hours 33 min ago
AdminDeveloperModeratorTranslator
Joined: 2005-11-28 22:21
Registry False

Note that setting registry to false doesn't affect anything. It just causes stuff to be left behind in your TEMP directory. The launcher doesn't write to the registry.

Sometimes, the impossible can become possible, if you're awesome!

John T. Haller
John T. Haller's picture
Offline
Last seen: 4 hours 33 min ago
AdminDeveloperModeratorTranslator
Joined: 2005-11-28 22:21
Not Working Method

It appears that the current version of XnConvert, at least the 64-bit build, provides no working method to point to the proper Ghostscript version. WIth the XnConvertPortable.ini configuration file changes to gsdll64.dll, the following environment variables are set:

GS_DLL=X:\PortableApps\CommonFiles\Ghostscript\bin\gsdll64.dll
GS_LIB=X:\PortableApps\CommonFiles\Ghostscript\bin;X:\PortableApps\CommonFiles\Ghostscript\lib;X:\PortableApps\CommonFiles\Ghostscript\fonts
GS_PROG=X:\PortableApps\CommonFiles\Ghostscript\bin\gswin64c.exe
xnconvert_GS_DLL=X:\PortableApps\CommonFiles\Ghostscript\bin\gsdll64.dll
xnconvert_GS_LIB=X:\PortableApps\CommonFiles\Ghostscript\bin;X:\PortableApps\CommonFiles\Ghostscript\lib;X:\PortableApps\CommonFiles\Ghostscript\fonts
PATH=%PATH%;X:\PortableApps\CommonFiles\Ghostscript\bin

There doesn't appear to be any documentation on setting it on the publisher's site. And I could find nothing in their forums.

I'm closing this for now as there doesn't appear to be anything we can do on our end as it appears that path is hard coded into the current XnConvert release.

Sometimes, the impossible can become possible, if you're awesome!

staley
Offline
Last seen: 4 hours 43 min ago
Joined: 2011-05-12 19:47
I understand. Thank you for

I understand. Thank you for trying to resolve this!

John T. Haller
John T. Haller's picture
Offline
Last seen: 4 hours 33 min ago
AdminDeveloperModeratorTranslator
Joined: 2005-11-28 22:21
Testing?

I don't use XnConvert myself. What would be a good minimal test if XnConvert is able to use Ghostscript properly?

I'm thinking maybe it'll use a registry key if its available. If it works with one in HKCU I could have the launcher populate and then remove that.

Sometimes, the impossible can become possible, if you're awesome!

staley
Offline
Last seen: 4 hours 43 min ago
Joined: 2011-05-12 19:47
What I have been doing is

What I have been doing is adding a PDF file on the input files tab. Then in the output tab, simply set it to output as png. Selecting the file itself triggers the app to try and load Ghostscript btw. It's trying to generate thumbnails for the PDFs and needs Ghostscript for that.

MiK
Offline
Last seen: 8 hours 17 min ago
Joined: 2008-08-14 18:25
You are using an outdated version of XnConvert

Just hinting.

Since you are using v1.102.0 (Nov 07, 2024), you might be missing a "possible fix" in the latest version v1.105.0 (Apr 16, 2025), you will just need to test it, yourself.

The problem with the Ghostscript is known to the developer. However, it was reported for another software, XnView MP, at least this is what I was able to find.

See forum post here, Reported for XnView MP:

1.8.6 - GhostScript 10.05 x64 don't work
https://newsgroup.xnview.com/viewtopic.php?p=205355

Reply by xnview - Mon Mar 17, 2025 10:11 am
right they have removed pdf2dsc from package

Reply by xnview - Thu Mar 27, 2025 8:58 am
This problem is supposed to be fixed in XnView MP 1.8.7

John T. Haller
John T. Haller's picture
Offline
Last seen: 4 hours 33 min ago
AdminDeveloperModeratorTranslator
Joined: 2005-11-28 22:21
Updated

XnConvert Portable has been updated to 1.105.0 and is now 64-bit only with the associated changes mentioned above for when the base app supports Ghostscript again.

Sometimes, the impossible can become possible, if you're awesome!

Log in or register to post comments