Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    Image's HTML/CSS size attributes ignored in PDF Export

    Version: SmartGWT Power Edition 4.1p20150205

    We are experiencing image size issue in PDF exports since the 4.1 upgrade from 3.1. Our images now are always rendered with their original (image file) size, ignoring their "HTML size". We use both height/width HTML attributes and CSS rules to define sizes.

    I debugged server-side through the PdfExport class and noticed that there is new code involving image loading and processing (B64ImgReplacedElementFactory and ResourceLoader). It could be related.

    Is there any workaround?
    Last edited by zatix; 18 Mar 2015, 10:25. Reason: grammar error and added information

    #2
    Any advice on this?

    Comment


      #3
      We recently upgraded to 5.0p20150828 and this problem persists.

      What do you suggest us to do?

      Comment


        #4
        Thanks for letting us know. We'll take a look

        Comment


          #5
          To make sure we can reproduce this properly - can you please post an example of your export code that results in improper scaling?

          Comment


            #6
            Take for example the pdf_export EE showcase demo:

            http://www.smartclient.com/smartgwtee/showcase/#pdf_export

            and add a Img to the mainLayout setting its size by code or CSS. You will notice that changing the specified size will have no effect on the exported PDF. The original image file size is the only thing that matters.

            Comment


              #7
              Facing exactly the same issue with SmartClient Pro as well (SmartClient_v100p_2015-07-06_Pro). Image attributes (height, width) are being ignored in pdf export rendering and the original image size is always being used instead.

              Comment


                #8
                This was definitely a bug that is now fixed. The fix will be in the Sept 26th build (all affected versions of SmartClient and SGWT are fixed). Apologies for the delay on this - we meant to get to this sooner. Thanks for the clear bug report.

                Comment

                Working...
                X