Skip to main content
Known Participant
June 16, 2016
Answered

What is the java script code which makes it so an annotation displays as flattened (permanent) on a page?

  • June 16, 2016
  • 2 replies
  • 760 views

I have custom dialog box based on java script code that prompts the user to enter data for an exhibit label.  This label is then annotated on the pdf. Right now, the entered annotation can be deleted.  I want it to be show up as permanent on the pdf page. 

Thanks.

This topic has been closed for replies.
Correct answer Karl Heinz Kremer

You need to flatten the page that this annotation is one to convert it to static PDF content. You do this using the Doc.flattenPages() method:

Acrobat DC SDK Documentation - Doc.flattenPages()

2 replies

Inspiring
June 16, 2016

Just a note to be careful with the doc.flattenPages method if the document includes annotations (including links, form fields, etc.) that you may not want flattened. As the documentation shows, you can limit flattening to certain pages and non-printing annotations, which gives you the ability to flatten just the ones you want. It also doesn't work with Reader and can't be undone.

Karl Heinz  Kremer
Community Expert
Karl Heinz KremerCommunity ExpertCorrect answer
Community Expert
June 16, 2016

You need to flatten the page that this annotation is one to convert it to static PDF content. You do this using the Doc.flattenPages() method:

Acrobat DC SDK Documentation - Doc.flattenPages()