YetiForceCRM icon indicating copy to clipboard operation
YetiForceCRM copied to clipboard

[bug] PDF engine: wrong line-height calculation (?)

Open davide-alghi opened this issue 4 years ago • 0 comments

🐞 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:

  1. check if webserver timeout is actually 600 secs (directive: TimeOut 600 for Apache2 - default is 300 - not enough)
  2. assign 2G (or 3G) to memory_limit (php.ini and .user.ini)
  3. upload the 03ko_pdftemplate.xml template file
  4. open a sale invoice and generate the PDF
  5. 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

davide-alghi avatar Dec 18 '20 17:12 davide-alghi