PDF on MacOS

Ask for help and post your question on how to use XnView MP.

Moderators: helmut, XnTriq, xnview

Post Reply
alamothe
Posts: 2
Joined: Wed Apr 19, 2023 6:39 pm

PDF on MacOS

Post by alamothe »

Hello,
How to get PDF working on MacOS?

MacOS: Ventura on Apple Silicon
XNView MP Version 1.4.3 64bits

I installed ghostscript with

brew install ghostscript

Code: Select all

~ $ gs --version
10.01.1
~ $ which gs
/opt/homebrew/bin/gs
It does not want to open any PDF nor display any thumbnail. Any help appreciated.

Please quote to develop this feature.
cday
XnThusiast
Posts: 4396
Joined: Sun Apr 29, 2012 9:45 am
Location: Cheltenham, U.K.

Re: PDF on MacOS

Post by cday »

Ghostscript 64-bit?

If so, there have been a number of times been compatibility issues with newly released GS versions, but I don't recall anyone has reported one recently.

As far as I know, with default program setting PDF files should open in the viewer, although browser thumbnails might have to be enabled. It will also usually be necessary to increase the Ghostscript rasterisation DPI setting in order to obtain a good quality image, in the viewer File > Format settings, at least in the Linux installation.
User avatar
xnview
Author of XnView
Posts: 46236
Joined: Mon Oct 13, 2003 7:31 am
Location: France
Contact:

Re: PDF on MacOS

Post by xnview »

i've tried to install the same version on MacOS ARM, and it works correctly with 1.4.4

Could you try to start XnView from a terminal?
Pierre.
alamothe
Posts: 2
Joined: Wed Apr 19, 2023 6:39 pm

Re: PDF on MacOS

Post by alamothe »

Works if launched from the terminal!! 🎉

Code: Select all

open /Applications/XnViewMP.app
Maybe there should be a config option for where to find ghostscript? Or look also in /opt/homebrew/bin/gs since I assume this is where 90% of people will have it on MacOS.

Thanks for your help!
User avatar
xnview
Author of XnView
Posts: 46236
Joined: Mon Oct 13, 2003 7:31 am
Location: France
Contact:

Re: PDF on MacOS

Post by xnview »

yes perhaps /opt/homebrew/bin/ is not in the PATH by default
Pierre.
attaboyBrad
Posts: 2
Joined: Wed Jan 17, 2024 1:25 am

Re: PDF on MacOS

Post by attaboyBrad »

Is there a way to make PDFs on XnViewMP for Mac Sonoma work without launching XnViewMP/XnConvert from the terminal like this?

I'm in the exact same situation where I can launch either Xn app from terminal with "open /applications/xnviewmp.app" and work with PDFs but otherwise I get no previews of PDFs and get errors like 'not an image' or 'File Can't be Loaded!'.

All software is fully updated on an M1 Mac Studio. XnView and XnConvert are installed from the website (not app store), I've tried installing Ghostscript via both HomeBrew and MacPorts to no avail, I've tried adding lines to ...zsh or whatever that is to make sure HomeBrew is in my $PATH, and restarting, etc.

I'm at a loss after banging my head against this for a couple of hours now, and I bet it's as simple as running a command or two... I just don't know what command to run.
User avatar
xnview
Author of XnView
Posts: 46236
Joined: Mon Oct 13, 2003 7:31 am
Location: France
Contact:

Re: PDF on MacOS

Post by xnview »

ghostscript is in your $PATH, and it doesnt work?? Currently i search for a better solution
Pierre.
attaboyBrad
Posts: 2
Joined: Wed Jan 17, 2024 1:25 am

Re: PDF on MacOS

Post by attaboyBrad »

I believe ghostscript is in my path...

This is what I get from >echo $PATH:

/opt/homebrew/bin:/opt/homebrew/sbin:/Library/Frameworks/Python.framework/Versions/3.9/bin:/Library/Frameworks/Python.framework/Versions/3.11/bin:/Library/Frameworks/Python.framework/Versions/3.10/bin:/opt/local/bin:/opt/local/sbin:/opt/homebrew/bin:/opt/homebrew/sbin:/usr/local/bin:/System/Cryptexes/App/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/local/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/appleinternal/bin:/Library/Apple/usr/bin:/opt/homebrew/bin

This is what I get from >which -a gs:

/opt/homebrew/bin/gs
/opt/local/bin/gs
/opt/homebrew/bin/gs
/opt/homebrew/bin/gs

I'm afraid I may have made a mess of PATH in trying to get this to work, but I'm still in the position of PDFs working in Xn apps when launched from terminal, and not working otherwise.

Grateful for any guidance you can provide, and grateful for XnView and XnConvert, without which I could not have accomplished some important projects.
nr084
Posts: 1
Joined: Thu Jul 04, 2024 7:46 am

Re: PDF on MacOS

Post by nr084 »

hey. still having this problem. xnview on mac os opens pdf only when launched from terminal. i think that need to add gs to path systemwide, but dont know how to do it. may be the configuration path of ghostscrpit can help?
Post Reply