Print-to-PDF challenges. Who could help me with any of these three?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • mbrands
    Junior Member
    • Feb 2018
    • 23

    Print-to-PDF challenges. Who could help me with any of these three?

    We use the print-to-pdf function to create reports with some tables with data. I keep running in to a couple of challenges and i hope someone can point me in the right direction.

    1. Images are uploaded and used in the PDF without resizing

    Users upload images that are used in the report. But if they upload a 5MB image, there will be a 5MB image in the PDF. Is there any way to use the thumbnails or compress the images in any way?

    2. Images in EspoCRM are automatically corrected in orientation, they are not in the PDF

    If a user uploads a image that was taken upside down or sideways, EspoCRM corrects this and shows the images normally. If we generate a PDF, the orientation is taken from the image and the image shows sideways of upside down. Is there any way to force the PDF engine to do this as well?

    3. I cant figure out how to define cell background color in tables in DOMPDF (ANSWERED)

    While i got this to works in Tcpdf perfectly fine, i tried many times and failed with DOMpdf. Any help on this? I want to switch to DOMPDF so i can generate PDF's for multiple records at ones.
    Last edited by mbrands; 08-20-2024, 11:15 AM.
  • yuri
    Member
    • Mar 2014
    • 8440

    #2
    No problem with the table cell background. v8.3.

    PDF:

    Click image for larger version

Name:	image.png
Views:	136
Size:	6.0 KB
ID:	109512

    Template:​

    Click image for larger version

Name:	image.png
Views:	98
Size:	36.8 KB
ID:	109513
    If you find EspoCRM good, we would greatly appreciate if you could give the project a star on GitHub. We believe our work truly deserves more recognition. Thanks.

    Comment


    • mbrands
      mbrands commented
      Editing a comment
      Is it possible that it only works with rgb color? Because i used html colornames and hex codes in my templates
  • mbrands
    Junior Member
    • Feb 2018
    • 23

    #3
    Click image for larger version

Name:	image.png
Views:	105
Size:	28.7 KB
ID:	109518

    Click image for larger version

Name:	image.png
Views:	89
Size:	7.8 KB
ID:	109519
    I found out the tableTag doesnt work with styling

    Comment

    • yuri
      Member
      • Mar 2014
      • 8440

      #4
      tableTag trTag and tdTag are not recommended anymore. They have never supported 'style'.
      Last edited by yuri; 08-20-2024, 02:51 PM.
      If you find EspoCRM good, we would greatly appreciate if you could give the project a star on GitHub. We believe our work truly deserves more recognition. Thanks.

      Comment

      • mbrands
        Junior Member
        • Feb 2018
        • 23

        #5
        Bump? Anyone a lead on the image issue's (rotation and size)?

        Comment

        Working...