- Code: Select all
org.docx4j.convert.out.pdf.PdfConversion c = new org.docx4j.convert.out.pdf.viaXSLFO.Conversion(wordMLPackage);
OutputStream os = new FileOutputStream(new File(outputfilepath + ".pdf"));
c.output ( os , new PdfSettings() );
whenever i use this method i get a pdf without any layouting and tons of
- Code: Select all
NOT IMPLEMENTED: support for w:pict - without v:imagedata
errors in the text. I saw that there where possiblities to convert via itext but the api does not seem to carry these possibilities anymore, if i'm not mistaken. The version of docx4j that i used was 3.0.1. since i saw that 3.1.0 should have a lot of pdf output improvements i imported the jar and tried with that but i still get the same errors. Also the functions i use are marked deprecated. Is there a newer example or could somebody give me a basic idea of what to look for to get the conversion working.
Thanks
edit: i also should mention that i try to replace some strings in a pdf, which works good with the VariableReplace example that is provided and i simply put the above code in the save part in addition to the given docx putput. The docx addition works fine.