I have an xhtml document that I'm turning into a PDF using flyingsaucer. The xhtml has several tags that have a base64 encoded images inline. The source of the xhtml is dynamic so the structure of where the image tags are can vary. This is a sample of what the tag looks like:
<img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAagAAAEuCAYAAADbW4YFAAAgAElEQVR4Aex9CYBdRZ ...
When I look at the html in a browser, the image appears correctly, however, the img element doesn't get rendered in the final PDF. Here is how I'm rendering it out to create the PDF.
ITextRenderer renderer = new ITextRenderer();
renderer.setDocument(builder.parse(source), "");
renderer.layout();
renderer.createPDF(response.getOutputStream(),true);
Can anyone let me know what approach I should take to accomplish this? I saw this posting, however, I'm using inline images so I can't see how I can accomplish this using Edd's solution.
Thanks in advance