left/right margins with @page :first and @page format wrong on 2nd page

36 views
Skip to first unread message

Bruce Woodward

unread,
Nov 15, 2023, 11:52:59 AM11/15/23
to Flying Saucer Users
If I set 1" left/right margins on the first page and 2" margins for all pages, text on the 2nd and subsequent pages wraps as if it was using 1" margins, but is rendered with 2" margins resulting in the text being truncated.
Hard to explain, but here is a simple example that shows the issue:

<html>
 <head>
  <style>
   @page :first { margin:1in}
   @page { margin:2in}
  </style>
 </head>
 <body>
    <p>1. Contrary to popular belief, Lorem Ipsum is not simply random text. It has roots in a piece of classical Latin literature from 45 BC, making it over 2000 years old.</p>
<div style="page-break-after: always"><span style="display:none">&nbsp;</span></div>    <p>2. Contrary to popular belief, Lorem Ipsum is not simply random text. It has roots in a piece of classical Latin literature from 45 BC, making it over 2000 years old.</p>
 </body>
</html>

The images below show the first page paragraph renders correctly (black on the left/right shows the page edges):
Screenshot 2023-11-15 at 9.47.21 AM.png
Text on the second page wraps exactly the same, but the lines get truncated on the right since the margins are 2":
Screenshot 2023-11-15 at 9.47.31 AM.png
I'm sure I've just done something wrong, but can't figure out what. Tried all sorts of variations with no luck. Top/bottom page margins work fine - just the left/right that I'm having issues with.

Andrei Solntsev

unread,
Nov 21, 2023, 2:33:52 AM11/21/23
to flying-sa...@googlegroups.com
Hi Bruce!
Could you please register an issue in github? 


Andrei Solntsev


ср, 15 нояб. 2023 г. в 18:53, Bruce Woodward <bruc...@gmail.com>:
--
You received this message because you are subscribed to the Google Groups "Flying Saucer Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to flying-saucer-u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/flying-saucer-users/78fd2f66-833f-41cd-8072-4818c69480f6n%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages