Saving document as a rasterized PDF, you can specify starting page index (zero based) and the number of pages from this index to save. Also, you can change the Compliance level from PDF/A-1b, which is used by default, to PDF/A-1a:
finalRedactorredactor=newRedactor("MultipageSample.docx");try{RedactorChangeLogresult=redactor.apply(newExactPhraseRedaction("John Doe",newReplacementOptions(java.awt.Color.RED)));if(result.getStatus()!=RedactionStatus.Failed){SaveOptionsoptions=newSaveOptions();options.getRasterization().setEnabled(true);// the same as options.RasterizeToPDF = true;
options.getRasterization().setPageIndex(5);// start from 6th page (index is 0-based)
options.getRasterization().setPageCount(1);// save only one page
options.getRasterization().setCompliance(PdfComplianceLevel.PdfA1a);// by default PdfComplianceLevel.Auto or PDF/A-1b
options.setAddSuffix(true);redactor.save(options);}}finally{redactor.close();}
Was this page helpful?
Any additional feedback you'd like to share with us?
Please tell us how we can improve this page.
Thank you for your feedback!
We value your opinion. Your feedback will help us improve our documentation.