Getting Blank page while converting png to pdf

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

Moderators: XnTriq, helmut, xnview

Posts: 5
Joined: Wed Feb 06, 2019 1:43 pm

Getting Blank page while converting png to pdf

Post by Pragasam »


I am trying to convert png to pdf. The newly generated pdf file is blank.

The png file has some colors background and the Bit depth is 32.

When i try to open the pdf it show that " There was an error processing a page. There was a problem reading this document(14)" . It means that the pdf file is corrupted.

The command i have user it to convert the png to tiff

nconvert -out pdf -multi -c 1 -overwrite -o D:\clientdata\test.pdf D:\clientdata\*

Note : The png which is give as a input to generate a pdf is converted form the tiff.

To convert the tiff to png command

nconvert -out png -xall -o D:\clientdata\test.png D:\TiffProvidedByClient.tif

What is expected ?

1. I need to convert the tiff file in to png (Which is working fine)
2. Need to convert the png(Out put of 1) to pdf (Not working)
3. If 1 and 2 not possible i need to convert the tiff to pdf directly
Posts: 4021
Joined: Sun Apr 29, 2012 9:45 am
Location: Cheltenham, U.K.

Re: Getting Blank page while converting png to pdf

Post by cday »

At an initial quick look:

o You are saving a colour image with Fax (1-bit, black and white) compression.

o You should be able to convert a multipage TIFF directly to a multipage PDF.


Consulting my library of tested scripts, all that seems to be needed to convert a multipage TIFF to a multipage PDF is the following basic code:

Code: Select all

nconvert -out pdf -multi -o test.pdf test.tif

Add suitable compression for the output PDF file, and note that I tested with 24-bit images rather than 32-bit images although I don't immediately see that as likely to be relevant. And perhaps surprisingly, no need for a -xall term.