My goal is to (a) crop the bottom half of each page in a multi-page pdf (b) merge two pages so that the top half of page 1 is now followed by the top half of page 2 in the new document. If necessary I can use pdftk to burst the multi-page pdf into single pages, do the cropping, and then merge them back together.
Any pointers?
I'm using imagemagick 6.6.2-6 from the command-line on a linux ubuntu machine.
crop multi-page pdf and merge 2 pages into 1
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: crop multi-page pdf and merge 2 pages into 1
convert -density XX% image.pdf[0,1] +adjoin -gravity north -crop 50%x50%+0+0 +repage -append resultimage.
However, if your resultimage is pdf, then IM is not a very good tool to use as it goes from vector to raster to vector again. See http://www.imagemagick.org/Usage/formats/#vector
However, if your resultimage is pdf, then IM is not a very good tool to use as it goes from vector to raster to vector again. See http://www.imagemagick.org/Usage/formats/#vector
Re: crop multi-page pdf and merge 2 pages into 1
This is excellent. Many thanks! I've got to do some tinkering to dial in the setting, but it should work well for printing.
What is the (0,1)? Does that specify the pages to work with?
What is the (0,1)? Does that specify the pages to work with?
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: crop multi-page pdf and merge 2 pages into 1
[0,1] is the list of frames/pages (or image sequence numbers) selected to use from the PDF. In this case, only those two will be processed. Be sure you square brackets. see selecting frames at http://www.imagemagick.org/script/comma ... essing.php or image sequences at http://www.imagemagick.org/Usage/basics/#image_seqdre12b wrote:This is excellent. Many thanks! I've got to do some tinkering to dial in the setting, but it should work well for printing.
What is the (0,1)? Does that specify the pages to work with?
- anthony
- Posts: 8883
- Joined: 2004-05-31T19:27:03-07:00
- Authentication code: 8675308
- Location: Brisbane, Australia
Re: crop multi-page pdf and merge 2 pages into 1
Also see Read Modifiers...
http://www.imagemagick.org/Usage/files/#read_mods
http://www.imagemagick.org/Usage/files/#read_mods
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
https://imagemagick.org/Usage/