生成pdf时如何自动调整Birt报表中的表格单元以适合内容 [英] How to autofit table cells in Birt report to fit content when generating pdf

查看:255
本文介绍了生成pdf时如何自动调整Birt报表中的表格单元以适合内容的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个BIRT报告,该表使用的表中的数据量可变.如果数据太多,那么当我生成pdf时,表格不会调整大小以适合所有内容.使用HTML输出可以很好地呈现它,但是使用pdf时,我的很多信息都被截断了.

I have a BIRT Report using a table with variable amounts of data. If there is too much data then when I generate a pdf the table doesn't resize to fit everything. It renders fine using the HTML output but with a pdf a lot of my information is getting cut off.

如何修复报告,所以无论表中有多少数据,生成pdf时它都会调整大小以适合它?

How can I fix my report so no matter how much data is in the table it'll resize to fit when I generate the pdf?

推荐答案

这应该可以解决问题:

在报表属性中,使用布局首选项:固定布局".

In the report properties, use Layout Preference: Fixed Layout.

以PDF格式运行报告时:

When running the report as PDF:

IRenderOption options = new RenderOption();
PDFRenderOption pdfOptions = new PDFRenderOption(options);
pdfOptions.setOption(IPDFRenderOption.PAGE_OVERFLOW, IPDFRenderOption.OUTPUT_TO_MULTIPLE_PAGES);
pdfOptions.setOption(IPDFRenderOption.PDF_TEXT_WRAPPING, true);
pdfOptions.setOption(IPDFRenderOption.PDF_HYPHENATION, true);
runAndRenderTask.setRenderOption(options);
runAndRenderTask.run();

这篇关于生成pdf时如何自动调整Birt报表中的表格单元以适合内容的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆