744
Views
7
Comments
[Html2PdfConverter] Extra blank page added to generated PDF
Question
html2pdfconverter
Web icon
Forge asset by Guilherme Pereira

Hi all,

when using this plugin to generate a pdf, i always get an extra (blank) page added.
Just downloaded and used the wkhtmltopdf-tool with the same html and 'OtherArgs'. This results in the correct 1-page pdf...

Does somebody knows the answer to my mystery?


Thanks in advance,

Jeroen

2023-12-12 08-53-15
Cristiano Marques
 
MVP

I've had that before, downloaded last dll/exe from the website and it started working.

Can you copy the OtherArgs your sending?


Regards

2019-03-18 10-26-38
Jeroen Vormer

Hi Cristiano,


now i use:

SyntaxEditor Code Snippet

"--encoding UTF-8 --page-size A4 --margin-left 10 --margin-right 10 --margin-top 20 --margin-bottom 0"

I tried to convert a screen with popup-layout and now i get the correct 1 page...
If i use a non-popup layout i get the extra blank page......

2023-12-12 08-53-15
Cristiano Marques
 
MVP

Then its extra CSS that you have on the screen you're trying to send : )

Are you printing a screen to a PDF or creating your own html?


If its the second then just make sure you're using a blank page as a source without any layout.

2019-03-18 10-26-38
Jeroen Vormer

It's an URL to a screen which shows a document (which we are building with the CKEditor Plugin and which is saved as binary data).
In the screen-preparation some variables are changed and then the screen presents the correct document.
The screen did use a custom layout (based on Liverpool-theme) with only a Title and MainContent, but generated a extra page.
Now i just use the simple Layout\LayoutPopup, obviously with only the maincontent:

  

2023-12-12 08-53-15
Cristiano Marques
 
MVP

That is exactly how im using, try this instead:



Don't use any layout.

2019-03-18 10-26-38
Jeroen Vormer

Both will work i guess :-)

Thanks !

2023-12-12 08-53-15
Cristiano Marques
 
MVP

Let me know if it works : )

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.