Open Veeramanikandan1493 opened 8 years ago
Hi, I'm having exactly the same issue here. Setting grails.serverURL doesn't seem to solve it, as explained on "Link resources must be resolvable" section
Hi, the problem is that resources aren't accessible from the process through http.
So I've finally "solved" this issue with a workaround....
This works for me, I hope it does for you.
Hi, Thanks for the reply. Its worked.
<g:render template="css"/>
On monday in my office :)
Do u have any img referenced in your styles? The problem is the process can't access the resources through http, so they must be embeded too. Use base 64 to achieve this with the tools referenced on my answer
El 22/10/2016 04:06, "Veeramanikandan" notifications@github.com escribió:
Hi, Thanks for the reply.
- I had created files and tried to include _css.gsp inside _mypdf.gsp.
- But text still the same.
Can you give example for the answer you described?
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/gpc/rendering/issues/33#issuecomment-255512055, or mute the thread https://github.com/notifications/unsubscribe-auth/ASUckiLHkgXs9OOfsJfgC4I1uix8wO6mks5q2bX4gaJpZM4J7c3c .
I had a similar problem these days where after adding SSL to my server, the plugin just stopped reading resources (css, images), using either relative or absolute path. Also I configured the serverURL with HTTPS but works only in HTTP mode. I tested the above suggestion but could not include a custom font inside the views' folder.
@Veeramanikandan1493 How did you get to read the src property of your @font-face with glyphicons in the views' folder?
Hi @msaccone , I haven't tried any img reference on my application. I will let you know if there are any alternative methods.
Hi @TRAT0R ,
The default font-face styling contains src: url(../fonts/glyphicons-halflings-regular.eot);
. You need to comment that. If you are using glyphicons you need to add glyphicons fonts folder and change urls in font-face style in relative path.
Hi @msaccone ,
I have tried image rendering using inlinepng. Its worked for me.
On Controller:
def grailsResourceLocator
def logo = grailsResourceLocator.findResourceForURI("assets/images/logo.png").inputStream.bytes
On rendering gsp:
<rendering:inlinePng bytes="${logo}" class="some-class" style="width:15%; height: 60px"/>
Hi there, Is anyone successfully used external css like bootstrap.css on rendering pdf?. I am getting pdf that has only contents not styles with some exception thrown as shown below. If anyone got solution for this?