1
votes

I'm using itext to generate pdf in my spring mvc application. The pdf is getting generated just fine, but I always see an empty Attachment section under the pdf document which is taking up some real estate on the document. Wondering if there is a way to hide that section by default when we generate the pdf.

1

1 Answers

1
votes

Try setting the viewer preferences on your PdfWriter instance:

writer.setViewerPreferences(PdfWriter.PageModeUseNone)