One long-standing benefit of the PDF format is that it allows users to send documents for review in an uneditable format, so what happens to this property when editable objects like form fields, text annotations, comments and stamps are added to the document? Luckily, it’s still possible to distribute the files in an uneditable format by flattening these objects to become part of the document.
- Type in this.flattenPages(); and press enter.
Voila! You should now have a flattened document!