Simple pdf.save method call saves original PDF with warnings.
jUnit test to reproduce the issue
(see zip attachment too)
code:
the saved file is in project root directory documentSaved.pdf
Warnings:
See Capture.PNG
Regards
Martin
Simple pdf.save method call saves original PDF with warnings.
Hi Martin,
InputStream docStream = new FileInputStream(myDir+" documentOriginal.pdf");<o:p></o:p>
com.aspose.pdf.Document document = new com.aspose.pdf.Document(docStream);
OutputStream pdfStream = null;
try {
pdfStream = new FileOutputStream(myDir+"documentOriginal_no_ex_rights.pdf");
PdfFileSignature sign = new PdfFileSignature();
sign.bindPdf(document);
sign.removeUsageRights();
document.save(pdfStream);
} finally {
if (pdfStream != null)
pdfStream.close();
}