Hi,
Is there a way to strip actions from a PDF? I’d like to strip actions from all annotations, pages, and the document.
Hi,
Is there a way to strip actions from a PDF? I’d like to strip actions from all annotations, pages, and the document.
You can use Document.Flatten() method in order to flatten annotations and other form fields inside a PDF. In order to strip JavaScript, you can please try using the below code snippet and let us know in case you face any issue:
string pdf_path = dataDir + "purchase_order_out.pdf";
// load frm temp file and remove JS using javascriptstripper
Facades.PdfJavaScriptStripper pdf_js_stripper = new Facades.PdfJavaScriptStripper();
pdf_js_stripper.Strip(dataDir + "purchase_order.pdf", dataDir + "purchase_order_out.pdf");