Images are not appearing good when converted from .docx to pdf

Deadly 提交于 2019-12-06 01:33:06
David Kroukamp

I'm not sure what it could be, but for some alternatives have a look at:

  • Apose.Words Library for Java it has some really cool features one of them being docx to pdf conversion by a few simple lines (and it's reliable):

    Document doc = new Document("d:/test/mydoc.docx");
    doc.Save("d:/test/Out.pdf", SaveFormat.Pdf);
    
  • Docx4j which can be used to convert docx and many others to PDF, it does this by first using HTML/XML based on IText then converts it to a PDF (All libararies are included within docx4j, just added the itext link for completeness):

    org.docx4j.convert.out.pdf.PdfConversion c
     = new org.docx4j.convert.out.pdf.viaXSLFO.Conversion(wordMLPackage);//using xml
    // = new org.docx4j.convert.out.pdf.viaHTML.Conversion(wordMLPackage);//using html
    // = new org.docx4j.convert.out.pdf.viaIText.Conversion(wordMLPackage);//using itext libs
    

If that's not enough it has sample source code for you to try.

  • xdocreport also comes with a lot of samples for conversion (haven't downloaded them, but it should have the doc/docx to PDF converter source)
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!