Closed aeusebio closed 8 years ago
I never had problems with images. What kind of problem?
Sorry, I forgot to attach the print screen.
The image is inside your project?
Yes, in 'public\img\logo2.png' and is loaded by '@routes.Assets.at("img/logo2.png")'.
Can you check with your browser if is correct in production? If you send me the image i'll try to figure it out.
Yes, in production the web page from which the pdf is generated is rendered correctly. The logo:
Btw, I'm using Play! 2.4
Can you make a test with an another image? It's a strange behavior.
I've tried other images and the result is similar.
Do you have a log file? Any errors?
No errors on the log file.
Can you check if there are any errors on the webserver production log? Are you using ssh on the server?
There are no errors.
More info: To package the application I'm using "activator stage", and I start it by running the ".sh" created.
I kind of resolved the problem by calling a route defined by me instead of the "Assets.at". That route points to the Application controller in which the image is loaded from disk and returned as a byte array.
It's not a pretty solution but it works...
Have you tried other play framework version? Maybe is a framework's bug?
After some testing I discovered that the image was generated with the wrong color information. After opening the image with an editor and saving it in another format, the problem was solved.
Thanks for all the help.
Hi there,
I've been using this module and it have worked wonderfully. But when I run my application in production mode, the PdfGenerator renders the images incorrectly.
Has anyone the same problem? Have you found any solution?
Thanks in advance.