Page 1 of 1

How to: offset PDF content or embed and reposition PDF

Posted: 2018-08-01T18:55:30-07:00
by jonathanjohnson100
I have a PDF. The content is on the top left quadrant.
I want to print on the top right quadrant.
How do I do this?

Can I use ImageMagick to do this somehow? I wasn't 100% sure, I thought I would ask anyway.

I thought the best way was to make an image from the PDF. And then I can use something else to make a document with image embedded. This works OK, I got a great answer to my last post here.

But... results are poor - there is text which is small font in the content.
The text loses it's sharpness when made into an image.
It's only recently dawned on me why this is - because the text is text in the PDF and not part of a graphic!

2 solutions:

1. Printing output with offset (and scaling) - so output could be another PDF for example.

Or

2. Embedding PDF and keeping as PDF, into another document - importantly, then being able to scale & re-position.

Can I use ImageMagick to solve my problem?

Re: How to: offset PDF content or embed and reposition PDF

Posted: 2018-08-01T19:06:25-07:00
by fmw42
I am not really sure what you are trying to do. Could you post and example input PDF and describe in relation to the PDF what you want to do.

I will point out that ImageMagick is not a vector to vector processor. It will rasterize your PDF and then put that raster result back into a PDF shell. So essentially you can not keep vector text.

You can do that and try to preserve some quality if you rasterize and very high density and then resize the image down to your working pixel size. For example

convert -density 288 image.pdf -resize 25% new image.pdf

Note that nominal pdf density is 72. So 4*72=288 and that is why I resize by 1/4=25%

You can increase the density even further and resize to any amount you want. But the final PDF will no longer have vector text. Text will have been rasterized.

Please always provide your ImageMagick version and platform.