Expanding PDF schmatic to 4 cropped images to be printed nicely

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
abduct
Posts: 20
Joined: 2016-03-22T17:07:45-07:00
Authentication code: 1151

Expanding PDF schmatic to 4 cropped images to be printed nicely

Post by abduct »

I have a PDF document that has a single page that is a wiring diagram/schematic of a project I am working on which is densely populated.

If I try to print out this schematic on a single piece of paper it is unreadable due to the amount of data that is on the page.

My solution I have attempted is converting the PDF to PNG via:

Code: Select all

convert -density 1500 -quality 100 schematic.pdf schematic.png
This is all fine and provides a png file that is nearly identical in readability as the pdf on a computer screen.

My next step to solving this was to use the crop feature:

Code: Select all

convert -crop 25%x25% schematic.png cropped_schematic.png
This does a good job at creating 4 separate images so that I can print one image per piece of paper.

Now the problem is that when printing the page, data gets trimmed off or scaled probably due to printer settings. Is there a way to tell imagemagick to overlap the cropped images by say 5%? so that it will crop the image in 4 quadrants, but each edge will contain a further X% of the next quadrant touching each edge?

This would solve my problem because then I can simply line up the images easier via overlapping the paper before lamination so that no data is lost due to scaling that can happen while printing. Any data that would be cropped or loss would be within that X% margin that is added to each 25% quadrant.

I hope this makes sense.

Thanks for any help.
User avatar
GeeMack
Posts: 718
Joined: 2015-12-01T22:09:46-07:00
Authentication code: 1151
Location: Central Illinois, USA

Re: Expanding PDF schmatic to 4 cropped images to be printed nicely

Post by GeeMack »

abduct wrote:This would solve my problem because then I can simply line up the images easier via overlapping the paper before lamination so that no data is lost due to scaling that can happen while printing. Any data that would be cropped or loss would be within that X% margin that is added to each 25% quadrant.
Try something like this...

Code: Select all

convert -density 1500 schematic.pdf -crop 2x2+750+750@ -scene 1 cropped%01d.png
That should crop your image into 4 equal pieces, two rows and two columns, with a 1500dpi resolution, and a 1/2 inch overlap of the parts. It will name them cropped1.png, cropped2.png, cropped3.png, and cropped4.png. The "-scene 1" tells it to start numbering at 1 instead of zero which would be the default.
abduct
Posts: 20
Joined: 2016-03-22T17:07:45-07:00
Authentication code: 1151

Re: Expanding PDF schmatic to 4 cropped images to be printed nicely

Post by abduct »

Thanks that worked wonderfully. With a bit of trimming and lining up it worked out good.

Thanks again.
Post Reply