Multipages pdf to multipages tiff

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

Moderators: XnTriq, helmut, xnview

Post Reply
paquilanti
Posts: 4
Joined: Mon Oct 15, 2012 3:07 pm

Multipages pdf to multipages tiff

Post by paquilanti »

Hi all,

I've tried this cmd: nconvert -out tiff -xall -multi cx.pdf
But i only get the first page of the pdf.
Any ideas...?

Thanks in advance

Paul
User avatar
xnview
Author of XnView
Posts: 43603
Joined: Mon Oct 13, 2003 7:31 am
Location: France
Contact:

Re: Multipages pdf to multipages tiff

Post by xnview »

Please try

Code: Select all

nconvert -xall -multi -out tiff -o file.tif file.pdf
Pierre.
paquilanti
Posts: 4
Joined: Mon Oct 15, 2012 3:07 pm

Re: Multipages pdf to multipages tiff

Post by paquilanti »

Hi Pierre,
Thanks for your time, unfortunately your suggestion did not work(first page only) I also tried with XnConvert but no luck so far.
For infos the pdf’s version: pdf 1.3( Acrobat 4.x)
Size: 3370 Ko,
Dimension: 209,9 x296,7 mm
Pages: 7
I have been able to do it with manually with PDFcreator but I prefer to use nconvert for batch purposes and faster encoding.
I hope it can be done…
@+
Paul
User avatar
XnTriq
Moderator & Librarian
Posts: 6339
Joined: Sun Sep 25, 2005 3:00 am
Location: Ref Desk

Re: Multipages pdf to multipages tiff

Post by XnTriq »

R2D2 ([url=http://newsgroup.xnview.com/viewtopic.php?p=1960#p1960]Multipage PDF to TIFF conversion[/url]) wrote:I succeeded in converting a multipage pdf file to a multipage tiff file with this command:
nconvert -o foo.tif -out tiff -xall -multi bar.pdf
Does this answer your question, Paul?
paquilanti
Posts: 4
Joined: Mon Oct 15, 2012 3:07 pm

Re: Multipages pdf to multipages tiff

Post by paquilanti »

Thanks XnTriq,

I have run your code but I get this error “Error: Don't know how to read this picture” when I tried with those pdf’s versions.

Production: Version: Size: Dimension:
Gpl Ghostscript 8.64 1.4 (Acrobat 5.x) 569KB 210x297
Konika MINOLTA 1.4 (Acrobat 5.x) 114KB 210x297
Acrobat Distiller 8 1.6(Acrobat 7.x) 2,25MB 210x297

Those files are simply scanned documents without fancy stuff (password protection, etc.)

So far I have been able to run those cmds with the document I was after:

Production: Version: Size: Dimension:
unknown 1.3 (Acrobat 4.x) 569KB 210x297

nconvert -out tiff -xall -multi cx.pdf
nconvert -xall -multi -out tiff -o file.tif file.pdf
nconvert -o foo.tif -out tiff -xall -multi bar.pdf

The results Is that I get only the first page of the pdf file.

I start to think that the problem lies to the software to be able to read properly the pdf.

PS
Unfortunately my topic has been duplicated. I did post it on the XnConvert forum but the Moderator thought it belongs here… of course I have tried XnConvert, not luck either!

Paul
User avatar
xnview
Author of XnView
Posts: 43603
Joined: Mon Oct 13, 2003 7:31 am
Location: France
Contact:

Re: Multipages pdf to multipages tiff

Post by xnview »

could you post the pdf file?
Pierre.
paquilanti
Posts: 4
Joined: Mon Oct 15, 2012 3:07 pm

Re: Multipages pdf to multipages tiff

Post by paquilanti »

Hi Pierre,

Sorry for the delay but I’ve been quite busy lately but how..."You cannot post attachments in this forum".

Thanks

Paul
User avatar
XnTriq
Moderator & Librarian
Posts: 6339
Joined: Sun Sep 25, 2005 3:00 am
Location: Ref Desk

Re: Multipages pdf to multipages tiff

Post by XnTriq »

paquilanti wrote:[...] but how..."You cannot post attachments in this forum".
You can upload the sample(s) to a free file hosting service like Wikisend or MediaFire and post the link.
User avatar
RotBlitz
Posts: 6
Joined: Mon Dec 17, 2012 1:47 pm

Re: Multipages pdf to multipages tiff

Post by RotBlitz »

Hello,

I'm facing the same problem. It looks to me this is because NConvert doesn't recognise the format / page size / dimensions correctly if e.g. the orientation changes in the PDF. This can be seen from the output where the input PDF has four pages and can be viewed without problems with e.g Foxit:

Code: Select all

nconvert -out tiff -rmeta -xall -multi -c 2 -dpi 300 -grey 8 -floyd -sharpen 20 -v 1015120145.pdf
** NCONVERT v6.21 (c) 1991-2011 Pierre-E Gougelet (Oct 23 2012/16:18:19) **
        Version for Windows NT/9x/2000/Xp/Vista/7  (All rights reserved)

A Portable Document Format (RGB) was recognized : 1015120145.pdf
    Width:3507 Height:2478 with 16777216 colors
    Nplanes : 1      Bitscount : 24
    Bytes Per Plane : 10521
    xdpi : 300         ydpi : 300
Converting in Greyscale : OK
Apply Sharpen : OK
Conversion of 1015120145.pdf into output.tif OK

A Portable Document Format (RGB) was recognized : 1015120145.pdf
    Width:3507 Height:66 with 16777216 colors
    Nplanes : 1      Bitscount : 24
    Bytes Per Plane : 10521
    xdpi : 300         ydpi : 300
Converting in Greyscale : OK
Apply Sharpen : OK
Conversion of 1015120145.pdf into output.tif OK

A Portable Document Format (RGB) was recognized : 1015120145.pdf
    Width:3507 Height:66 with 16777216 colors
    Nplanes : 1      Bitscount : 24
    Bytes Per Plane : 10521
    xdpi : 300         ydpi : 300
Converting in Greyscale : OK
Apply Sharpen : OK
Conversion of 1015120145.pdf into output.tif OK

A Portable Document Format (RGB) was recognized : 1015120145.pdf
    Width:3507 Height:66 with 16777216 colors
    Nplanes : 1      Bitscount : 24
    Bytes Per Plane : 10521
    xdpi : 300         ydpi : 300
Converting in Greyscale : OK
Apply Sharpen : OK
Conversion of 1015120145.pdf into output.tif OK
The first TIFF page looks brilliant, but as one can see, the correct height of 2478 is not recognised for subsequent pages, but a far too small height of 66 is "assumed". Therefore the pages 2-4 of the TIFF are corrupt, just a small stripe is shown or nothing at all.

Thanks and regards,
RotBlitz
User avatar
RotBlitz
Posts: 6
Joined: Mon Dec 17, 2012 1:47 pm

Re: Multipages pdf to multipages tiff

Post by RotBlitz »

Nevermind. As GhostScript needs to be installed when using NConvert with PDFs, you simply let do it by GhostScript (latest version!):

Code: Select all

gswin32c -sDEVICE=pdfwrite -dSAFER -o 1015120145.%%02d.pdf 1015120145.pdf
rem The last split PDF is just an empty page, so let's delete it:
for %%e in (1015120145.??.pdf) do set last=%%e
del %last%
del 1015120145.pdf
nconvert -o 1015120145.tif -out tiff -rmeta -xall -multi -c 2 -dpi 300 -grey 8 -floyd -sharpen 20 -D -v 1015120145.??.pdf
This even sets correct orientations (portrait vs landscape) for each page. If you want to keep the original orientation of the whole PDF, use this:

Code: Select all

gswin32c -sDEVICE=pdfwrite -sPDFSETTINGS=prepress -dSAFER -o 1015120145.%%02d.pdf 1015120145.pdf
Whatever, this is a workaround only, and it preferably would been fixed in NConvert itself.

Cheers,
RotBlitz
User avatar
xnview
Author of XnView
Posts: 43603
Joined: Mon Oct 13, 2003 7:31 am
Location: France
Contact:

Re: Multipages pdf to multipages tiff

Post by xnview »

Could you send me the pdf?
Pierre.
User avatar
RotBlitz
Posts: 6
Joined: Mon Dec 17, 2012 1:47 pm

Re: Multipages pdf to multipages tiff

Post by RotBlitz »

Just sent. :)
Codemonkey17
Posts: 1
Joined: Fri Oct 25, 2013 4:10 pm

Re: Multipages pdf to multipages tiff

Post by Codemonkey17 »

I am trying to convert a pdf to tiff and am Getting "Error: Don't know how to read this picture (*********.pdf" for every pdf i'm trying to convert. Most are multipage and using -xall -multi -c 1 .... not sure what i'm doing wrong here.

EDIT: As an FYI i do have ghostscript and it works on single page but not multi i get GPL GhostScript 9.10 : Unrecoverable error exit code 1 Error : -100
User avatar
RotBlitz
Posts: 6
Joined: Mon Dec 17, 2012 1:47 pm

Re: Multipages pdf to multipages tiff

Post by RotBlitz »

It seems you need to read and follow my instructions above... :|
Post Reply