docx4j
docx4j copied to clipboard
JAXB-based Java library for Word docx, Powerpoint pptx, and Excel xlsx files
I am using this code to convert docx to html ``` Docx4jProperties.setProperty("docx4j.Log4j.Configurator.disabled", "true"); WordprocessingMLPackage wordMLPackage = WordprocessingMLPackage.load(new java.io.File("C:/Users/aaravind/Downloads/new4925.docx")); System.out.println(XmlUtils.marshaltoString(wordMLPackage.getMainDocumentPart().getJaxbElement(), true, true)); regex = ".*(Courier New|Arial|Times New Roman|Comic Sans|Georgia|Impact|Lucida Console|Lucida Sans...
Steps to reproduce: Docx4j 8.3.8 Java Code: https://github.com/plutext/docx4j/blob/master/docx4j-samples-docx4j/src/main/java/org/docx4j/samples/TrackChangesAccept.java The XSLT template: https://github.com/plutext/docx4j/blob/master/docx4j-samples-resources/src/main/resources/AcceptChanges.xslt Sample Word file: [TestSimple.docx](https://github.com/plutext/docx4j/files/10339113/TestSimple.docx) The resulting file still has 1 unaccepted change. We need all changes in the...
I have document where data is loaded from customXml/item1.xml (inside docx). When I use BindingHandler to update document it will drop styling inside table rows ([how it looks](https://ibb.co/8YmSVcH)). Here's the...
When redefining the image directory path, some images are still in the default directory. ``` WordprocessingMLPackage wordMLPackage = WordprocessingMLPackage.load(new File("/some/docxfile.docx")); FOSettings foSettings = new FOSettings(wordMLPackage); foSettings.setImageDirPath("/custom_temporary_directory"); foSettings.setApacheFopMime(FOSettings.INTERNAL_FO_MIME); ByteArrayOutputStream os =...
### What happened? There are 1 security vulnerabilities found in xerces:xercesImpl 2.12.0 - [CVE-2022-23437](https://www.oscs1024.com/hd/CVE-2022-23437) ### What did I do? Upgrade xerces:xercesImpl from 2.12.0 to 2.12.1 for vulnerability fix ### What...
### What happened? There are 1 security vulnerabilities found in com.fasterxml.jackson.core:jackson-databind 2.9.10.8 - [CVE-2020-36518](https://www.oscs1024.com/hd/CVE-2020-36518) ### What did I do? Upgrade com.fasterxml.jackson.core:jackson-databind from 2.9.10.8 to 2.12.6.1 for vulnerability fix ### What...
RelationshipsPart.removeParts throws an exception when removing a hyperlink. **Steps to reproduce:** Docx4j 8.3.8 ```java public static void main(String[] args) throws Exception { RelationshipsPart rels = WordprocessingMLPackage.createPackage().getMainDocumentPart().getRelationshipsPart(); // Created by Word...
Upgrade jackson-databind 2.9.10.8 to 2.12.6.1 for vulnerability fix: - [CVE-2020-36518](https://www.oscs1024.com/hd/MPS-2022-6242)
These changes for MailMerge ignore and preserve nested fields that may or may not contain MERGEFIELDs. Nested fields in an imported docx can cause a stack overflow in FieldRef.java:304 (which...
Case: Writing a docx as pdf using `WordprocessingMLPackage` and setting the fontMapper using `IdentityPlusMapper()` from `org.docx4j.fonts` to map the fonts in the document we receive: `java.lang.NoClassDefFoundError: Could not initialize class...