TIF to PDF creates large PDF file
Moderators: XnTriq, helmut, xnview
-
- Posts: 4
- Joined: Wed Jun 17, 2015 3:58 pm
TIF to PDF creates large PDF file
I am using the 6.56 version of nconvert to convert TIFs to PDF - occasional the PDF will be very large. I have seen a 9 MB file converted into a 96 MB PDF file. An ASP program runs a WSHshell command to execute the nconvert command. This is the command line:
WshShell.Run "c:\\windows\\system32\\nconvert.exe -multi -out pdf -c 5 -o """& TIFPath&"\"&filename2&""" """& TIFPath&"\"&filename&""
Three sets of quotes are used to manage the spaces in the file name.
I downloaded the 6.7 version of nconvert and now I can not get it to work -no errors - it just hangs. When I run the nconvert at the cmd line, the file is converted but since I need to convert sometimes hundreds of files a day, I use an ASP program. I can not use a .bat file since a database is used in the logic.
Any insight to these two problems.
WshShell.Run "c:\\windows\\system32\\nconvert.exe -multi -out pdf -c 5 -o """& TIFPath&"\"&filename2&""" """& TIFPath&"\"&filename&""
Three sets of quotes are used to manage the spaces in the file name.
I downloaded the 6.7 version of nconvert and now I can not get it to work -no errors - it just hangs. When I run the nconvert at the cmd line, the file is converted but since I need to convert sometimes hundreds of files a day, I use an ASP program. I can not use a .bat file since a database is used in the logic.
Any insight to these two problems.
-
- Author of XnView
- Posts: 44922
- Joined: Mon Oct 13, 2003 7:31 am
- Location: France
Re: TIF to PDF creates large PDF file
And what the size pixels of your input file?vickilr0ss wrote:I am using the 6.56 version of nconvert to convert TIFs to PDF - occasional the PDF will be very large. I have seen a 9 MB file converted into a 96 MB PDF file. An ASP program runs a WSHshell command to execute the nconvert command. This is the command line:
WshShell.Run "c:\\windows\\system32\\nconvert.exe -multi -out pdf -c 5 -o """& TIFPath&"\"&filename2&""" """& TIFPath&"\"&filename&""
Strange if it works in command line. No memory problem?I downloaded the 6.7 version of nconvert and now I can not get it to work -no errors - it just hangs. When I run the nconvert at the cmd line, the file is converted but since I need to convert sometimes hundreds of files a day, I use an ASP program. I can not use a .bat file since a database is used in the logic.
Pierre.
-
- Posts: 4
- Joined: Wed Jun 17, 2015 3:58 pm
Re: TIF to PDF creates large PDF file
Dimensions are 2550*3300 pixels 96dpi
No memory problems that I know of.
Unfortunately, I can not send you any files since the information is confidential.
Thx for your help
No memory problems that I know of.
Unfortunately, I can not send you any files since the information is confidential.
Thx for your help
-
- Author of XnView
- Posts: 44922
- Joined: Mon Oct 13, 2003 7:31 am
- Location: France
-
- Posts: 4
- Joined: Wed Jun 17, 2015 3:58 pm
Re: TIF to PDF creates large PDF file
No error message - it just hangs.
-
- Author of XnView
- Posts: 44922
- Joined: Mon Oct 13, 2003 7:31 am
- Location: France
Re: TIF to PDF creates large PDF file
and no problem with previous version?vickilr0ss wrote:No error message - it just hangs.
Pierre.
-
- Posts: 4
- Joined: Wed Jun 17, 2015 3:58 pm
Re: TIF to PDF creates large PDF file
Sorry I did not reply sooner - I had to put this aside to finish some other projects. I can not get the new 6.7 version to work - the old version works but creates huge files, not all the time, just some of the time. I created a text file to log these just to see how wide spread the problem is. It's pretty bad and I don't know when the problem started or if it has been a problem since day one. I was hoping the new version would clear up the sizing up problem but I just haven't had time to work on it.
Thanks for your help. Once I start working on this again, I let you know if I find anything.
Thanks for your help. Once I start working on this again, I let you know if I find anything.
-
- Posts: 3
- Joined: Mon Feb 22, 2016 2:44 pm
Re: TIF to PDF creates large PDF file
I am having the same problem - nConvert version 6.82 running on Window Server 2008R2. I start with a multipage TIFF file, just over 1MB in size. Using the command
C:\Program Files\NConvert-win64>nconvert -o test.pdf -out pdf f40baef8-4245-42c5-bf1e-a30b717bc5d1.tif
The resulting PDF file is over 69MB, which is unacceptably large.
What I am trying to do is in a web based court document inquiry system, produce copies of the documents (that for some reason unknown, are stored in TIFF format) that can be view in a browser. Sure, there are ways to view TIFF files in a browser, but there are problems for Apple Mac users (QuickTime barfs at multipage tiff documents, and you can bet that 99% of all filed court documents have more than one page). Ideally, I would love to have a conversion that would OCR the TIFF document, and produce the resulting PDF document as a text document, and not a (huge) image document.
Any ideas or suggestions would be greatly appreciated.
C:\Program Files\NConvert-win64>nconvert -o test.pdf -out pdf f40baef8-4245-42c5-bf1e-a30b717bc5d1.tif
The resulting PDF file is over 69MB, which is unacceptably large.
What I am trying to do is in a web based court document inquiry system, produce copies of the documents (that for some reason unknown, are stored in TIFF format) that can be view in a browser. Sure, there are ways to view TIFF files in a browser, but there are problems for Apple Mac users (QuickTime barfs at multipage tiff documents, and you can bet that 99% of all filed court documents have more than one page). Ideally, I would love to have a conversion that would OCR the TIFF document, and produce the resulting PDF document as a text document, and not a (huge) image document.
Any ideas or suggestions would be greatly appreciated.
-
- XnThusiast
- Posts: 4186
- Joined: Sun Apr 29, 2012 9:45 am
- Location: Cheltenham, U.K.
Re: TIF to PDF creates large PDF file
Your code doesn't include a compression term, so the resulting files are uncompressed...KenJRay wrote:I am having the same problem - nConvert version 6.82 running on Window Server 2008R2. I start with a multipage TIFF file, just over 1MB in size. Using the command
The resulting PDF file is over 69MB, which is unacceptably large.Code: Select all
C:\Program Files\NConvert-win64>nconvert -o test.pdf -out pdf f40baef8-4245-42c5-bf1e-a30b717bc5d1.tif
Code: Select all
-c value : Compression number (default : 0)
PDF : 1 (Fax), 2 (Rle), 3 (LZW), 4(ZIP), 5 (JPEG)
Code: Select all
-q value : JPEG/PNG/FPX/WIC/PDF quality (default : 100)
Adobe Acrobat, Abbyy FineReader or Nuance Omnipage can do that, but for a vector text file rather than a searchable-image file Adobe Acrobat ClearScan would probably be the safest option, if it is important to preserve the page layout and you wish to avoid proof-reading, although ClearScan can at least theoretically introduce typos in some circumstances, which might be a consideration. Any of those commercial programs can produce a searchable-image file satisfactorily, and with suitable compression file size shouldn't be a serious issue. Batch conversions would probably require the higher-priced versions, though.Ideally, I would love to have a conversion that would OCR the TIFF document, and produce the resulting PDF document as a text document, and not a (huge) image document.
-
- Posts: 3
- Joined: Mon Feb 22, 2016 2:44 pm
Re: TIF to PDF creates large PDF file
Thanks - the -c 1 option worked perfectly.
-
- XnThusiast
- Posts: 4186
- Joined: Sun Apr 29, 2012 9:45 am
- Location: Cheltenham, U.K.
Re: TIF to PDF creates large PDF file
What file size did your original 69MB PDF reduce to with Fax compression, out of interest?KenJRay wrote:Thanks - the -c 1 option worked perfectly.
To process multi-page files, you will need to add a -multi term to your code otherwise only the first page of the TIFF will be saved:KenJRay wrote:... you can bet that 99% of all filed court documents have more than one page...
Code: Select all
-multi : Create a multi-page (TIFF/DCX/LDF/PDF only)
Code: Select all
nconvert -out pdf -multi -o Output.pdf M-TIFF.tif