Zhi Chen
Zhi Chen

Reputation: 244

How to get my PDF with a dynamic height? Or calculate the height of contents before it is printed

I noticed that in Prestashop, the printing out PDF action is set with certain page size, A4 or else. That includes the page width and height in advance. But, how I just set the width, and let the height be dependent on the contents? In a POS printer, I think many people may face with similar issues. Is there any way to calculate the height of contents before the PDF is generated? Thanks a million for any help!

BTW, prestashop is definitely a powerful template, you can learn a lot from it.

Upvotes: 0

Views: 1193

Answers (1)

Eva
Eva

Reputation: 332

Please look at this solution. I got a perfect solution. Click Here

Upvotes: 2

Related Questions