tavinus / pdfScale

Bash Script to Scale and Resize PDFs using Ghostscript
MIT License
246 stars 37 forks source link

can i add border to the pages after fitting them #13

Closed sant527 closed 5 years ago

sant527 commented 5 years ago

I want to resize my pdf to A4 but also i want to check the pages how much extent they are resized. So is it possible to add a border to the original pages in the resized document

tavinus commented 5 years ago

Hi! I am not sure I understand your question.
Maybe just RESIZE + SCALE is what you want?

Resize will change paper size and do fit-to-page with it.
Then scale will scale ONLY the contents AFTER it.

That would be something like:

# resize to A4 and scale to 90% (minus 10%)
pdfscale -v -r a4 -s 0.9 myFile.pdf

This would make the paper A4 and shrink the contents (creating a "border").
There are many examples on this on the readme.md.

Few versions ago I also added the option to "paint the border" by adding a colored box behind the full page. As mentioned on https://github.com/tavinus/pdfScale/issues/9 .

Cheers!

tavinus commented 5 years ago

I am going to suppose the answer I provided was the solution, since there was no reply for 16 days.
Feel free to reopen here if you want to.

Cheers! Gus