Hi, thank you for the quick answer. We are already using Batik so it seems this is an easy thing after all.
I also managed to get some decent results by generating PNG images 10 times larger than that I would display on the PDF (PDImage scales). It displayed very ok even with huge zoom levels. And didn't even grow the PDF file size much. But SVG would be better still. Thank you! > -----Original Message----- > From: Jeremias Maerki [mailto:[email protected]] > Sent: 17. huhtikuuta 2014 17:51 > To: [email protected] > Subject: Re: Adding SVG images to PDF > > Hi Toni, > > well, not directly. What you could do is to create a PDF from SVG using > Apache Batik [1][2] or Apache FOP [3][4] and then import the PDF into > your own PDFBox-made PDF document, either by importing the PDF as a > page [5] or as a form XObject, if you want to place the SVG on an > existing page. > > [1] http://xmlgraphics.apache.org/batik/using/transcoder.html > [2] http://stackoverflow.com/questions/6875807/convert-svg-to-pdf > [3] http://xmlgraphics.apache.org/fop/ > [4] By putting a reference to the SVG into a little XSL-FO wrapper. FOP > also allows conversion from SVG to PDF on the command-line using "fop - > imagein myimage.svg -pdf out.pdf". > [5] http://pdfbox.apache.org/commandline/#pdfMerger > > HTH, > Jeremias Märki > _________________________________________________________ > Jeremias Märki, Software-Development and Consulting Contact Information > and Public Keys: > http://www.jeremias-maerki.ch/contact.html > > Please don't print e-mails. Strive to become paperless. > Avoid media breaks. Cherish metadata. > > > On 17.04.2014 12:59:55 Toni Helenius wrote: > > Hello, > > > > is there any way to add SVG images to a PDF file using PDFBox? Any > help is highly appreciated! > > > > -- > > Toni Helenius > >

