水晶报表对齐是否依赖打印机,如果系统中没有安装打印机会怎样?
在我们的应用程序中,我们使用 java 代码将 RPT 导出为 PDF 格式。在我们的大多数环境中,PDF 都能正确生成。但目前我们有了一个新的环境,在这个环境中生成的一些 PDF 存在对齐问题。问题在于边距大小。在新的环境中,巨大的利润即将到来,这导致了调整问题。但所有的报告都没有这个问题,只有一些导出的 RPT 有它们。我遇到对齐问题的新环境没有任何打印机。但对齐正确的环境有打印机。 RPT 导出以任何方式取决于机器中安装的打印机
要找出页边距大小,我将系统输出
iPrintOptions.getPageMargins().getLeft()+" ###### getRight:"iPrintOptions.getPageMargins() .getRight() " ###### getTop:" iPrintOptions.getPageMargins().getTop() " ###### getBottom:" +iPrintOptions.getPageMargins().getBottom()
结果是 getLeft(): 1440 ###### getRight:1440 ###### getTop:1440 ###### getBottom:1440
但是当我系统输出时正确生成 PDF 的环境中的边距值是 360 , 360, 360, 360
我不明白这个值是从哪里来的1440值是从哪里来的。
为 RPT 配置的边距为 0.150 英寸、0.250 英寸等,
您能帮我解决此对齐问题吗?
谢谢 安
In our application we export RPT to PDF format using java code. The PDF's are generated correctly in most of our environments. But currently we got a new environment and in this environment some of the PDFs generated have alignment issues. The issue is with the margin size. In the new environment, big margins are coming which is causing alignment issue. But all the reports do not have this issue only some RPT's that are export have them.The new environment where I have alignment issue do not have any printers. But the environments where the alignment is correct have printers. Dose RPT export in any way depend on printers installed in a machine
To find out what the margin size was I put system outs
iPrintOptions.getPageMargins().getLeft()+" ###### getRight:"iPrintOptions.getPageMargins().getRight() " ###### getTop:" iPrintOptions.getPageMargins().getTop() " ###### getBottom:" +iPrintOptions.getPageMargins().getBottom()
the result was getLeft(): 1440 ###### getRight:1440 ###### getTop:1440 ###### getBottom:1440
But when I system out margin values in the envionements where the PDFs are generated correctly the values are 360 , 360, 360, 360
I do not understand from where this 1440 value is coming from.
The margin configured for the RPT is .150 in,.250 in etc
Could you please help me resolve this alignment issues.
Thanks
Ann
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
尝试打开报告并转到文件、页面设置。勾选“无打印机(优化屏幕显示)”选项。你的问题应该消失。
Try opening the report and going to file, page setup. Tick the "no printer (optimize for screen display)" option. Your problem SHOULD go away.