Page 1 of 1

How does convert combine pdf files into one?

Posted: 2014-11-15T12:59:38-07:00
by Tim

Code: Select all

convert 1.pdf 2.pdf 3.pdf my.pdf 
The sizes of 1.pdf, 2.pdf, 3.pdf and my.pdf are 1.4MB, 1.9MB, 2.2MB and 3.7MB respectively.

I found the quality of 3.pdf has been deterioated significantly, and 3.pdf is the one with the largest size in pixels.

So I wonder how does convert combine pdf files into one?

Is it possible to combine pdf files without the negative side effects?

Thanks.

Re: How does convert combine pdf files into one?

Posted: 2014-11-15T13:16:57-07:00
by snibgo
I suppose your inputs are vector, perhaps including text. "Convert" will take every page of each input, rasterising each page (ie converting the page to an image of dots). For the output, it combines all of these raster images into a single pdf.

IM is a raster image processor. If all you want to do it to append each input pdf into a single output pdf, it is the wrong tool for the job.

Re: How does convert combine pdf files into one?

Posted: 2014-11-15T13:20:09-07:00
by Tim
snibgo wrote:I suppose your inputs are vector, perhaps including text. "Convert" will take every page of each input, rasterising each page (ie converting the page to an image of dots). For the output, it combines all of these raster images into a single pdf.

IM is a raster image processor. If all you want to do it to append each input pdf into a single output pdf, it is the wrong tool for the job.
My inputs are raster images.

What is "IM"? Is it Imagick or a command/executable?

What tools to append pdf files? pdftk?

Re: How does convert combine pdf files into one?

Posted: 2014-11-15T13:27:26-07:00
by fmw42
IM is an abbreviation for Imagemagick. Imagemagick is not the same as Imagick. Imagick is an API that makes calls to ImageMagick.

This is an Imagemagick (IM) forum. If you want to discuss Imagick, then use that forum, listed further down the main page.

Re: How does convert combine pdf files into one?

Posted: 2014-11-15T13:44:07-07:00
by snibgo
Yes, IM is an abbreviation of ImageMagick.
Tim wrote:My inputs are raster images.
In that case, perhaps you are not using the correct "-density" setting before each PDF.

Re: How does convert combine pdf files into one?

Posted: 2014-11-15T13:45:42-07:00
by Tim
snibgo wrote:Yes, IM is an abbreviation of ImageMagick.
Tim wrote:My inputs are raster images.
In that case, perhaps you are not using the correct "-density" setting before each PDF.
I remember I read it somewhere that -density only specify the spatial resolution, and it shouldn't degrade the iamge quality. Correct?

Or do you mean the density used for re-rasterizing the individual pdf files? If yes, how shall I figure out what density is used for combine the individual pdf files?

Re: How does convert combine pdf files into one?

Posted: 2014-11-15T13:48:23-07:00
by fmw42
Perhaps it might be useful for you to identify the version of Imagemagick, Ghostscript delegate that is being used for PDFs and your platform. You may need an upgrade to Ghostscript or IM.

Re: How does convert combine pdf files into one?

Posted: 2014-11-15T13:50:43-07:00
by Tim
fmw42 wrote:Perhaps it might be useful for you to identify the version of Imagemagick, Ghostscript delegate that is being used for PDFs and your platform. You may need an upgrade to Ghostscript or IM.
imagemagick 8:6.6.9.7-5ubuntu3.3

ghostscript 9.05~dfsg-0ubuntu4.2

Re: How does convert combine pdf files into one?

Posted: 2014-11-15T13:52:04-07:00
by fmw42
Also it might be useful for you to post the first 3 or 4 pdfs to some place like dropbox.com and put their URLs here so one of us can try duplicating your problem. Also what do you mean by degraded? In size, in sharpness, in color?

6.6.9.7 is ancient. IM is now at 6.8.9.10, so you are about 200 versions old.

Re: How does convert combine pdf files into one?

Posted: 2014-11-15T13:54:25-07:00
by fmw42
The problem with raster pdfs is that the resolution of the image in the pdf may be different from the resolution of the vector shell of the pdf. That makes it hard to combine and maintain good "quality/resolution", unless you extract the images first and then combine them into one final pdf. IM cannot extract the image from a pdf, so you need to find some external tool to do that. They do exist.

Re: How does convert combine pdf files into one?

Posted: 2014-11-15T14:17:05-07:00
by Tim
fmw42 wrote:Also it might be useful for you to post the first 3 or 4 pdfs to some place like dropbox.com and put their URLs here so one of us can try duplicating your problem. Also what do you mean by degraded? In size, in sharpness, in color?

6.6.9.7 is ancient. IM is now at 6.8.9.10, so you are about 200 versions old.
by "degrade", I mean I can't figure out what words in teh part of 4.pdf corresponding to 3.pdf are no matter how much I zoom 4.pdf.

Re: How does convert combine pdf files into one?

Posted: 2014-11-15T15:26:36-07:00
by pipitas
fmw42 wrote:The problem with raster pdfs is that the resolution of the image in the pdf may be different from the resolution of the vector shell of the pdf. That makes it hard to combine and maintain good "quality/resolution", unless you extract the images first and then combine them into one final pdf. IM cannot extract the image from a pdf, so you need to find some external tool to do that. They do exist.
I think you misunderstand:
  1. There is no need to extract images from a PDF.
  2. He has his images already: PNGs and JPEGs (of different sizes).
  3. Tim wants to combine all his images into a single multi-page PDF.

Re: How does convert combine pdf files into one?

Posted: 2014-11-15T15:31:35-07:00
by pipitas
pipitas wrote:
fmw42 wrote:The problem with raster pdfs is that the resolution of the image in the pdf may be different from the resolution of the vector shell of the pdf. That makes it hard to combine and maintain good "quality/resolution", unless you extract the images first and then combine them into one final pdf. IM cannot extract the image from a pdf, so you need to find some external tool to do that. They do exist.
I think you misunderstand:
  1. There is no need to extract images from a PDF.
  2. He has his images already: PNGs and JPEGs (of different sizes).
  3. Tim wants to combine all his images into a single multi-page PDF.
Sorry -- it's clear that I have misunderstood here :-)

I confused this thread opened by Tim with the other one opened by Tim. Though, most likely, both threads deal with the same task he faces -- he originally had 250 PDFs, which he meanwhile converted to individual PDF pages...