I'm trying to remove script embedded in PDF.
I have a PDF file taht when I open, this automatically open a webpage en IExplorer browser.
I need to remove using java, maybe Spire have a function to do this.
Thanks for help!
Regards.
String input = "OpenAction.pdf";
String output = " removeOpenAction.pdf";
//create a pdf document
PdfDocument document = new PdfDocument();
//load an existing pdf from disk
document.loadFromFile(input);
//remove action
document.setAfterOpenAction(null);
//save the document
document.saveToFile(output, FileFormat.PDF);PdfDocument pdf = new PdfDocument();
pdf.loadFromFile(input);
pdf.removeDocumentJavaScript();
pdf.saveToFile(output, FileFormat.PDF);