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.
In 4.3.1 and 4.4.0 it renders like this:
In 4.5.0 and higher it renders like this
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:
This will output something like this:
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?
-
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
-
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.