-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Images in reports #127
Comments
can you submit the PR as draft so I can look? |
Sure (#128); in the 6.x version, I had solved this with changes to the repository service; the current one works much the same as mine did for external images, but that didn't seem to be working either. If you fire up the integration-tests project in dev mode, then it'll produce the report, but all of the |
Thanks i will take a look. |
This is the issue: https://stackoverflow.com/questions/43903930/jasperreport-image-inside-report-jrxml-on-html-src-is-missing HTMLReports you have to register image handlers? When I do that I now see text in the What happens with PDF Renderer? And this one: https://stackoverflow.com/questions/33547588/how-to-display-a-svg-byte-array-as-an-image-in-a-jasperreport/39320863#39320863 |
I had just started looking at this, so not sure what the PDF renderer does. I'll also eventually need the XLSX output to work. |
ok i am looking at the samples. And they use SimpleHtmlExporter to export to a jrpint file in their the exporter it does this private void setFileHandlers(File destFile)
{
File resourcesDir = new File(destFile.getParent(), destFile.getName() + "_files");
String pathPattern = resourcesDir.getName() + "/{0}";
resourceHandler = new FileHtmlResourceHandler(resourcesDir, pathPattern);
imageHandler = resourceHandler;
fontHandler = resourceHandler;
} So its registering a default File handler for images? |
Also when I step through the debugger i see it loading the images properly in |
Good news - PDF and XLSX output works fine as-is, but that makes sense because the images are embedded. HTML output will need some more work to provide an endpoint that serves the generated image files (like |
2 things.
<dependency>
<groupId>com.twelvemonkeys.imageio</groupId>
<artifactId>imageio-webp</artifactId>
<version>3.9.4</version>
</dependency> |
<maniacal laugh> |
Closing this we don't need to test WEBP if that JAR or any other TwelveMonkeys JAR is on the classpath it just registers with |
Images do not appear to be loading in reports - either as a file in the project, as a static resource served by the project, or an external image from a URL. See https://github.com/nderwin-forks/quarkus-jasperreports/tree/feature/images-in-reports for examples.
The unit test is currently failing because the host URL needs to be dynamically passed to the report instead of it being hard-coded as
http://localhost:8080
.The text was updated successfully, but these errors were encountered: