There are many possibilities for dynamic widths using PDF formats. All of these possibilities will likely involve developing custom software. It can be done, but it isn't trivial. Here are a few ways, though the column does not "stretch" per se -- the width of the column must be known before the report template is created.
It's possible to calculate the width of the column if you know the content and the font attributes (family, weight, size, etc.) in advance.
Dynamic Template
Since JRXML files have a straightforward format, it is possible to write a shell script, batch program, or application to generate .jrxml files. This allows complete control over page and column widths. The Java code will have to compile the .jrxml file before the corresponding .jasper file can be filled.
Dynamic Jasper
Use Dyanmic Jasper to create reports with dynamic widths.
There are many possibilities for dynamic widths using PDF formats. All of these possibilities will likely involve developing custom software. It can be done, but it isn't trivial. Here are a few ways, though the column does not "stretch" per se -- the width of the column must be known before the report template is created.
It's possible to calculate the width of the column if you know the content and the font attributes (family, weight, size, etc.) in advance.
Dynamic Template
Since JRXML files have a straightforward format, it is possible to write a shell script, batch program, or application to generate
.jrxml
files. This allows complete control over page and column widths. The Java code will have to compile the.jrxml
file before the corresponding.jasper
file can be filled.Dynamic Jasper
Use Dyanmic Jasper to create reports with dynamic widths.