Hi,
Is there a way in docx4j to insert macros?
Justin
It is currently Fri Jan 31, 2025 4:44 am
getCnfStyleOrDivIdOrGridBefore().add(header);
Caused by: java.lang.OutOfMemoryError: Java heap space
at java.io.ByteArrayOutputStream.write(ByteArrayOutputStream.java:95)
at java.io.BufferedOutputStream.flushBuffer(BufferedOutputStream.java:65)
at java.io.BufferedOutputStream.write(BufferedOutputStream.java:78)
at org.docx4j.openpackaging.io.LoadFromZipNG.getBytesFromInputStream(LoadFromZipNG.java:114)
at org.docx4j.openpackaging.io.LoadFromZipNG.get(LoadFromZipNG.java:167)
public static void main(String[] args) throws Docx4JException {
File file = new File("K:\\word\\headerTest1.docx");
WordprocessingMLPackage wmlpackage = null;
wmlpackage = WordprocessingMLPackage.load(file);
MainDocumentPart mdp = wmlpackage.getMainDocumentPart();
Part part = mdp.getRelationshipsPart().getPart("rId6");
...
...
...
}
Total posts 10120 • Total topics 2847 • Total members 2077