Replies: 1 comment
-
Hmmm. Yes, I see the same sort of behavior in our samples - 36writeLineChart1.pdf and 36writeMultiple1.pdf. The corresponding html files are fine. I think what is happening is something like the following:
I'm not sure what, if anything, we can do. One thing that works, up to a point, is adding a colspan to the first cell over which the cell is overlaid. This won't always be appropriate, but it should be okay in a Pdf. You can get the colspan by merging the cells in its first row over which you've overlaid it. We also provide a means of editing the html before submitting it to Pdf. Another solution is to just generate Html, and then use the "print to Pdf" option to manually generate your file. I recognize that there are severe limitations in all of those suggestions. Perhaps we can detect this situation at run-time and generate the colspan on our own even when the cells aren't merged. It would need a lot of study. |
Beta Was this translation helpful? Give feedback.
-
I want to use PHPSpreadsheet to convert excel files (xlsx) to pdf. Those files include charts that have a width of 4 columns, but when it writes the pdf, the charts are shown as 1 column width so they look much smaller than original ones.
I am using Tcpdf, with other pdf libraries (like mPDF and Dompdf) I have got worse results.
I have also tried to modify the charts using this options with no success.:
This is the original code I am using, without chart modifications:
Orginal Excel file:
Result:
Beta Was this translation helpful? Give feedback.
All reactions