tags:

views:

298

answers:

1

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 programatically hide them. Or must we create different forms?

+1  A: 

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.

Dwight Kelly
Yes, thank you. I just didn't know what to google for. :)
yodaj007