-
Notifications
You must be signed in to change notification settings - Fork 170
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
How do I change context orientation? #143
Comments
the shortest path to success is o add make this: |
Hi, I tried this on the As the original source pdf is confidential in nature, I cannot just link it here. Is there another way of providing it to you? Thanks. |
i'm not sure that i understand the problem then.
well. if that's true than it goes against my understanding on how things work in PDF files in general, and i will definitely need the file. either this, or you can debug this and get to tell me what's going on. or just rotate the text to be the way that you want it to be using the cm operator. you can send me the file via [email protected]. if you deem it necessary i can also sign an nda. |
Yes your understanding is correct. I agree it looks very weird and given that I only have high level knowledge of PDF I am not sure how I would go about debugging at this point, so definitely highly appreciative of you helping to look into this. One interesting side point - based on what you are saying, is portrait vs landscape as simple as a comparison of the width vs the height and see which side is larger? I.e. is there no place in PDF that specify the orientation in terms of a default rotation, i.e. does x grow on the width side or the height side? I'm sending the file to your email address in the next few minutes. Again - thank you very much for the help to look into this. |
ok. got the file. everything is actually fine and works as expected actually. the page is using a "rotate" parameter that is set to 90. If you want to align anything that you'll add to the rotated form of the page, you'll have to take that into account, or change the page orientation. you can get that info with page parsing: |
Hi,
I'm trying to modify an existing PDF file, which happens to be oriented to landscape mode.
When I run the sample code below.
It turns out that the text
Test me out
gets written to the top left corner vertically, which is of a different orientation from the rest of the page, instead of the expected bottom left corner horizontally.Is there a way for me to 1) detect the orientation of the page, and/or 2) create the modify context with the same orientation as the page, and/or 3) arbitrarily change the orientation of the context?
Thanks for your help.
The text was updated successfully, but these errors were encountered: