tavinus / pdfScale

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

Resize without `-dPDFFitPage` to be able to add right margin #15

Closed boillodmanuel closed 5 years ago

boillodmanuel commented 5 years ago

Hello,

I had use you awesome script (congrats) to add a right margin to document. I was able to do it by removing the -dPDFFitPage argument in resize command.

It could be great to add an option to do that in you script.

Best regards,

Manuel

tavinus commented 5 years ago

Merged on v2.4.4
Thanks for the contribution!!

tavinus commented 5 years ago

BTW, another option would be to run in mixed mode with scale 1 (100% / no scaling).

This way you could run the scaling mode without scaling anything.
And then would be able to position the pages with the parameters:

I am gonna leave the option to disable the fit-to-page option anyways, just changed it to yes/no, but still accepts f/fit.

boillodmanuel commented 5 years ago

👍

tavinus commented 5 years ago

I have been wondering if I should keep the yes/no parameters or just change this to a flag with no parameters. Just because fit-to-page is already ON by default on resize mode, so we just need a flag to disable it. Using y|yes|f|fit is the same as doing nothing.

Also, I have other similar flags to implement. They will not have parameters.

So it would be changing it to something like ---no-fit-page|--no-fit-to-page|--disable-fit-to-page, which would disable it, or else leave as is.

If I want to change that, this is the time, or else it will be disruptive in the future (if people are using it like it is now, which will become invalid). I guess only @boillodmanuel would need to change how he calls it at this point.

boillodmanuel commented 5 years ago

So, it's not a big deal for me :) do what makes more sense for you

Le jeu. 12 sept. 2019 à 21:17, Gustavo Arnosti Neves < notifications@github.com> a écrit :

I have been wondering if I should keep the yes/no parameters or just change this to a flag with no parameters. Just because fit-to-page is already ON by default on resize mode, so we just need a flag to disable it. Using y|yes|f|fit is the same as doing nothing.

Also, I have other similar flags to implement. They will not have parameters.

So it would be changing it to something like ---no-fit-page|--no-fit-to-page|--disable-fit-to-page, which would disable it, or else leave as is.

If I want to change that, this is the time, or else it will be disruptive in the future (if people are using it like it is now, which will become invalid). I guess only @boillodmanuel https://github.com/boillodmanuel would need to change how he calls it at this point.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/tavinus/pdfScale/issues/15?email_source=notifications&email_token=AAEXXDZBFERM45ANSGO4ND3QJKIT5A5CNFSM4H7DFD7KYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD6S6T2A#issuecomment-530967016, or mute the thread https://github.com/notifications/unsubscribe-auth/AAEXXD6HDHG2JTG6JNYV3JTQJKIT5ANCNFSM4H7DFD7A .

tavinus commented 5 years ago

Cool, it has been done on v2.4.8 ( https://github.com/tavinus/pdfScale/commit/82126073fafaf64432adedfeb8ae71f52eab38ff )

Valid options are

Any of those will disable FIT-TO-PAGE on the GS resize call.

Cheers!