extreme file enlargement due to comments
Hello everyone, I noticed such a problem: after hiding comments in a document using code, the file size increases tenfold!
function Hide() {
this.delay = true;
this.syncAnnotScan();
var annots = this.getAnnots();
if (annots==null || annots.length==0) {
app.alert("there are no comments in this document", 1);
return;}
for (var i=annots.length-1; i>=0; i--) {
annots[i].setProps({readOnly: false, lock: false});
annots[i].hidden = true;}
this.delay = false;
app.alert("all comments hide",3);
}
After optimizing(File - Save as Other - Optimizide PDF) the document, the file size returns to its original size, but after displaying comments and saving, it again grows in size by + 3 MB, and so on each time after the hide/show/save cycle.
How to solve this problem? add file optimization to the main code? Or is there an option in the program settings that will clear this automatically?
