XnConvert -- PDFs not read properly

XnConvert Multi Platform - Windows, MacOSX, Linux

Moderators: XnTriq, helmut, xnview

m-london
Posts: 6
Joined: Sat Apr 24, 2021 10:27 pm

XnConvert -- PDFs not read properly

Post by m-london »

I wanted to use XnConvert to clean some PDFs, however the files were not processed correctly at all..

PDF Input...
Image

PNG Output (both as shown in the preview and the outputted file)...
Image

Please can someone advise why this is happening.

Notes
  • Version: 1.98
  • O/S: Windows 11
  • I was able to select the PDF files as as an input and select PDF as an ouptut type -- so I assume XnConvert supports PDFs
  • I got the same results even when applying no actions to the file.
cday
XnThusiast
Posts: 4173
Joined: Sun Apr 29, 2012 9:45 am
Location: Cheltenham, U.K.

Re: XnConvert -- PDFs not read properly

Post by cday »

You have Ghostscript installed, x32 or x64 according to the installed XnConvert version, and have set a DPI value in XnConvert of 300DPI or higher?

If so, are you able to upload a test PDF file?

Edit: Works for me, test file unfortunately too large to attach.

The wiki page for Ghostscript is Wiki - Ghostscript.
m-london
Posts: 6
Joined: Sat Apr 24, 2021 10:27 pm

Re: XnConvert -- PDFs not read properly

Post by m-london »

✅ RESOLVED: To read PDFs, must install Ghostscript -- credit:@cday

Thanks @cday, I installed ghostscript and XnConvert seemed to work fine!

Side note:
  • The need to install Ghostscript partially defeats the ability to run XnConvert as a portable app (like I do)
  • I appreciate the info anyway though! and appreciate that sometimes there are practical limitations on things
  • The DPI setting didn't seem to make much difference for me TBH, it exported OK both with it set and with it not set
  • I did actually find the "Set DPI" action a bit confusing... I think the control is actually mis-labelled (I think it should say X% and Y%)
  • ... I scanned the PDF at 600 DPI, XnConvert asks for a DPI in "X" and "Y" (600 = approx. 25 x 25) but when I entered this, the output seemed to shrink
  • ... I entered 3000 like you said (3000 = approx. 55 x 55) but this roughly halved the image size
  • ... I entered X = 100 and Y = 100, the image stayed the same size... I entered X = 200 and Y = 200, the image doubled in size!
Anyway, thanks again for your help and am happy to leave the DPI thing for now as it is minor - hopefully someone on the XnConvert team will notice this and, if I'm right, this can be tweaked as part of the next version released.
cday
XnThusiast
Posts: 4173
Joined: Sun Apr 29, 2012 9:45 am
Location: Cheltenham, U.K.

Re: XnConvert -- PDFs not read properly

Post by cday »

When Ghostscript is installed the DPI value at which PDF files are rasterised is set to 72DPI. That value is too low to render most images at good quality, so the value used usually needs to be increased. Setting 300DPI often produces a satisfactory quality image, but higher or lower values may be used as appropriate. The filesize of saved image file increases as the value is increased.

In XnConvert the DPI setting can be found in Settings > Load format settings... > Read tab -- PS/PDF -- Resolution.

In XnConvert as far as I'm aware the same DPI value is always used for the X and Y axes. XnView MP, however, does support changing the value used for each axis after a file has been opened, although there is only a reason for doing so in rare special cases.
User avatar
oakside
Posts: 14
Joined: Thu Nov 07, 2013 7:58 pm

Re: XnConvert -- PDFs not read properly

Post by oakside »

This is fantastic. (Thanks cday for reminder and link to wiki.) Instructions and Ghostscript install worked great. (I wanted to quickly convert a bunch of PDF artwork that I don't need at massive resolutions or file sizes: I'm using XnView MP to batch convert, PDFs at 300 DPI, resize max side to 7680 pixels, export to JXL at 96+ quality.) One more thing for XnView, perhaps add to wiki: Make sure browser "Filter" (gold funnel icon) on toolbar is also set properly such as "All" or "Custom".