Drawing vector images on PDF with PDFBox

前端 未结 3 700
夕颜
夕颜 2021-02-13 20:41

I would like to draw a vector image on a PDF with Apache PDFBox.

This is the code I use to draw regular images

PDPage page = (PDPage) document.getDocumen         


        
3条回答
  •  清酒与你
    2021-02-13 21:06

    I do this, but not directly. In first transform your SVG documents in PDF documents with FOP librairy and Batik. https://xmlgraphics.apache.org/fop/dev/design/svg.html.

    In second times, you can use LayerUtility in pdfbox to transform your new pdf document in PDXObjectForm. After that, just needs to include PDXObjectForm in your final pdf documents.

提交回复
热议问题