Open GELight opened 3 years ago
Seems like 3 years later the only option for a Pdf export still is "random cutout". Any page setting other than orientation and paperSize is ignored. Is there a way to work around this? Is there a trick to specify what to print?
I believe you will get the desired result with Mpdf, but not, as reported, with Tcpdf, nor with Dompdf. Mpdf recognizes and acts on the CSS tags which we use to achieve this; the other two do not. If you can think of a different way to accomplish this for the others, let us know.
We have not yet figured out how to implement PrintArea for Html/Pdf. See issue #3941. It's on my to-do list, but I haven't made much progress.
@oleibman Thank you for the hint. I should have tried Mpdf. That works so much better. I tested every other converter and the outputs all looked very similar, so I thought it was a config/general problem.
This is:
What is the expected behavior?
The hole tables of all sheets will rendered in a PDF.
What is the current behavior?
Example 1: If I have the cells A1 until Z1 with a value, in my generated PDF only the cells A1 until S1 (S1 is cutted off) will rendered. No more pages are generated. Example 2: Regardless of the settings in the page setup (setPrintArea, setFitToWidth, setFitToHeight) in the PDF there will not render all cells of my row again. Example 3: For testing I generate also an excel file. In the page break preview of Excel there I can see multiple print areas like below. If I open it and look into the print preview, the following pages will rendered as seperate pages. If I generate my PDF with PhpSpreadsheet then only the pages 1, 4 and 7 are rendered iside the PDF. (S1 is cutted off on each page)
What are the steps to reproduce?
This is my minimal example script where I tested all possible configurations etc ...
Which versions of PhpSpreadsheet and PHP are affected?
Environment PHP 7.4
composer.json
Output of my PDF (screenshot):
Only in PDF "NO MORE" pages available. Page setup for fit To... or using printArea has no effect
I cannot find any help in documentation.
Best regards, Mario