I am using the PDFBox Java library to generate a PDF document. In this document, I have a few pages in portrait orientation and some in landscape orientation. When I print this document in duplex mode, the portrait pages are bound on the long edge, while the landscape pages are bound on the short edge. Is it possible to set printing options in the document so that the binding is always on the long edge, regardless of the page orientation within the document?
Thank you!
Solved! Go to Solution.
Views
Replies
Total Likes
Hi,
First, I'd like to point out that this community is dedicated to supporting Adobe products. Since your question is specifically about PDFBox, I believe you'll find more relevant answers in a forum focused on PDFBox or Java-related topics. That said, I think what you can try is something like the following:
PDPage page = new PDPage(PDRectangle.A4);
page.setRotation(90); // Rotate landscape pages 90 degrees
document.addPage(page);
References:
https://stackoverflow.com/questions/40611736/rotate-pdf-around-its-center-using-pdfbox-in-java
https://lists.apache.org/thread/69b6p6lcm2vrgsy7dm3mypq1rtqzsc5s
Hope this helps
Hi,
First, I'd like to point out that this community is dedicated to supporting Adobe products. Since your question is specifically about PDFBox, I believe you'll find more relevant answers in a forum focused on PDFBox or Java-related topics. That said, I think what you can try is something like the following:
PDPage page = new PDPage(PDRectangle.A4);
page.setRotation(90); // Rotate landscape pages 90 degrees
document.addPage(page);
References:
https://stackoverflow.com/questions/40611736/rotate-pdf-around-its-center-using-pdfbox-in-java
https://lists.apache.org/thread/69b6p6lcm2vrgsy7dm3mypq1rtqzsc5s
Hope this helps
@VikasWa Did you find the suggestion helpful? Please let us know if you require more information. Otherwise, please mark the answer as correct for posterity. If you've discovered a solution yourself, we would appreciate it if you could share it with the community. Thank you!
Views
Replies
Total Likes