A
A
Alexander Gamov2017-08-07 15:33:29
PHP
Alexander Gamov, 2017-08-07 15:33:29

How to specify dynamic page height with dompdf?

I use the dompdf library to generate checks for printing on terminals. (html template is filled with data, then converted to pdf, then printed).
The problem is that the table of goods is displayed in the check and it can be of any height, and the size of the PDF document must be set before rendering.
So far, I see only an option - for each product, set a fixed cell size in height (take a maximum of two lines as a basis) and, based on the quantity, calculate how much to add the height of the document to the "empty receipt".
Perhaps there is another option or can you advise the implementation of the task through another library?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Alexander Aksentiev, 2017-08-07
@Sanasol

why is the size of the pdf before rendering, in the same place the pages go as many as you like in html form?

K
kapustinomm, 2017-12-27
@kapustinomm

Were you able to solve this problem? Unsubscribe pliz
https://vk.com/id151947346

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question