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 (20)
- FlyingSaucer could validate generated PDFs HOT 1
- ITextRenderer class, but no dependency on IText HOT 1
- Remove various old packages and libraries HOT 2
- No way to set Document directly in renderer HOT 2
- Internal logging is enabled by default contrary to what doc says HOT 5
- Support PDF digital signature HOT 3
- default for xr.util-logging.loggingEnabled in resources/conf/xhmlrenderer.conf changed HOT 1
- Adding an image to the full size of a pdf page
- Underline text decoration with Liberation Sans too thick HOT 2
- Bold highlighting of a list item marker not being applied HOT 1
- Page break causing issues
- HTML to PDF - Blur the page HOT 4
- Update documentation
- How to improve tps in multithreading HOT 5
- text-align: justify; Underline missing
- Does the recent version support JDK8? HOT 2
- org.xmlrenderer:flying-saucer-pdf does not work with Java 9 modules HOT 4
- Does Flyingsaucer resolve relative css, fonts files by default? HOT 2
- Support letter-spacing and word-spacing properties HOT 1
- java.lang.IllegalArgumentException: Font size too small: 0.0 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.