Converting Multipage TIFF to PDF
Moderators: XnTriq, helmut, xnview
-
- Posts: 2
- Joined: Tue Mar 04, 2014 3:10 pm
Converting Multipage TIFF to PDF
Hi, I am trying to convert Multipage Tiff with different page sizes into PDF, I am able to do this bying Xnview application but not able to do as command line using Xconvert. I used the similar syntax to convert from PDF to TIFF which is working fine but i am unable to reverse the process, Please help.
"C:\Program files\XnView\NConvert.exe" -xall -multi -out pdf "C:\Temp2\Image2PDF-TEST\Janine\tiff-pdf.Tif"
"C:\Program files\XnView\NConvert.exe" -xall -multi -out pdf "C:\Temp2\Image2PDF-TEST\Janine\tiff-pdf.Tif"
-
- Posts: 2
- Joined: Tue Mar 04, 2014 3:10 pm
Re: Converting Multipage TIFF to PDF
I've managed to get it converting into multipage PDF by using the following command line
"C:\Program files\XnView\NConvert.exe" -xall -multi -out pdf -o "C:\Temp2\Image2PDF-TEST\Janine\tiff-pdf.pdf" "C:\Temp2\Image2PDF-TEST\Janine\tiff-pdf.Tif"
how can i improve the quality?
"C:\Program files\XnView\NConvert.exe" -xall -multi -out pdf -o "C:\Temp2\Image2PDF-TEST\Janine\tiff-pdf.pdf" "C:\Temp2\Image2PDF-TEST\Janine\tiff-pdf.Tif"
how can i improve the quality?
-
- XnThusiast
- Posts: 4176
- Joined: Sun Apr 29, 2012 9:45 am
- Location: Cheltenham, U.K.
Re: Converting Multipage TIFF to PDF
The default Ghostscript dpi is 72, to set a higher value such as 300 please include the following term in your script:MYasin786 wrote:I've managed to get it converting into multipage PDF by using the following command line ...
... how can i improve the quality?
-dpi 300
-
- Posts: 10
- Joined: Wed Mar 25, 2015 9:45 am
Re: Converting Multipage TIFF to PDF
I cannot manage to do the vice versa: I need to convert multipage PDF to a multipage TIFF. Used it like this:
nconvert -o $\%.tif -out tiff -dpi 200 -xall -multi ak_multi.pdf
I get ak_multi.tiff on the output but the file is singlepage with only the first page of original PDF...
nconvert -o $\%.tif -out tiff -dpi 200 -xall -multi ak_multi.pdf
I get ak_multi.tiff on the output but the file is singlepage with only the first page of original PDF...
-
- XnThusiast
- Posts: 4176
- Joined: Sun Apr 29, 2012 9:45 am
- Location: Cheltenham, U.K.
Re: Converting Multipage TIFF to PDF
You need to add this term to create a multipage output file:
Note that creation of a multipage PDF output file isn't supported.
Do you have a listing of the full NConvert syntax?
Code: Select all
-multi : Create a multipage (TIFF/DCX/LDF only)
Do you have a listing of the full NConvert syntax?
Code: Select all
nconvert -help > nconvert_Help.txt
-
- Posts: 10
- Joined: Wed Mar 25, 2015 9:45 am
Re: Converting Multipage TIFF to PDF
As I mentioned I'used -multi to no avail:
nconvert -o $\%.tif -out tiff -dpi 200 -xall -multi ak_multi.pdf
I only need to convert multipage PDF to multipage TIFF, not vice versa.
It seems that in above example either -multi, or -xall doesn't work.
nconvert -o $\%.tif -out tiff -dpi 200 -xall -multi ak_multi.pdf
I only need to convert multipage PDF to multipage TIFF, not vice versa.
It seems that in above example either -multi, or -xall doesn't work.
-
- Posts: 10
- Joined: Wed Mar 25, 2015 9:45 am
Re: Converting Multipage TIFF to PDF
My nconcert version is 6.70.
Tried -multi and -xall in different places but again- output TIFF is singlepaged although input PDF is two-page:
nconvert -o $\%.tif -out tiff -multi -xall ak_multi.pdf
In resulting TIFF file there's only the first page of corresponding PDF file.
Tried -multi and -xall in different places but again- output TIFF is singlepaged although input PDF is two-page:
nconvert -o $\%.tif -out tiff -multi -xall ak_multi.pdf
In resulting TIFF file there's only the first page of corresponding PDF file.
-
- Author of XnView
- Posts: 44883
- Joined: Mon Oct 13, 2003 7:31 am
- Location: France
Re: Converting Multipage TIFF to PDF
Please send me your pdf?gintaras wrote:My nconcert version is 6.70.
Tried -multi and -xall in different places but again- output TIFF is singlepaged although input PDF is two-page:
nconvert -o $\%.tif -out tiff -multi -xall ak_multi.pdf
In resulting TIFF file there's only the first page of corresponding PDF file.
Pierre.
-
- XnThusiast
- Posts: 4176
- Joined: Sun Apr 29, 2012 9:45 am
- Location: Cheltenham, U.K.
Re: Converting Multipage TIFF to PDF
Sorry, I missed the fact that you already had the -multi term included.
The following code works for me in a quick test:
You will probably want to add an output compression option to the above code.
If the above code doesn't work for you, please send your PDF file to Pierre as above, or upload it here.
Note that I normally run my scripts as Windows batch files but I don't think that matters here.
Edit: Code revised to place -multi before -out tiff to avoid creation of a second, spurious output file.
The following code works for me in a quick test:
Code: Select all
nconvert -xall -dpi 200 -multi -out tiff -o Multi_TIFF.tif Multi_PDF.pdf
If the above code doesn't work for you, please send your PDF file to Pierre as above, or upload it here.
Note that I normally run my scripts as Windows batch files but I don't think that matters here.
Edit: Code revised to place -multi before -out tiff to avoid creation of a second, spurious output file.
-
- Posts: 10
- Joined: Wed Mar 25, 2015 9:45 am
Re: Converting Multipage TIFF to PDF
Thank you, Cday your example command. Tried it but again- the output TIFF is only with the first page of PDF.
I attach the PDF I tried to convert.
I attach the PDF I tried to convert.
You do not have the required permissions to view the files attached to this post.
-
- XnThusiast
- Posts: 4176
- Joined: Sun Apr 29, 2012 9:45 am
- Location: Cheltenham, U.K.
Re: Converting Multipage TIFF to PDF
This code works for me:
I've added JPEG compression to reduce the output file size from 22.64MB to a size within the attachment limit.
If you can reproduce that maybe you can work from there...
Edit: Which program are you using to view the output TIFF, I'm wondering if you may only be seeing the first page of a file that is actually multi-page?
Code: Select all
nconvert -xall -dpi 200 -multi -out tiff -c 8 -o 2paged_exmpl.tif 2paged_exmpl.pdf
If you can reproduce that maybe you can work from there...
Edit: Which program are you using to view the output TIFF, I'm wondering if you may only be seeing the first page of a file that is actually multi-page?
You do not have the required permissions to view the files attached to this post.
-
- Author of XnView
- Posts: 44883
- Joined: Mon Oct 13, 2003 7:31 am
- Location: France
Re: Converting Multipage TIFF to PDF
i've tried and the tiff output has 2 pages. Last version? on windows?
Pierre.
-
- Posts: 10
- Joined: Wed Mar 25, 2015 9:45 am
Re: Converting Multipage TIFF to PDF
I'm using Windows Photo Viewer.
Strangely enough, I can see with it that TIFF you've attached is two paged.
I tried your command with JPEG compression, the output still consisted just one page!
There must be something wrong with my nconvert.exe or my OS.
I downloaded 32 bit version NConvert-win.zip and using it on 64bit Windows7.
I'll try 64bit right away.
By the way, is this ok, that nconvert always returns some "my_error_exit..."?
D:\xNconvert\XnView>nconvert -xall -dpi 200 -multi -out tiff -c 8 -o 2paged_exmpl.tif 2paged_exmpl.pdf
** NCONVERT v6.70 (c) 1991-2015 Pierre-E Gougelet (Feb 18 2015/16:43:07) **
Version for Windows NT/9x/2000/Xp/Vista/7 (All rights reserved)
** This is freeware software (for non-commercial use)
my_error_exit...<Not a JPEG file: starts with 0x25 0x50>
JPEG load : 2480 3507
my_error_exit...<Not a JPEG file: starts with 0x25 0x50>
JPEG load : 2480 3507
Conversion of 2paged_exmpl.pdf into 2paged_exmpl.tif OK
Strangely enough, I can see with it that TIFF you've attached is two paged.
I tried your command with JPEG compression, the output still consisted just one page!
There must be something wrong with my nconvert.exe or my OS.
I downloaded 32 bit version NConvert-win.zip and using it on 64bit Windows7.
I'll try 64bit right away.
By the way, is this ok, that nconvert always returns some "my_error_exit..."?
D:\xNconvert\XnView>nconvert -xall -dpi 200 -multi -out tiff -c 8 -o 2paged_exmpl.tif 2paged_exmpl.pdf
** NCONVERT v6.70 (c) 1991-2015 Pierre-E Gougelet (Feb 18 2015/16:43:07) **
Version for Windows NT/9x/2000/Xp/Vista/7 (All rights reserved)
** This is freeware software (for non-commercial use)
my_error_exit...<Not a JPEG file: starts with 0x25 0x50>
JPEG load : 2480 3507
my_error_exit...<Not a JPEG file: starts with 0x25 0x50>
JPEG load : 2480 3507
Conversion of 2paged_exmpl.pdf into 2paged_exmpl.tif OK
-
- Posts: 10
- Joined: Wed Mar 25, 2015 9:45 am
Re: Converting Multipage TIFF to PDF
Just tried Windows 64bit version. Again, windows photo viewer shows only the first page:
D:\xNconvert\XnView64>nconvert -xall -dpi 200 -multi -out tiff -c 8 -o 2paged_exmpl.tif 2paged_exmpl.pdf
** NCONVERT v6.70 (c) 1991-2015 Pierre-E Gougelet (Feb 18 2015/16:46:22) **
Version for Windows Xp/Vista/7 x64 (All rights reserved)
** This is freeware software (for non-commercial use)
my_error_exit...<Not a JPEG file: starts with 0x25 0x50>
JPEG load : 2480 3507
my_error_exit...<Not a JPEG file: starts with 0x25 0x50>
JPEG load : 2480 3507
Conversion of 2paged_exmpl.pdf into 2paged_exmpl.tif OK
D:\xNconvert\XnView64>D:\xNconvert\XnView64\2paged_exmpl.tif
Produced file is 925424 bytes while the file you've sent me is 1331590 bytes,- that clearly shows that the problem is not my windows photo viewer.
D:\xNconvert\XnView64>nconvert -xall -dpi 200 -multi -out tiff -c 8 -o 2paged_exmpl.tif 2paged_exmpl.pdf
** NCONVERT v6.70 (c) 1991-2015 Pierre-E Gougelet (Feb 18 2015/16:46:22) **
Version for Windows Xp/Vista/7 x64 (All rights reserved)
** This is freeware software (for non-commercial use)
my_error_exit...<Not a JPEG file: starts with 0x25 0x50>
JPEG load : 2480 3507
my_error_exit...<Not a JPEG file: starts with 0x25 0x50>
JPEG load : 2480 3507
Conversion of 2paged_exmpl.pdf into 2paged_exmpl.tif OK
D:\xNconvert\XnView64>D:\xNconvert\XnView64\2paged_exmpl.tif
Produced file is 925424 bytes while the file you've sent me is 1331590 bytes,- that clearly shows that the problem is not my windows photo viewer.
-
- XnThusiast
- Posts: 4176
- Joined: Sun Apr 29, 2012 9:45 am
- Location: Cheltenham, U.K.
Re: Converting Multipage TIFF to PDF
I have retested with NConvert x32 6.70 on Windows 7 x64 without any problems, and I don't get the error message in your previous post.
The -c 8 term applies JPEG compression, but in general it would be better also add a -q term to set the quality value, as in -c 8 -q 80. The basic code would therefore become:
The smaller output file size you obtained may possibly be due to a lower JPEQ quality setting somehow being applied.
The command line is very unforgiving of errors, but you seem to be using identical code...
Could you please upload the output file you are obtaining?
The -c 8 term applies JPEG compression, but in general it would be better also add a -q term to set the quality value, as in -c 8 -q 80. The basic code would therefore become:
Code: Select all
nconvert -xall -dpi 200 -multi -out tiff -c 8 -q 80 -o 2paged_exmpl.tif 2paged_exmpl.pdf
The command line is very unforgiving of errors, but you seem to be using identical code...
Could you please upload the output file you are obtaining?