How to display vector formats like PDF, AI,...? GhostScript!

Frequently Asked Questions regarding XnView (including Answers)

Moderators: XnTriq, helmut, xnview

User avatar
helmut
Posts: 8705
Joined: Sun Oct 12, 2003 6:47 pm
Location: Frankfurt, Germany

How to display vector formats like PDF, AI,...? GhostScript!

Post by helmut »

XnView is intended for working with raster graphic files, that is image files which consist of pixels. Apart from this, XnView also supports some vector formats using GhostScript, e.g.:

- AI (Adobe Illustrator, not all subformats)
- PDF (Adobe Portable Document Format)
- PS (Postscript)
- EPS (Encapsulated Postscript)

GhostScript allows for printing and displaying vector graphics and converting these to raster graphic files.

Please note:
- Only reading these formats is supported.
- For these formats thumbnails are not displayed because of performance reasons.
- For AI files not all subformats are supported
- For CAD vector files, there's a special plug-in available, see topic "How to view .dwg files?"

1.) Download AGPL Ghostscript
For using GhostScript with XnView, you simply download AGPL GhostScript (~12MB) and install it on your computer:
  • For XnView Classic (Windows) and XnView MP 32 bit:
    Download AGPL GhostScript 32-bit from website http://www.ghostscript.com/download/gsdnld.html , choose the version for your Operating System (Windows, ...), link "Ghostscript x.xx for Windows (32 bit)"".
  • For XnView MP 64 bit:
    Download AGPL GhostScript 64-bit from website http://www.ghostscript.com/download/gsdnld.html , choose the version for your Operating System (Windows, ...), link "Ghostscript x.xx for Windows (64 bit) ".
Currently XnView does not support the 64 bit version, so please make sure to download the 32 bit version.

2.) Run Ghostscript setup
Run the setup file you have just downloaded (e.g. "gs910w32.exe"), the setup will guide you through the installation process.

3.) Restart computer
It's recommended to restart the computer after installation of AGPL Ghostscript. Otherwise interaction between XnView and Ghostscript might not work.

That was the installation part. XnView will automatically recognize that GhostScript is installed and interact with it for displaying files that have one of the formats listed above.

4.) Test correct installation
Check correct installation and viewing by browsing with XnView to a directory containing PDF, PS, AI, or EPS files to check whether support for these formats works properly.
Here's a PDF-sample which you can download and use for testing. Right-click on the link and save the PDF document to a local directory. Then, start XnView and open the PDF in XnView.

5a.) Fine tuning: Resolution
By default the raster images generated have 72dpi. If you want more detailed raster images set a higher resolution (DPI, dots per inch) in Tools > Options, Category "General > Read/Write", Tab "Read" > EPS/PS/AI/PDF".

5b.) Fine tuning: High quality display
When viewing vector images, often they contain thin lines and/or text. It is strongly recommended to activate high quality display for both thumbnails and images. In options dialog, category "Browser > Thumbnails" activate the checkbox "Use high quality". And in category "View" activate the checkboxes for "High zoom quality (slower)". I recommend to activate "Reduce" and "Fit to Window/Desktop". Please note that when activate "Enlarge" zooming might become very slow for large images and large zoom factors (>400%).

5c.) Fine tuning: Thumbnails for Vector images.
Converting vector files to image files needs quite some calculation. For this reason by default you will not see thumbnails for vector images. If you do not care too much about performance and want to see thumbnails for vector graphics, in Tools > Options, Category "Browser > File List" check the checkbox "Show as thumbnail" in the row labeled "AI, PS, PDF files". Then, browsing a folder with vector files will be slow because XnView creates all the thumbnails. Browsing the same folder for a second time will be fast because XnView will load the thumbnails from its thumbnail cache and display them.


Related topics:
Cannot open AI file
Can't open EPS files?
"How to view .dwg files?"
XnView and Ghostscript
Show thumbnails of PDFs
Last edited by helmut on Fri Dec 21, 2007 8:34 pm, edited 10 times in total.
asd

Problems

Post by asd »

I have installled AFPL Ghostscript 8.53 and xnview but I can't open .ai files, I have opened with illustrator and all it's ok

I have rebooted the machine and problems continue

What can I do?


Thanks
User avatar
xnview
Author of XnView
Posts: 44885
Joined: Mon Oct 13, 2003 7:31 am
Location: France

Re: Problems

Post by xnview »

asd wrote:I have installled AFPL Ghostscript 8.53 and xnview but I can't open .ai files, I have opened with illustrator and all it's ok

I have rebooted the machine and problems continue

What can I do?
Ghostscript doesn't support all format of AI files
Pierre.
asd

Problems

Post by asd »

I have installed cad plugins correctly and I can open this files form xnview > Open file, But I like to open files *.dwf and *.dxf only making double click. I have associated this extensions (in windows) to xnview and in ossaciations from xnview optiona but I can't open with double click this files.

Thanks
User avatar
helmut
Posts: 8705
Joined: Sun Oct 12, 2003 6:47 pm
Location: Frankfurt, Germany

Re: Problems

Post by helmut »

asd wrote:I have installed cad plugins correctly and I can open this files form xnview > Open file, But I like to open files *.dwf and *.dxf only making double click. I have associated this extensions (in windows) to xnview and in ossaciations from xnview optiona but I can't open with double click this files.

Thanks
Please read FAQ "How to associate image files with XnView".
User avatar
helmut
Posts: 8705
Joined: Sun Oct 12, 2003 6:47 pm
Location: Frankfurt, Germany

Post by helmut »

AFPL GhostScript is available as 32bit version and as 64 bit version. Please be aware that XnView 1.91 supports the 32 bit version, only.


Related topic:
- "AFPL ghostscript was not found on your system"
ckit
XnThusiast
Posts: 2577
Joined: Tue Feb 17, 2004 1:11 am
Location: QLD, Australia

Post by ckit »

AFPL GhostScript has been discontinued in favour of GPL Ghostscript.
but I have to admit AFPL GS 8.54 works flawlessly with XnView.
AMD Ryzen 3 3300X 3.8Ghz, 16Gb DDR4, RX6600XT with Dell U2520D at 2560x1440@60Hz scaling 125%
Windows 11 Pro x64 23H2, Listary Pro, PowerToys and Wintoys
User avatar
helmut
Posts: 8705
Joined: Sun Oct 12, 2003 6:47 pm
Location: Frankfurt, Germany

Post by helmut »

Please note that XnView 1.92 supports GPL GhostScript. Please consider this when downloading and installing GhostScript.

(I guess the original posts needs an update, now).
Last edited by helmut on Wed Dec 24, 2008 10:44 am, edited 1 time in total.
ckit
XnThusiast
Posts: 2577
Joined: Tue Feb 17, 2004 1:11 am
Location: QLD, Australia

Post by ckit »

helmut wrote:Please note that XnView 1.92 support GPL GhostScript. Please consider this when downloading and installing GhostScript.

(I guess the original posts needs an update, now).
No sorry, you're wrong.
Just installed Ghostscript 8.61 and XnView 1.92 can only view page 1 of a PDF, the other pages can't be viewed unless AFPL 8.54 is used.
AMD Ryzen 3 3300X 3.8Ghz, 16Gb DDR4, RX6600XT with Dell U2520D at 2560x1440@60Hz scaling 125%
Windows 11 Pro x64 23H2, Listary Pro, PowerToys and Wintoys
User avatar
helmut
Posts: 8705
Joined: Sun Oct 12, 2003 6:47 pm
Location: Frankfurt, Germany

Post by helmut »

ckit wrote:
helmut wrote:Please note that XnView 1.92 support GPL GhostScript. Please consider this when downloading and installing GhostScript.

(I guess the original posts needs an update, now).
No sorry, you're wrong.
Just installed Ghostscript 8.61 and XnView 1.92 can only view page 1 of a PDF, the other pages can't be viewed unless AFPL 8.54 is used.
Thank you for checking. It would be good if Pierre shed some light into this and clearly state which version of Ghostscript should be used.
User avatar
xnview
Author of XnView
Posts: 44885
Joined: Mon Oct 13, 2003 7:31 am
Location: France

Post by xnview »

ckit wrote:
helmut wrote:Please note that XnView 1.92 support GPL GhostScript. Please consider this when downloading and installing GhostScript.

(I guess the original posts needs an update, now).
No sorry, you're wrong.
Just installed Ghostscript 8.61 and XnView 1.92 can only view page 1 of a PDF, the other pages can't be viewed unless AFPL 8.54 is used.
I can't confirm, i have no problem to view all pages of PDF file with GPL version
Pierre.
Zwan
Posts: 1
Joined: Tue Jan 15, 2008 9:42 am

Post by Zwan »

ckit wrote: No sorry, you're wrong.
Just installed Ghostscript 8.61 and XnView 1.92 can only view page 1 of a PDF, the other pages can't be viewed unless AFPL 8.54 is used.
Had the same problem, resolved it the same way, but then XnView became unstable. Guess I'll have to install it all again. Running under W2k.
grkn
Posts: 5
Joined: Fri Jun 24, 2005 6:33 pm

Post by grkn »

Hi, it works fine, but Xnview 1.95 doesn't build thumbnails for .AI files, but works fine with .PSD, help? Using Ghostscript 8.61, illustrator not installed.
minkowski
Posts: 29
Joined: Tue Dec 07, 2010 8:38 am

Re: How to display vector formats like PDF, AI,...? GhostScr

Post by minkowski »

I could not see a script to download for Win 7 so I downloaded this:
http://garr.dl.sourceforge.net/project/ ... 900w32.exe

XNView can now display pdf files but only if pdf is one page. Multpage pdf cannot be opened.
You need Acrobat Reader for that.
User avatar
xnview
Author of XnView
Posts: 44885
Joined: Mon Oct 13, 2003 7:31 am
Location: France

Re: How to display vector formats like PDF, AI,...? GhostScr

Post by xnview »

With Ghostscript installed, XnView can display both single and multipage PDF documents.
Pierre.