-
-
Notifications
You must be signed in to change notification settings - Fork 37
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Is it possible to increase margin on one side? #4
Comments
Hi! |
Ok, so the way it is centered in scaling mode is by setting the Translation X and Y at the scale call which is injected into the new PDF. I am guessing we would need to fix the translation X to some arbitrary postscript-points (we could use mm and inches and transform them if needed as well, since that is already implemented). However, I am not sure this would work fine in all cases. I will test it to see how it performs. |
Makes me wonder if what you want is just to keep everything in place? Or we could add/remove points from the calculated translations (which are based on the scaling factor). Or we could add a Some references:
|
So, would it work for you if the content was kept in place (top-left corner) when scaling? |
Hi, I have a very similar problem: I want to gain whitespace on one side of the paper by shrinking the content. Currently the content is shrunken and centered. So, If I shrink it by 6%, I have 3% whitespace on either side. If it would be possible to push the shrunken content to the border, I would have the 6% space on one side and therefore enough margin for my needs. |
I see. I will try to find the time to address this soon. |
Hi! This one makes possible to reposition the PDF:
Offset makes possible to fine-tune on top of the base positioning. Please let me know if that solves your problem. Edit 1: v2.2.1 with yet more changes is out! Edit 2: Please note that GS anchors on bottom-left. It may be a bit weird to adjust the x/y offsets because of that. Play a bit with positive/negative x/y offsets so you can understand how it works and then position the PDF where you want it to be. You can certainly use both vert/hor alignment and x/y offseting together. Cheers! |
Using the new xtrans/ytrans features I was able to move my page content changing the margins. It is really great. |
Awesome! I solved this problem using another library, however what you have done seem to solve the original problem. Should I close the issue? |
Cool! Glad to know! 👍 v2.3.0 is out BTW Cheers! |
I want to scale a PDF and left-align the original content. Is this possible?
The text was updated successfully, but these errors were encountered: