Joining MANY images into a single PDF.

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
Post Reply
RQuadling
Posts: 38
Joined: 2006-12-04T02:48:33-07:00
Location: Plymouth, Devon, UK
Contact:

Joining MANY images into a single PDF.

Post by RQuadling »

Hi.

I've got 264 images which I want to bind into a single PDF file.

I can do this at the command line for a few images ...

Code: Select all

convert img1.tif img2.tif img3.tif big.pdf
and that works fine.

But the actual filenames are ...

Code: Select all

\\BV-CLUSTER-FILE\BANDVULCFAXESRECEIVED\2009\01\22\2009-01-22__09-45__Page-0153__11SAEAJ0.tif
\\BV-CLUSTER-FILE\BANDVULCFAXESRECEIVED\2009\01\22\2009-01-22__09-45__Page-0154__12161ASD.tif
\\BV-CLUSTER-FILE\BANDVULCFAXESRECEIVED\2009\05\29\2009-05-29__09-27__Page-0156__12IXGJHM.tif
So I get a line WAY too long for processing.

I see from

Code: Select all

convert -h
that I can use - as the input.

So, I thought

Code: Select all

convert -write big.pdf -
and then simply paste the filenames to the console.

But nope. I get an error ...

Code: Select all

[Z:\] >convert - z:\big.pdf
convert: no decode delegate for this image format `C:/DOCUME~1/RichardQ/LOCALS~1/Temp/magick-w0Ejp0Ju' @ constitute.c/ReadImage/503.
convert: missing an image filename `z:\big.pdf' @ convert.c/ConvertImageCommand/2772.

[Z:\] >convert - -write z:\big.pdf
convert: no decode delegate for this image format `C:/DOCUME~1/RichardQ/LOCALS~1/Temp/magick-9b-KUPZQ' @ constitute.c/ReadImage/503.
convert: option requires an argument `-write' @ convert.c/ConvertImageCommand/2752.

[Z:\] >convert -write z:\big.pdf -
convert: missing an image filename `-' @ convert.c/ConvertImageCommand/2772.

[Z:\] >convert -write z:\big.pdf
convert: option requires an argument `-write' @ convert.c/ConvertImageCommand/2752.

[Z:\] >convert -write z:\big.pdf
convert: option requires an argument `-write' @ convert.c/ConvertImageCommand/2752.

[Z:\] >convert -write z:\big.pdf --
convert: missing an image filename `--' @ convert.c/ConvertImageCommand/2772.

[Z:\] >convert -write z:\big.pdf -
convert: missing an image filename `-' @ convert.c/ConvertImageCommand/2772.

[Z:\] >convert -- -write z:\big.pdf
convert: unable to open image `-write': No such file or directory @ blob.c/OpenBlob/2476.
convert: missing an image filename `z:\big.pdf' @ convert.c/ConvertImageCommand/2772.

[Z:\] >convert -write z:\big.pdf -adjoin -
convert: missing an image filename `-' @ convert.c/ConvertImageCommand/2772.
What am missing please?

Regards,

Richard Quadling.
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Joining MANY images into a single PDF.

Post by fmw42 »

You will likely need to write a script to add them one at a time (or a few at a time).

For example:

convert rose: rose.pdf
convert rose: rose.pdf rose.pdf
convert rose: rose.pdf rose.pdf

identify rose.pdf
identify rose.pdf
rose.pdf[0] PDF 70x46 70x46+0+0 16-bit Bilevel DirectClass 1.39kb
rose.pdf[1] PDF 70x46 70x46+0+0 16-bit Bilevel DirectClass 1.39kb
rose.pdf[2] PDF 70x46 70x46+0+0 16-bit Bilevel DirectClass 1.39kb
RQuadling
Posts: 38
Joined: 2006-12-04T02:48:33-07:00
Location: Plymouth, Devon, UK
Contact:

Re: Joining MANY images into a single PDF.

Post by RQuadling »

Thank you.
Post Reply