Getting started with NConvert

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

Moderators: XnTriq, xnview

Post Reply
pdf11
Posts: 6
Joined: Fri Apr 24, 2020 12:34 pm

Getting started with NConvert

Post by pdf11 » Fri Apr 24, 2020 12:48 pm

Hi, last year I tried one of the Xn software to batch convert PDF files to image files but the issue was that the quality was lost.
I think at the time I read that NConvert was the way to go, but I could not get it running, so I'm trying again.

It's difficult to find information on the following:
(1) Installing. I tried double clicking "nconvert" application, got a small black screen for one second and I don't know what happened. How do I install it?
(2) Can someone please tell me how to convert multiple PDF documents to image files. Is there a code I have to run, where do I type the code? Please advise specifically since I'm not familiar with command line software.

cday
XnThusiast
Posts: 2499
Joined: Sun Apr 29, 2012 9:45 am
Location: Cheltenham, U.K.

Re: Getting started

Post by cday » Fri Apr 24, 2020 1:33 pm

pdf11 wrote:
Fri Apr 24, 2020 12:48 pm
Hi, last year I tried one of the Xn software to batch convert PDF files to image files but the issue was that the quality was lost.
Quality shouldn't be lost: XnView software uses the Ghostscript utility to rasterise the images in a PDF file, and quality should be maintained if a suitable DPI value is set. However, the default DPI value of 72 is usually too low.

I think at the time I read that NConvert was the way to go, but I could not get it running, so I'm trying again.

It's difficult to find information on the following:

(1) Installing. I tried double clicking "nconvert" application, got a small black screen for one second and I don't know what happened. How do I install it?
NConvert isn't installed using an installer, the NConvert file downloads as an .exe file which is then called directly, in one way or another, at the command line or by a batch file .bat.

(2) Can someone please tell me how to convert multiple PDF documents to image files. Is there a code I have to run...
That should be possible using suitable code, once you gain a basic understanding of using NConvert...

... where do I type the code? Please advise specifically since I'm not familiar with command line software.
That really requires a detailed tutorial and sadly I can't immediately direct you to one! Having been down this path myself some years back, I can tell you that it can be a rather steep learning curve without a detailed guide. After a lot of Googling, trial and error and great frustration, I eventually developed my own way of working which may be unconventional but sidesteps some of issues I encountered.

Edit:

You might consider before going further whether what you need to do could be done more easily using a batch conversion software such as the excellent XNConvert.

If you wish to consider NConvert in more detail, there is helmut's tutorial in the NConvert section of the forum which gives useful information and alludes to the problems that may be encountered, although without providing detailed solutions. You could also obtain some further insights by browsing other threads in the section.

pdf11
Posts: 6
Joined: Fri Apr 24, 2020 12:34 pm

Re: Getting started with NConvert

Post by pdf11 » Sun Apr 26, 2020 4:25 am

Thanks for responding.
I tried XnConvert again, the latest version being 1.85. After issues with converting I read on a web search that Ghsotscript had to be installed, so installed 9.52, which worked.

However I have the same issues. Trying to convert from PDF to TIF, without any compression ... I get a much bigger file size compared to the PDF and the image quality is lost dramatically.

From this point ... do I still use XnConvert or try NConvert?

If NConvert, I still don't know how to start since the instructions are not detailed enough for a beginner.
I assume I use CMD in Windows, is this part right?
Then I assume I have to write a line to tell it to use NCovert???
Please assist with this part.

cday
XnThusiast
Posts: 2499
Joined: Sun Apr 29, 2012 9:45 am
Location: Cheltenham, U.K.

Re: Getting started with NConvert

Post by cday » Sun Apr 26, 2020 6:45 am

pdf11 wrote:
Sun Apr 26, 2020 4:25 am
I tried XnConvert again, the latest version being 1.85. After issues with converting I read on a web search that Ghsotscript had to be installed, so installed 9.52, which worked.

However I have the same issues. Trying to convert from PDF to TIF, without any compression ... I get a much bigger file size compared to the PDF and the image quality is lost dramatically.
You need to discover, on the Settings tab, the Load format settings... button, and set the PS/PDF resolution to a higher value than the default 72 DPI, 300 for example...

From this point ... do I still use XnConvert or try NConvert?

If NConvert, I still don't know how to start since the instructions are not detailed enough for a beginner.
Exactly, there is a need for a more detailed tutorial... :wink:

I assume I use CMD in Windows, is this part right?
Then I assume I have to write a line to tell it to use NCovert???
Yes, or maybe multiple lines in a batch file .bat depending on what you need to do... :wink:

The quality issue, the need to set a suitable DPI value, is the same for NConvert.

Could you explain in a bit more detail what you need to do: if it can be done using XnConvert that will be much easier, but it may be possible to do more complex operations directly using an NConvert script...

pdf11
Posts: 6
Joined: Fri Apr 24, 2020 12:34 pm

Re: Getting started with NConvert

Post by pdf11 » Sun Apr 26, 2020 7:44 am

Thanks for responding again as I was getting nowhere.
I tried your instruction to set the resolution at 300 and it did improve.
The PDF file (size of 520kB) converted to a TIF file of size 51,000kB.
If I go to 600 resolution, the TIF file size is 204,000kB.

The end result for the 600 resolution is what I was looking for ... but obviously the file size is too much.

To answer your question, I am converting drawings which have fine detail.
So if I have 100 drawings say, at 200MB each, this is 20GB which is not a good solution.

I did try one of the online conversion tools (I think it was I Love PDF or similar), the result was OK, not as good as the 300 or 600 resolution with XnConvert ... but the file size was similar to the original PDF.

TO SUMMARIZE: The end result in terms of quality is very good, but the file size is far too big.

Would nConvert resolve this issue?

cday
XnThusiast
Posts: 2499
Joined: Sun Apr 29, 2012 9:45 am
Location: Cheltenham, U.K.

Re: Getting started with NConvert

Post by cday » Sun Apr 26, 2020 8:08 am

pdf11 wrote:
Sun Apr 26, 2020 7:44 am
TO SUMMARIZE: The end result in terms of quality is very good, but the file size is far too big.

Would nConvert resolve this issue?

You need to discover, on the Output tab, the Format settings on the right side, select TIFF (or PDF), and then select a type of compression that reduces the file size while maintaining the original quality.

If the originals are black and white, selecting CCITT G4 compression will dramatically reduce their size with no loss of quality, if the originals are grayscale or colour the best option is JPEG compression, and you will need to experiment to find the quality setting that gives the best balance between quality and file size, at 600 DPI quite low values might work.

For reference, the same principles would apply if NConvert were used.

pdf11
Posts: 6
Joined: Fri Apr 24, 2020 12:34 pm

Re: Getting started with NConvert

Post by pdf11 » Sun Apr 26, 2020 8:22 am

OK, thank you very much.
It did reduce the file size as suggested.
The final result for a 520kB PDf file, converted with 600 resolution and the CCITT G4 compression is 3,000kB ... which is much better. Perhaps I can try some other settings to reduce the file size.

Whilst I was aware of the compression setting, I thought the image quality would be reduced, so I set it to No Compression, I didn't think to change it.

Also thanks for advising that NConvert does the same thing for this purpose.

cday
XnThusiast
Posts: 2499
Joined: Sun Apr 29, 2012 9:45 am
Location: Cheltenham, U.K.

Re: Getting started with NConvert

Post by cday » Sun Apr 26, 2020 8:37 am

pdf11 wrote:
Sun Apr 26, 2020 8:22 am
The final result for a 520kB PDf file, converted with 600 resolution and the CCITT G4 compression is 3,000kB ... which is much better. Perhaps I can try some other settings to reduce the file size.
Possibly the original PDF images were less than 600 DPI, or quite possibly they were actually in a vector format, which could result in a significantly smaller file size.

Perhaps I can try some other settings to reduce the file size.
That could certainly be worth trying, different types of compression can be best suited to different types of content, and a line drawing might compress better with another type of compression, I'm not sure.

pdf11
Posts: 6
Joined: Fri Apr 24, 2020 12:34 pm

Re: Getting started with NConvert

Post by pdf11 » Sun Apr 26, 2020 8:42 am

Thank you again for the additional tips.

Post Reply