HTML to PDF / DOCX / RTF Java converter library › Forums › PD4ML Forums › Technical questions / Troubleshooting › Page rotate, reset, PDF width
- This topic has 3 replies, 3 voices, and was last updated Jan 16, 2023
22:01:09 byMarioD.
-
AuthorPosts
-
December 6, 2022 at 10:46#35821
Greetings all,
We have a need to set orientation of one of our pages within the PDF document to landscape as its table contains a fair amount of data.
Changing and resetting page orientation works fine but as soon as we try to increase table width to say 100%, or manually set width to anything > 1200 the entire PDF shrinks buy I would say 20% ending with a lot of white space on the right-hand side of the document.
Is there a way around it please?
Thanks in advance.
Regards
-MarioJanuary 16, 2023 at 07:41#35940I don’t even know you can rotate pages. How do you do that exactly? Which version are you using? iPad or Desktop?
January 16, 2023 at 14:07#35947Changing and resetting page orientation works fine but as soon as we try to increase table width to say 100%, or manually set width to anything > 1200 the entire PDF shrinks buy I would say 20% ending with a lot of white space on the right-hand side of the document.
Hi Mario,
an illustrative sample (HTML + resulting PDF) would help a lot to understand the issue.
Can you prepare and share one with us?January 16, 2023 at 22:01#35948It turns out that as soon as I set table width to 100% (in page which is in landscape mode) first page of the PDF shrinks by some 20%.
What fixes first page is to set table width also to 100% but then all columns in that page must also be set to a percentage value, pixels will not work as page will remain shrunk. This is very inconvenient as if you copy-paste HTML into an external editor and resize columns, tab widths will automatically be rest to pixel values which again means that page will be shrunk.
I suppose one thing to try is to hardcode landscape page table width to a pixel rather than percentage value but that is hardcoding and I don’t really like to do that.
I will play with it a bit more, I was hoping that somebody came across this already. If I find a usable solution I will post it here.Just out of interest, if you have the time, try setting orientation of one of pages to landscape then set table width of that page to 100%. Try generating document and let me know if first page shrinks, it will be much appreciated.
Cheers
-M -
AuthorPosts
You must be logged in to reply to this topic.
