Changeset 1654 for trunk/docx4j/src/main/java/org
- Timestamp:
- 09/06/11 15:22:09 (9 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/docx4j/src/main/java/org/docx4j/samples/CompareDocuments.java
r1168 r1654 32 32 import javax.xml.bind.Unmarshaller; 33 33 34 import org.docx4j.convert.out.pdf.viaXSLFO.PdfSettings; 34 35 import org.docx4j.diff.Differencer; 35 36 import org.docx4j.fonts.IdentityPlusMapper; … … 60 61 public static void main(String[] args) throws Exception { 61 62 62 String newerfilepath = "/home/dev/workspace/docx4j/sample-docs/differencing_newer.docx";63 String olderfilepath = "/home/dev/workspace/docx4j/sample-docs/differencing_older.docx";63 String newerfilepath = System.getProperty("user.dir") + "/102.docx"; 64 String olderfilepath = System.getProperty("user.dir") + "/103.docx"; 64 65 65 66 // 1. Load the Packages … … 69 70 Body newerBody = ((Document)newerPackage.getMainDocumentPart().getJaxbElement()).getBody(); 70 71 Body olderBody = ((Document)olderPackage.getMainDocumentPart().getJaxbElement()).getBody(); 72 73 System.out.println("Differencing.."); 71 74 72 75 // 2. Do the differencing … … 101 104 = new org.docx4j.convert.out.pdf.viaXSLFO.Conversion(newerPackage); 102 105 103 // c.view(); 106 OutputStream os = new java.io.FileOutputStream(System.getProperty("user.dir") + "/COMPARED.pdf"); 107 c.output(os, new PdfSettings() ); 108 System.out.println("Saved " + System.getProperty("user.dir") + "/COMPARED.pdf"); 104 109 105 110 }
Note: See TracChangeset
for help on using the changeset viewer.
