MaikJaek / flying-saucer

Automatically exported from code.google.com/p/flying-saucer
0 stars 0 forks source link

Add Support for Data Url embeded Images in PDF Rendering #202

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
I did a short patch which allows to Add Images from embeded Data Url's to a 
PDF. example <img src="data:image/png;base64,iVBORw0KGgoAAAA..." alt="nothing">

Please apply this for the next Release, if it's compliant. I Did not found 
UnitTests. Please give me an advice where they are, so I will add a Test.

Best Regard's and thank you for the amazing product.

Patch is attached

Original issue reported on code.google.com by mbue...@gmail.com on 13 Jul 2012 at 2:33

Attachments:

GoogleCodeExporter commented 8 years ago
From 
http://stackoverflow.com/questions/10840959/render-embedded-image-in-pdf-using-f
lying-saucer-from-html :
"""
Flying-Saucer supports the data: protocol natively. All you have to do is 
register a protocol handler:

-Djava.protocol.handler.pkgs=org.xhtmlrenderer.protocols

No need for servlets whatsoverver.
"""

Original comment by stevenro...@gmail.com on 30 Aug 2013 at 3:49

GoogleCodeExporter commented 8 years ago
Sorry, I know this is over a year old, but it is the closest thing I could 
find. Stevenro... I have tried setting that java system variable, even checked 
by system properties and it is there correctly: eg: java.protocol.handler.pkgs 
= org.xhtmlrenderer.protocols

What am I missing?

Original comment by scott.oc...@vmlearning.com.au on 30 Sep 2014 at 4:57

GoogleCodeExporter commented 8 years ago
Thanks for the patch. It seems to work well. Please merge this into the 
official release.

In the meantime, one can make use of the patch even without updating Flying 
Saucer by making a subclass of ITextUserAgent in application code.

Original comment by thilopl...@googlemail.com on 11 Dec 2014 at 2:41