Comments (12)
Confirmed, works perfectly again :-). Great thanks @asolntsev !
from flyingsaucer.
@lowcasz Did it ever work? Do you mean that FlyingSaucer did load resources from classpath, and this feature was broken with some release? Or it never really worked, and you just wish such a feature?
from flyingsaucer.
It was worked on my other project.
HTML is copied from old project for test, it was work there.
I don't see any other configuration and configuration classes between them.
In old project is older version of saucer. (9.1.22)
from flyingsaucer.
from flyingsaucer.
I don't know, maybe...
Do you know any dependency, especially spring dependency which can do it in background?
It can helps me to find it, I don't see any additional parameters, configuration or classes which do it.
from flyingsaucer.
from flyingsaucer.
@lowcasz implemented in #241, released version 9.3.2 today.
from flyingsaucer.
Funny thing, but in my case it worked perfectly fine (classpath:/static/css/custom.css
) in 9.3.1
version and broke with 9.3.2
:(. It's broken both for bootJar
task, that I'm using for system development usually and normal building jar for running it with java -jar
. Can't upgrade.
2023-12-31 06:18:15.880 ERROR - o.a.j.l.DirectJDKLog : Servlet.service() for servlet [dispatcherServlet] in context with path [] threw exception [Request processing failed: java.lang.NullPointerException: Cannot invoke "java.net.URL.toString()" because "resource" is null] with root cause
java.lang.NullPointerException: Cannot invoke "java.net.URL.toString()" because "resource" is null
at org.xhtmlrenderer.swing.NaiveUserAgent.resolveURI(NaiveUserAgent.java:370)
at org.xhtmlrenderer.context.StyleReference.getStylesheets(StyleReference.java:224)
at org.xhtmlrenderer.context.StyleReference.setDocumentContext(StyleReference.java:85)
at org.xhtmlrenderer.pdf.ITextRenderer.setDocument(ITextRenderer.java:183)
at org.xhtmlrenderer.pdf.ITextRenderer.setDocument(ITextRenderer.java:144)
at org.xhtmlrenderer.pdf.ITextRenderer.setDocumentFromString(ITextRenderer.java:167)
at org.xhtmlrenderer.pdf.ITextRenderer.setDocumentFromString(ITextRenderer.java:160)
from flyingsaucer.
@andrzej-talarek Thank you for the feedback.
First of all, I assume that FS 9.3.1 didn't really load custom.css
file, but just silently ignored it.
And FS 9.3.2 started searching this file in classpath and complaining if the file cannot be found.
Are you sure you have folder static
in the classpath?
If yes, how can I reproduce the problem? Could you create a simple reproducible example?
from flyingsaucer.
I'm 100% sure it worked fine - I've used several included styles (custom ones and bootstrap styles) and I know styles worked OK then (looking at final pdf).
Since it's spring-boot app, I'm not sure it would be that easy, but I can try to prepare a repo with as little code as it only requires.
from flyingsaucer.
@andrzej-talarek This should be fixed in #250.
from flyingsaucer.
@andrzej-talarek The fix #250 has been released as FlyingSaucer 9.4.1
Can you please check if it helps?
from flyingsaucer.
Related Issues (18)
- CSS: page-break-before "always" -- slightly wrong implementation (in PDF) HOT 3
- CSS pseudo class :last-child HOT 2
- Center image HOT 1
- images reder failed when the url does not contain the image suffix
- Google fonts not working
- Running elements only rendered on last page HOT 4
- How skip HTML validation while generating PDF? HOT 2
- CSS and Image is not rendering in generated PDF HOT 1
- Userguide and PDF downloadable guide is outdated, returns 404 HOT 1
- CJK characters not rendered from Unicode font HOT 6
- Identify new features needed for current tech era in other HTML to PDF Java libraries
- Application build fails using Flying Saucer Core 9.4.1 HOT 1
- how to fixed html table header HOT 2
- NPE in ScalableXHTMLPanel HOT 5
- AccessControlException in Applets HOT 1
- getFormFields for XhtmlForm HOT 1
- Font ascent and descent in ITextTextRenderer HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from flyingsaucer.