-
Notifications
You must be signed in to change notification settings - Fork 563
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
Make it possible to add resources with classpath:
prefix
#216
Comments
@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? |
It was worked on my other project. |
Some frameworks will supply a classpath:// URL handler. See e.g.
https://stackoverflow.com/questions/861500/url-to-load-resources-from-the-classpath-in-java.
We've done something similar internally before.
Could that be why it worked before?
I don't think this is something that FS has supplied out of the box though.
…On Fri, Oct 6, 2023 at 1:13 PM Cezary Hadrzyński ***@***.***> wrote:
It was worked on my other project.
—
Reply to this email directly, view it on GitHub
<#216 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAAF42FAAXLXT4DB3WVO7S3X57RWZAVCNFSM6AAAAAA5U3E442VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTONJQGQZTMMJRGM>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
|
I don't know, maybe... |
I do not, I'm afraid.
…On Fri, Oct 6, 2023 at 1:28 PM Cezary Hadrzyński ***@***.***> wrote:
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.
—
Reply to this email directly, view it on GitHub
<#216 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAAF42EOC7HEPBEXOGL4NODX57TMZAVCNFSM6AAAAAA5U3E442VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTONJQGQ3DQOJZG4>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
now it's possible to use "classpath:" prefix in URLs of included resources, e.g. ``` <link href="classpath:styles/sample.css"/> ```
classpath:
prefix
now it's possible to use "classpath:" prefix in URLs of included resources, e.g. ``` <link href="classpath:styles/sample.css"/> ```
Funny thing, but in my case it worked perfectly fine (
|
@andrzej-talarek Thank you for the feedback. Are you sure you have folder If yes, how can I reproduce the problem? Could you create a simple reproducible example? |
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). |
@andrzej-talarek This should be fixed in #250. |
@andrzej-talarek The fix #250 has been released as FlyingSaucer 9.4.1 |
Confirmed, works perfectly again :-). Great thanks @asolntsev ! |
I can't generate pdf using externally loaded css stylesheet. It is generate without any styles.
Images with classpath prefix are not loaded too.
Everything works when I specify absolute path to file (with prefix file://), but this is not acceptable in my app.
My code:
My HTML:
My maven dependecies:
The text was updated successfully, but these errors were encountered: