Package org.docx4j.samples.diffx
Class CompareDocuments
java.lang.Object
org.docx4j.samples.diffx.CompareDocuments
This sample compares the 2 input documents, and renders
the result using PDF viewer.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic jakarta.xml.bind.JAXBContext(package private) static booleanSplit up the problem to try to solve more quickly (you might try this when you have 500 entries or more)(package private) static boolean(package private) static boolean -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate static voidhandleRels(Differencer pd, MainDocumentPart newMDP) In the general case, you need to handle relationships.static void
-
Field Details
-
context
public static jakarta.xml.bind.JAXBContext context -
DOCX_SAVE
static boolean DOCX_SAVE -
PDF_SAVE
static boolean PDF_SAVE -
DIVIDE_AND_CONQUER
static boolean DIVIDE_AND_CONQUERSplit up the problem to try to solve more quickly (you might try this when you have 500 entries or more)
-
-
Constructor Details
-
CompareDocuments
public CompareDocuments()
-
-
Method Details
-
main
- Parameters:
args-- Throws:
Exception
-
handleRels
private static void handleRels(Differencer pd, MainDocumentPart newMDP) throws InvalidFormatException In the general case, you need to handle relationships. Although not necessary in this simple example, we do it anyway for the purposes of illustration.- Throws:
InvalidFormatException
-