简体   繁体   English

Itext java pdfptableevent圆角背景多页

[英]Itext java pdfptableevent rounded corners background multiple pages

I am using itext 4.2 java to generate pdf and want to have rounded corners with background color and I am able to accomplish it as well.我正在使用 itext 4.2 java 来生成 pdf 并希望有圆角和背景颜色,我也能够完成它。 I face one issue the first column was alone getting rounded corner and background so inorder to fix it,I need to add one empty row with total number of columns in a table and after adding it table showed proper rounded corners and background.我面临一个问题,第一列是单独的圆角和背景,所以为了修复它,我需要在表格中添加一个包含总列数的空行,添加后表格显示正确的圆角和背景。

The issue which I am facing now is, pdfptableevent is not applying on multiple pages properly.我现在面临的问题是,pdfptableevent 没有正确应用于多个页面。 Table has many records and it does split on multiple pages and the behavior is only first column of the row is getting rounded with its background color.表有许多记录,并且它确实在多个页面上拆分,并且行为只是该行的第一列被其背景颜色四舍五入。 Rest of the columns are not applying pdfptableevent and one extra page is getting added in last page.列的 Rest 未应用 pdfptableevent 并且在最后一页中添加了一个额外的页面。 may be we can ignore the extra last page.也许我们可以忽略多余的最后一页。

Please advise how to resolve issue with pdfptableevent which has many records spliting in multiple pages.请告知如何解决 pdfptableevent 的问题,该问题有许多记录拆分为多个页面。

I tried using setkeeptogether true it gives more problems.我尝试使用 setkeeptogether true 它会带来更多问题。

Thanks谢谢

I used multiple pdfpcellevent instead of pdfptableevent to round cells instead of table.我使用多个 pdfpcellevent 而不是 pdfptableevent 来舍入单元格而不是表格。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM