I have a problem with wkhtml and php. In every document I create, I have a blank page as the last page. Here is my exec:
exec('/usr/local/bin/wkhtmltopdf --enable-javascript --margin-top 30mm --margin-bottom 25mm --margin-right 5mm --margin-left 10mm --orientation landscape --header-html "'.$env['HEADER'].'" --header-spacing 10 --footer-line --footer-html "'.$env['FOOTER'].'" --footer-spacing 5 -s A4 --dpi 96 --encoding utf-8 --print-media-type --image-quality 100 --minimum-font-size 8 "'.$env['CONTENT'].'" - '.$_SERVER['DOCUMENT_ROOT'].'/tempo/mypdf.pdf');
The content itself is correct, but no matter how much or less content on the last page, an additional page without content is added. Is there something wrong with my executed script?
EDIT: What I have found out so far is that this problem only occurs when adding a header and footer to my page.
SOLUTION: I finally figured it out. In the exec script, I have a β-β before, just before the file definition. This brings up an extra page.
source share