Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #26903

    I’ve got a issue where a common htmlwidth is set for all pd4ml page break element. But I’m getting the first page with a longer width.

    <!DOCTYPE html>
    <html>
    <head>
    <title>Title</title>
    <style type="text/css" media="all">
    * {margin: 0;padding: 0;}
    body{margin:0;padding:0;font-family:Arial,Helvetica,sans-serif;color:#333;width: 1335px;}
    table{border:0; border-spacing:0;width: 100%;}
    table td{vertical-align: top;-webkit-text-size-adjust: none;}
    img{border: 0;page-break-inside: avoid;}
    </style>
    </head>
    <body>
    <pd4ml:page.footer>
    footer text
    </pd4ml:page.footer>
    
    <pd4ml:page.header>
    header text
    </pd4ml:page.header>
    
    <div class="coverpage" style="margin-top: 0;">
    <pd4ml:page.break htmlwidth="1335"/>
    page1
    </pd4ml:page.break>
    </div>
    
    <div class="container" style="margin-top: 0;">
    <pd4ml:page.break htmlwidth="1335"/>
    page2
    </pd4ml:page.break>
    </div>
    
    <div class="container" style="margin-top: 0;">
    <pd4ml:page.break htmlwidth="1335"/>
    page3
    </pd4ml:page.break>
    </div>
    
    </body>
    </html>
    </pd4ml:transform>

    In the above code, except the first page, other two pages appear correctly. The first page content are hidden for some reasons.

    #29481

    You can define htmlWidth for the entire document (including the first page) with pd4ml.setHtmlWidth() API call.

    impacts htmlWidth of subsequent pages only. So with a page break directive it is not possible to define htmlWidth for the first page.

Viewing 2 posts - 1 through 2 (of 2 total)

The forum ‘HTML/CSS rendering issues’ is closed to new topics and replies.