danfickle / openhtmltopdf

An HTML to PDF library for the JVM. Based on Flying Saucer and Apache PDF-BOX 2. With SVG image support. Now also with accessible PDF support (WCAG, Section 508, PDF/UA)!
https://danfickle.github.io/pdf-templates/index.html
Other
1.91k stars 356 forks source link

> Using separate resources can be achieved by providing your own FSStreamFactory: #963

Closed siegelzc closed 8 months ago

siegelzc commented 8 months ago
          > Using separate resources can be achieved by providing your own FSStreamFactory:
new PdfRendererBuilder()
    .useProtocolsStreamImplementation(new ClassPathStreamFactory(), "classpath")
    .withHtmlContent(htmlContent, "classpath:/html/")
    ...

Full code can be found in this example project

Would be great if ClassPathStreamFactory could be added to this library!

Originally posted by @daniel-shuy in https://github.com/danfickle/openhtmltopdf/issues/146#issuecomment-1905725379

siegelzc commented 8 months ago

whoops didnt mean to create this