Question regarding WeasyPrint: I looking for a pdf generator which can add graphic with overlay text on the bottom of the last page (first page=last if only one page). So far I haven't found a solid solution. Can WeasyPrint do this?
Guillaume Ayoub
@liZe
@maxillirator:matrix.org You could use an absolute block at the end of your HTML, it will be displayed only on the last page, where you want.
Thanks for response, found a solution but don't think this would work. Absolut position breaks height calculations which could result in overwrite if I have flowing elements. I.e. unpredictability.
just wondering if weasyprint can have support for non page canvas based rendering?
basically what we are doing is we use wkhtmltoimage to render html and print on roll paper receipt (80mm supermarket receipt)
in this use case there is no frame in our rendering scenaro
so I wonder if weasyprint can also support something similar to wkhtmltoimage on a virtual borderless canvas?
Guillaume Ayoub
@liZe
Hi @gw1120:matrix.org
If your goal is to get one canvas whose height depends on the content, WeasyPrint is probably not what you’re looking for: Kozea/WeasyPrint#193
It may be possible to "hack" WeasyPrint to get what you want (some comments in this issue are quite creative), but to be honest it will be much easier to get what you want with a headless browser