'Conversion of docx to pdf using docx4j library in java
If i am trying to convert the docx file to pdf file
Code :
InputStream is = file.getInputStream();
WordprocessingMLPackage wordMLPackage = WordprocessingMLPackage.load(is);
File outputFile = new File(file.getOriginalFilename() + ".pdf");
FileOutputStream os = new FileOutputStream(outputFile);
Docx4J.toPDF(wordMLPackage,os);
os.flush();
os.close();
This is the error I am getting :
org.apache.fop.apps.FOUserAgent - Font "Times New Roman,normal,400" not found. Substituting with "any,normal,400".
o.d.convert.out.fo.FOPAreaTreeHelper - For @bpda,
<block bap="0 0 0 0" bpd="0" ipd="427522" ipda="427522" visibility="visible"/>
o.d.convert.out.fo.FOPAreaTreeHelper - For input string: ""
java.lang.NumberFormatException: For input string: ""
Can anyone help me. Thanks in advance.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
