[poppler] pdfunite - joining multiple pdf files without page break

suzuki toshiya mpsuzuki at hiroshima-u.ac.jp
Fri Mar 30 04:16:32 PDT 2012


Sorry for off-topic discussion. Here I attach sample source PDF and
concatenated GIF. The command I executed is:

	convert \( -size 595x842 xc:white \) \( Book.pdf -crop 595x280+0+0 +repage -gravity South -append \) -compose src-atop -composite CompBooks.gif

--

For first step, please try

	convert Book.pdf -crop 595x280+0+0 +repage -gravity South -append CompBooks.gif

what is 595x280? It is a size of cropped page with 1/3 height. you can check the
pagesize by identify command (of ImageMagick)

	identify Book.pdf

The result would be
"Book1.pdf PDF 595x842 595x842+0+0 16-bit Bilevel DirectClass 63.2KB 0.000u 0:00.029"

Then calculate the 1/3 height as
	echo 842 / 3 | bc
	280

Thus, you can make a concatenated image of the 1/3 upper part of the pages by

	convert Book.pdf -crop 595x280+0+0 +repage -gravity South -append CompBooks.gif

If you execute this command, you may find a transparent background. To make
an image with white background and black ink, I insert a white image with expected
page size as "-size 595x842 xc:white", and combine the images by "-compose src-atop -composite".
The result is following.

	convert \( -size 595x842 xc:white \) \( Book.pdf -crop 595x280+0+0 +repage -gravity South -append \) -compose src-atop -composite CompBooks.png

I wish you can enjoy ImageMagick puzzle.

Regards,
mpsuzuki

Gabor Z. Papp wrote:
> * suzuki toshiya <mpsuzuki at hiroshima-u.ac.jp>:
> 
> | The way to do such with existing tool only would be
> | ImageMagick, but the result would be rasterized picture.
> 
> Could you show me an example commandline how to do this with ImageMagick?

-------------- next part --------------
A non-text attachment was scrubbed...
Name: Book.pdf
Type: application/pdf
Size: 30828 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/poppler/attachments/20120330/358102fa/attachment-0001.pdf>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: CompBooks.gif
Type: image/gif
Size: 3703 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/poppler/attachments/20120330/358102fa/attachment-0001.gif>


More information about the poppler mailing list