Page 1 of 1

.NET Docx To Pdf exception

PostPosted: Wed Dec 12, 2018 6:38 pm
by Rajesh
Hi,

I have implementing merged mail document DocToPdf using docx4j pakage exception comes as in line

WordprocessingMLPackage wordMLPackage = WordprocessingMLPackage
.load(new java.io.File(fileIN));

Exception : The type initializer for 'org.docx4j.openpackaging.packages.WordprocessingMLPackage' threw an exception.
innerException : The type initializer for 'org.docx4j.openpackaging.packages.OpcPackage' threw an exception.

Please give solution
Thanks.

Re: DocToPdf exception

PostPosted: Fri Dec 14, 2018 6:46 am
by jason
Please attach your input file, or email it to me.

Re: DocToPdf exception

PostPosted: Fri Dec 14, 2018 3:58 pm
by Rajesh
Hi jason,

I have install Package docx4j.NET -Version 6.0.1.4 in my project.

Below code giving exceptions.

WordprocessingMLPackage wordMLPackage = WordprocessingMLPackage
.load(new java.io.File(fileIN));

java.io.FileOutputStream fos = new java.io.FileOutputStream(new java.io.File(fileOUT));
org.docx4j.Docx4J.toPDF(wordMLPackage, fos);

I am attaching two files one is input docx and second is type of exception error .