YetiForceCRM
YetiForceCRM copied to clipboard
[bug] PDF engine: wrong line-height calculation (?)
🐞 bug report
Tested on YF5.3 and YF 6.1: same behavior
This PDF template produces a wrong PDF file: the template contains some heading lines and a table with some text per row 03ko_pdftemplate.zip
details of issued PDF
- file-size: about 88MB
- number of pages: 1026
- execution time: more than 6 minutes
I don't know where 1026 comes from, but all PDFs with this problem issue a 1026-pages PDF file
here the wrong PDF file 1026ko.zip
I suspect that the problem is the wrong line-height calculation by YF PDF engine
I applied a workaround setting the table line-height into style attribute of the table
here the (workarounded) PDF template (it's the previous one with line-height:16px;
)
03ok_pdftemplate.zip
details of issued PDF
- file-size: about 2MB
- number of pages: 7
- execution: less than 2 seconds
here the workarounded PDF file 1026ok.pdf
🔥 How to trigger the error
Steps to reproduce the behavior:
- check if webserver timeout is actually 600 secs (directive: TimeOut 600 for Apache2 - default is 300 - not enough)
- assign 2G (or 3G) to memory_limit (php.ini and .user.ini)
- upload the 03ko_pdftemplate.xml template file
- open a sale invoice and generate the PDF
- be patient: it takes more than 6 minutes
👎 Actual Behavior
it produces a 1026 pages PDF
👍 Expected Behavior
a 7 pages PDF
👷 Testing
I cannot run it on stable/development instances because memory_limit is too low (Allowed memory size of 1073741824 bytes exhausted
is the message)
- [ ] I confirm that I tested it at https://gitstable.yetiforce.com
- [ ] I confirm that I tested it at https://gitdeveloper.yetiforce.com