Open florimon opened 1 year ago
I'm experiencing the same. Is there a solution for this?
Why not just apply the styles to the body element? Is there a reason why that doesn't work?
That does work. I have solved it by setting a fixed size on the container element on the landscape page.
On Thu, Mar 14, 2024 at 6:38 AM Zachary Siegel @.***> wrote:
Why not just apply the styles to the body element? Is there a reason why that doesn't work?
— Reply to this email directly, view it on GitHub https://github.com/danfickle/openhtmltopdf/issues/948#issuecomment-1996388307, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABDWMKA2SQ5HJH5KUUUF2CTYYESSDAVCNFSM6AAAAAA53ZE5ZGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSOJWGM4DQMZQG4 . You are receiving this because you commented.Message ID: @.***>
Hi, first of all thanks for creating an amazing utility.
I ran into the following issue though, here is my 'testcase' html in condensed form:
By putting a 'landscape' CSS class on the "html" element, the "@page landscape" rule is activated, which is evidenced by the produced PDF being in landscape mode, and the page having a thick red border box. Inside this red box however is a much narrower green box around the "html" element - I would have expected this to align on all sides to the red box instead. When you change the "@page landscape" selector to just "@page", the green box does indeed have the same width as the red box.