Skip to content
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

Landscape Orientation for PDF's #173

Closed
klabarge opened this issue Feb 25, 2017 · 18 comments
Closed

Landscape Orientation for PDF's #173

klabarge opened this issue Feb 25, 2017 · 18 comments

Comments

@klabarge
Copy link
Member

QZ Tray Version: 2.0.3-RC4
OS: Windows 10

When I try to use orientation: landscape with PDF's, the PDF prints portrait.

This feature worked in the official 2.0.2 release.

@klabarge klabarge changed the title Landscape Orientation for PDF's on Windows Landscape Orientation for PDF's Feb 25, 2017
@klabarge
Copy link
Member Author

This is also not working on Ubuntu.

This feature works on macOS.

@tresf
Copy link
Contributor

tresf commented Feb 26, 2017

Since macOS uses a different technique for rotation (due to #174) That make sense Mac isn't affected.

@klabarge can you please roll back to 3c9361d (git reset --hard 3c9361d) and see if it fixes it? That's just before BookBundle.java was introduced.

@tresf
Copy link
Contributor

tresf commented Feb 26, 2017

Confirmed, reverting to 3c9361d reverses the bug. Now to find out why.... 😕

@akberenz
Copy link
Member

So even though we set the orientation under the attributes, the Book/Pageable does not seem to see it unless it is also set on the page format object as well.
Should be fixed under 667a6b1

@tresf
Copy link
Contributor

tresf commented Feb 27, 2017

@klabarge can you please confirm? Updated RC installer available here.

@klabarge
Copy link
Member Author

  1. The PDF rotates now, but does not scale correctly, the bottom of the page is cut off. This happens on both Windows and Ubuntu
  2. On Mac, setting landscape now only prints the right-half of the PDF, and does not change the orientation

⛔️ Windows 2.0.3-RC5 using landscape

image

⛔️ macOS 2.0.3-RC5 using landscape
image

macOS 2.0.3-RC4 using landscape
image

Note: Disregard the way the text is displayed, that is due to the zoom size I have set to the PDF.

@akberenz
Copy link
Member

akberenz commented Mar 1, 2017

Going back to what we did on 2.0.1 (when using just Book object) seems to present expected behavior.
Ready to test again under cc089f4

@tresf
Copy link
Contributor

tresf commented Mar 1, 2017

@klabarge can you please confirm? Updated RC6 installer available here.

@klabarge
Copy link
Member Author

klabarge commented Mar 2, 2017

This patch passed on all OS's 👍

@klabarge klabarge closed this as completed Mar 2, 2017
@edsonpa
Copy link

edsonpa commented Jun 12, 2017

Hello Guys, I encounter the same problem, how can I come up with this solution.

@tresf
Copy link
Contributor

tresf commented Jun 12, 2017

This issue was closed as fixed. If you are compiling from source I would recommend doing a tag checkout of v2.0.3 until we've completed the release of 2.0.4.

@edsonpa
Copy link

edsonpa commented Jun 12, 2017

Actually I'm using the executable available for download, in version 2.0.3

We have the whole program developed and in the homologation part we are faced with this problem.

I need to sort this out to buy your support and generate the necessary certificates.

But this deadlock is delaying everything, please is there not something like the one that was done in the above solution?

@tresf
Copy link
Contributor

tresf commented Jun 12, 2017

@edsonpa you can try our latest release-candidate here: https://github.com/klabarge/tray/releases/tag/v2.0.4-RC.1

@edsonpa
Copy link

edsonpa commented Jun 12, 2017

Unfortunately it did not work.
We notice that the printing area has 270 mm already discounting 0.5 mm in the initial edge.
The cut occurs 20 mm from the end edge.
So I came to the conclusion that there is a size limit for the 300mm x 216mm landscape format, if that exists where I can change this in the source code to create a version that suits us for this dimension.

@akberenz
Copy link
Member

@edsonpa, this issue is about landscape oriented documents printing with a portrait orientation. What you describe sounds like an issue with content being cut off. You may be better off opening a new issue and thoroughly describing the issue you are seeing. (configurations, expected/actual results, etc)

Also, we don't limit sizing anywhere in our code. so it sounds like you may need to make use of the pageWidth and pageHeight data options. (See #193 for a discussion on this setup with landscape documents)

@edsonpa
Copy link

edsonpa commented Jun 12, 2017

Thanks for the answer but that's not it, we did the tests on more than one operating system on more than one physical printer is the error is the same, we created documents on other platforms in both guidelines.
The printout is cut about 20 mm at the bottom of the page.
As I mentioned the error that occurs is the same as described here (Landscape Orientation for PDF's # 173

The situation is the same as mentioned above.

@klabarge
Copy link
Member Author

@edsonpa

I still believe your issue is different. This issue is stating that a document printed portrait and landscape result in the same print.

You are using a custom page size of 300mm x 216mm. You would need to specify (in your code) to use orientation: landscape as opposed to flipping the dimensions of your PDF.

I am going to reply to your google groups post with more information.

@edsonpa
Copy link

edsonpa commented Jun 12, 2017

thank you

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants