title: How to set base url in Flying-Saucer, while rendering HTML to PDF?
body: <p>I am trying to render a HTML page to PDF using Flying-Saucer. The HTML is created in memory and passed to the renderer as </p>
  
  <pre><code>renderer.setDocumentFromString(new String(htmlByteArray));
  </code></pre>
  
  <p>The issue is that I have <code>&lt;img src="images.jpg"/&gt;</code> in the HTML and it is not getting rendered in the final HTML. The image is located in the <code>resources</code> folder in the package.</p>
  
  <p>I tried setting the base url with the following, but with no success:</p>
  
  <pre>
  ITextRenderer renderer = new ITextRenderer();
  <b>renderer.getSharedContext().setBaseURL("com/org/tools/designer/resources/");</b>
  System.out.println(renderer.getSharedContext().getBaseURL());
  renderer.setDocumentFromString(new String(htmlByteArray));
  renderer.layout();
  renderer.createPDF(os);
  </pre>