Resize columns automatically in PDF report

I am generating a PDF report from a matlab table in a “FormalTable” style but the coloumns width does not get resized automatically. I tried to use the class “mlreportgen.dom.ResizeToFitContents” to resize the columns of a table. But this doesn’t work with the PDF document reports. Any help here would be appreciated.

Antworten (1)

Akash
Akash am 12 Jul. 2024

0 Stimmen

Hi,
Starting from MATLAB R2017a and newer versions, the "ResizeToFitContents" method works correctly for resizing columns in PDF documents.
As a workaround, you can manually resize the columns at runtime by setting the width of each column proportional to the longest word in the column.
For more information, you can refer to the following article on MATLAB Central:-

Kategorien

Mehr zu MATLAB Report Generator finden Sie in Hilfe-Center und File Exchange

Produkte

Version

R2021b

Gefragt:

am 15 Nov. 2023

Beantwortet:

am 12 Jul. 2024

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by