Upgrade Issue : Column widths are not correct when using pptxTable vertical=true (^4.5.0)



  • I have several power point files that use the pptxTable vertical=true to output columns in a table. The widths of the column is set so I can fit 3 on the page. In 4.3.1 the widths of the columns were kept when the pptx file was generated. Since the release of 4.5 the width is not longer correct.

    Sample PPTX file looks like this.
    0_1731070769168_upload-c0545b98-2222-4271-afe6-74afcfdaaf85

    In 4.3.1 and 4.4.0 it renders like this:
    0_1731070803910_upload-eb2c5455-b9d2-4015-a149-383b2e36f0a0

    In 4.5.0 and higher it renders like this
    0_1731070831400_upload-6ed3e2b3-9423-4c41-8202-f439305c9ee9

    Here is an example in the playground. https://playground.jsreport.net/w/WadeBenz/UOJiYYgE Since the playground is still running 4.3.6 this renders correctly. If you try to run in later version it will not.

    I have also tried this with new new dynamic column creation using something like this:
    0_1731070356358_upload-5d1a438a-2eaa-4512-b39f-2e021800c411
    This will output something like this:
    0_1731070434984_upload-edbf35ae-f4c0-4500-a876-d06b41b2f204
    Again it does not keep the column width correctly.

    Is there some new setting that I have to set to keep the column widths correct?


  • administrators

    hi!

    Is there some new setting that I have to set to keep the column widths correct?

    no, i am not sure what could be happening for the column width change, we will take a look


  • administrators

    after checking this i now remember what is happening. in 4.5.0 we added the feature to generate dynamic cells to pptxTable. introducing this feature revealed that for both, the vertical and the dynamic mode, it was needed some kind of normalization for the width of the columns, otherwise depending on your data, you will get a table that does not fit in the slide, overflowing the slide boundaries.

    so we added logic to distribute the existing full table width between the total of columns generated after the pptxTable processing. it is not the best but this ensures you don't end with a table that overflows the slide by default.

    now it is clear to me that we need some kind of configuration in pptxTable to allow setting explicit column width, so this can be set and changed per user needs.


Log in to reply
 

Looks like your connection to jsreport forum was lost, please wait while we try to reconnect.