A
A
Anatoly Rodin2018-10-15 11:22:34
css
Anatoly Rodin, 2018-10-15 11:22:34

How to correctly compose a page for generation in PDF?

Hello!
I laid out the page with tables (I can also use divs). Pribluda in PHP generates a pdf file from html. But there is one thing - the blocks move out on top of each other. I've probably scoured the internet for a while, but haven't found anything related.
Advise something, tk. I don't know which way to dig.
Thank you in advance!

Answer the question

In order to leave comments, you need to log in

3 answer(s)
A
Anatoly Rodin, 2018-10-23
@Anatoly_Rodin

Hello!
Thank you for responding. I figured it out myself by making the rules through @print.

V
Vladimir, 2018-10-15
@Casufi

I use headless chrome + puppeteer for HTML conversion. The result is more or less predictable.

T
ThunderCat, 2018-10-15
@ThunderCat

1) make up a separate template in centimeters, set the page size to A4, set all the css for as needed and then save it in html. 2)@print
if the layout is correct, everything will fall one to one with the usual printout from chrome, with the exception of fonts, there are nuances depending on the OS.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question