Blank Pages and Missing Content between Contents

321 views
Skip to first unread message

Kai Pautsch

unread,
Jan 16, 2015, 4:33:49 AM1/16/15
to wkhtmltop...@googlegroups.com
Hello,


My Environment:
  • latest wkhtmltopdf edition (12.2)
  • access wkhtmltopdf from ASP.NET via console command

My Parameters are:

--zoom 1.0 --page-offset -1 --footer-html "C:\temp\footer.html" --header-html "C:\temp\header.html" --header-spacing 10 --footer-spacing 10 toc --xsl-style-sheet "C:\temp\toc.xsl"


I generate a HTML which wkhtmltopdf should convert to a PDF document.

But now from the beginning:
I get a HTML made by a CRM-System with some placeholders in the middle of the document.
Then I replace the placeholders with my content, which I've generated.
The result HTML of this process is sent to the wkhtmltopdf.
The HTML is valid.

An example of one part generated by my tool is a HTML like this:

<div style='page-break-after:always;visibility:hidden'></div>
<table class='numberingTable' style='table-layout: fixed; width: 850px;'>
 
<tr>
 
<td style='width: 48px; vertical-align: top;'>
   
<span style='font-size: 32px; font-weight: bold;'>2</span>
 
</td>
 
<td style='width: 802px;'>
   
<H1>Presssystem 4</H1>
   
<p style="text-align: justify;">
   
<span style="font-size:12pt">
     Das Presssystem 4 ist eine Maschine
   
</span>
   
</p>
 
</td>
 
</tr>
</table>

in the whole HTML all tags which are opened are being closed at the right position in the HTML.
I do a page break before every H1.


Now my Problem:

The content generated by the CRM is displayed correctly. So the beginning and the end are correct.
If there are 5 placeholders I replace with the HTML the last ~2 items are not displayed.
If there are 10 placeholders I replace with the HTML the last ~5 items are not displayed.
The pages for the content are generated. But the pages are empty.
But the end (generated by CRM) and the beginning is always correct.

If I replace the H1 with P the content is displayed.

I hope you can help me to fix this problem.
If you need the whole HTML I can send it.


Thank you and
Best regards,
Kai Pautsch

Pierre Strodiot

unread,
Nov 20, 2015, 7:06:03 AM11/20/15
to wkhtmltopdf General
hi,
did you find something ?
I have the same issue.

Pierre
Message has been deleted

Kai Pautsch

unread,
Dec 22, 2017, 7:52:50 PM12/22/17
to wkhtmltopdf General
Hello Pierre, 

I think that was because I cascaded too much html elements.

Best regards
Kai
Reply all
Reply to author
Forward
0 new messages