I am trying to attach another image to a .pdf file and the resulting output will be a .pdf file.
Running identify on the existing .pdf file gives the following message-
**** Warning: File has an invalid xref entry: 2. Rebuilding xref table.
**** Warning: stream operator not terminated by valid EOL.
**** Warning: stream operator not terminated by valid EOL.
**** This file had errors that were repaired or ignored.
**** The file was produced by:
**** >>>> <<<<
**** Please notify the author of the software that produced this
**** file that it does not conform to Adobe's published PDF
**** specification.
**** Warning: File has an invalid xref entry: 2. Rebuilding xref table.
**** Warning: stream operator not terminated by valid EOL.
**** Warning: stream operator not terminated by valid EOL.
**** This file had errors that were repaired or ignored.
**** The file was produced by:
**** >>>> <<<<
**** Please notify the author of the software that produced this
**** file that it does not conform to Adobe's published PDF
**** specification.
I get the same message if I try to use 'convert' as mentioned below, to attach another image to this file to produce a new .pdf output file. I get an output file, however, it is of poor quality.
convert myjpg.jpg myoriginal.pdf myNewPdf.pdf
Is there a workaround to produce a .pdf file of reasonable quality from my original .pdf file so the document is readable?
The ImageMagick version I am using is 6.8.x
Thanks,
convert command outputs file with poor quality
-
- Posts: 12159
- Joined: 2010-01-23T23:01:33-07:00
- Authentication code: 1151
- Location: England, UK
Re: convert command outputs file with poor quality
We need more information. Ideally, put your inputs somewhere like dropbox.com and paste the URLs here. Also give the exact IM command you are using.
What does "poor quality" mean?
PDF is a vector format. IM is a raster processor. So IM converts your PDF image to pixels, according to the density you provide, and puts those in a PDF wrapper. Density defaults to 72 dpi, which is usually too low for current PDFs.
What does "poor quality" mean?
PDF is a vector format. IM is a raster processor. So IM converts your PDF image to pixels, according to the density you provide, and puts those in a PDF wrapper. Density defaults to 72 dpi, which is usually too low for current PDFs.
snibgo's IM pages: im.snibgo.com
Re: convert command outputs file with poor quality
Thank you for your response. The file that we have is production data and so we cannot share that data. By poor quality, I mean convert command generates a .pdf file, I can open it, however it is not very clear/readable.
I have used a simple convert command so far.
For example: convert myJpg.jpg myPdf.pdf myNewPdf.pdf (for attaching a .jpg file to my original .pdf file)
What are the possible options to try in such cases?
I have used a simple convert command so far.
For example: convert myJpg.jpg myPdf.pdf myNewPdf.pdf (for attaching a .jpg file to my original .pdf file)
What are the possible options to try in such cases?
Re: convert command outputs file with poor quality
We have tried converting the original .pdf as follows-
convert -density 250 myPdf.pdf myNewPdf.pdf, however, that does not seem to help.
convert -density 250 myPdf.pdf myNewPdf.pdf, however, that does not seem to help.
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: convert command outputs file with poor quality
Do you have the same problem with all PDF files? If so, then provide some non-proprietary PDF that others can test and also post your "bad" resulting PDF from the conversion process. You can upload to dropbox.com (public folder) and then put links here to your images.
Without seeing what the exact issue is and what "bad" means, it is hard to know where to begin or what to suggest.
What is the source of the PDF files? When the input is displayed, does it look "good"? Is the PDF a pure vector file or does it contain a raster images?
Without seeing what the exact issue is and what "bad" means, it is hard to know where to begin or what to suggest.
What is the source of the PDF files? When the input is displayed, does it look "good"? Is the PDF a pure vector file or does it contain a raster images?
Re: convert command outputs file with poor quality
Thank you for your response. I was able to resolve this issue by converting each image file into a separate pdf and then by merging all pdfs into one pdf document.