![]() ![]() It's not 100% perfect but works well enough in my case so thought someone else would be interested in this while we keep waiting for a potential fix to this issue. And then setting the page_height and page_width to the HTML-document size by calculating the pixels to cm. I worked around this problem by setting all page margins to zero with the margin_top, margin_bottom, margin_left, margin_right parameters. ![]() Too bad since this would be a great feature that is requested a lot. This thread has been inactive for a long time since my last post. Is there any way this can be done now? There is a chance I've missed something in the docs. If wkhtmltoimage could export to PDF or wkhtmltopdf supported something like -auto-size to get custom-sized single-paged documents, the solution to the problem I describe would be possible. Thus, the situation is resolved only partially in both scenarios. However, it is impossible to tell wkhtmltopdf to keep the size of a page minimum, so I can’t start using this script instead of wkhtmltoimage as automatically defined dimensions of an image are in priority. If I try to convert HTML to PDF in one step using wkhtmltopdf, the links remain, which is great (thanks to a new feature). Resulting files are then used in a latex project, that’s the reason why they can’t be raster or have predefined dimensions.Īll works fine except one thing: the links defined in the HTML get lost. ![]() First, I get an SVG using wkhtmltoimage and then convert it to PDF with inkscape. As mentioned earlier, to get a PDF of a minimum possible size, I'm doing HTML conversion in two steps. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |