开发者

Using iText to selectively hide parts of a pdf

开发者 https://www.devze.com 2022-12-14 06:20 出处:网络
I am using iText to populate a pdf form using data from our database.Sometimes, though, our forms may have an extra body of text at the end, like a disclaimer, depending on certain criteria specified

I am using iText to populate a pdf form using data from our database. Sometimes, though, our forms may have an extra body of text at the end, like a disclaimer, depending on certain criteria specified in the data.

Is it possible to hide parts of a PDF document so they do not display / print? This would let our business people create the forms including the disclaimers, and we can programati开发者_开发问答cally hide them. Or must we create different forms?


Put the elements you want to hide on a PDF optional content group (OCG). Also known as a layers. Layers can be shown or hidden, set to print or not, etc. You can control OCG status using iText.

0

精彩评论

暂无评论...
验证码 换一张
取 消