We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Use black and white filter for output document


We use Aspose.Words to convert word documents to PDF, including display of the changes tracked in the document.

The issue we have is that the library is using a style-sheet of some kind that is incompatible with the requirements of the receiver of the PDF file, as they dictate that a marked-up copy must be supplied in pure black and white. We have tried using a black and white filter onto the PDF file (we found a conversion function in GhostScript but this also not confirming to receiver regulations, and we cannot rasterize the PDF either).

Please see attached files:
a) sample.docx -> a word document with track changes information
b) aspose-output.pdf -> the PDF file that aspose.words lib produces
c) required-output.pdf -> sample PDF where insertion color and deletion color is set to black (rather than red)

Is there any way to achieve this requirement via Aspose.Words for Java?

If not, it would be very useful to be able to define the colour used to display the marked-up portions, rather than it always defaulting to red.

Thank you for your assistance.

Hi Thomas,

Thanks for your inquiry. Please use the following code example to achieve your requirement. Hope this helps you. RevisionOptions class allows to control how document revisions are handled during layout process.

Please let us know if you have any more queries.

Document doc = new Document(MyDir + "sample.docx");
RevisionOptions ro = doc.getLayoutOptions().getRevisionOptions();
doc.save(MyDir + "Out.pdf");

Hi Tahir,

This solved our issue. Thanks for your assistance.

Hi Thomas,

Thanks for your feedback. Please feel free to ask if you have any question about Aspose.Words, we will be happy to help you.