Hi Team,
I am comparing two files (DOCX and PDF) using the Aspose Library. The response generates a third document where changes are tracked and displayed with redlining when opened in Word.
Does it support accessibility? I am unable to identify any added or deleted text, or format changes, using VoiceOver. For example, in the attached compared file, I deleted the word “Arial,” but VoiceOver does not recognize this change.
Looking forward to your insights.
@munish.singla
Could you please provide more details about the specific accessibility features you are looking for in the document comparison results?
we are using : aspose-words-24.9-jdk17.jar
@munish.singla You can save the output PDF with PdfCompliance.PDF_UA_1 to make is accessible.
Document doc = new Document("C:\\Temp\\in.docx");
PdfSaveOptions opt = new PdfSaveOptions();
opt.setCompliance(PdfCompliance.PDF_UA_1);
doc.save("C:\\Temp\\out.pdf");
Hi @alexey.noskov
I am using this code. How I can integrate here?
String author = "User";
// Compare documents
//original.compare(revised, author, new java.util.Date());
CompareOptions options = new CompareOptions();
options.setIgnoreFormatting(true); // Ignore formatting changes
options.setIgnoreCaseChanges(true); // Ignore case changes
options.setIgnoreTables(true); // Ignore table differences
original.compare(revised, "AuthorName", new java.util.Date(), options);
RevisionOptions revisionOptions = original.getLayoutOptions().getRevisionOptions();
revisionOptions.setInsertedTextColor(RevisionColor.DARK_YELLOW); // Color for insertions
revisionOptions.setDeletedTextColor(RevisionColor.RED); // Color for deletions
revisionOptions.setRevisedPropertiesColor(RevisionColor.DARK_YELLOW);
// Customize revision display options (e.g., color coding)
// Save the comparison result
original.save("OutputAspose.docx");
System.out.println("Comparison completed. Result saved.");
@munish.singla In the provided code you are saving the document as DOCX. To use PdfCompliance.PDF_UA_1
the output document should be saved to PDF as shown in the code example above.