html2pdf: convert only at the end