iTop icon indicating copy to clipboard operation
iTop copied to clipboard

N°2244 - Fix image attributes not being visible in PDF exports

Open Molkobain opened this issue 3 years ago • 0 comments

Symptom

Image attributes not visible in PDF exports when exporting a list of objects, for example Person and their picture attribute.

Current behavior image

image

Expected image

Reproduction

  • iTop 2.7.0 + sample data
  • Open a list of Person objects
  • Export the list in PDF with the picture attribute
  • Open the PDF and see the "Picture" column empty

Cause

During the export, images are rendered in HTML as base64-encoded which is fine, but TCPDF requires a special formatting of the src attribute for it to work.

TODOs

  • [ ] Add unit test on the PDF size (not great, but difficult to do better)

Molkobain avatar Oct 01 '22 16:10 Molkobain