Can't add an image to a pdf using PDFBox

后端 未结 3 1584
再見小時候
再見小時候 2020-12-10 10:45

I\'m writing a java app that creates a pdf from scratch using the pdfbox library.
I need to place a jpg image in one of the page.

I\'m using this code:



        
3条回答
  •  南笙
    南笙 (楼主)
    2020-12-10 10:55

    Looks like you're missing just a document.addPage(page) call.

    See also the ImageToPDF example class in PDFBox for some sample code.

提交回复
热议问题