The following example demonstrates how to save the document as a rasterized PDF file:
constredaction=require('@groupdocs/groupdocs.redaction');constredactor=newredaction.Redactor(Constants.SAMPLE_DOCX);try{// Here we can use document instance to perform redactions
redactor.apply(newredaction.ExactPhraseRedaction('John Doe',newredaction.ReplacementOptions('[personal]')));consttmp0=newredaction.SaveOptions();tmp0.setAddSuffix(false);tmp0.setRasterizeToPDF(true);// Saving as rasterized PDF with no suffix in file name
redactor.save(tmp0);}finally{redactor.close();}
sample.docx is the sample file used in this example. Click here to download it.