HTML to PDF / DOCX / RTF Java converter library › Forums › PD4ML v3 Archived Forums (Read Only) › HTML/CSS rendering issues › Problem with image cache
- This topic has 11 replies, 3 voices, and was last updated Oct 27, 2011
15:10:57 byAnonymous.
-
AuthorPosts
-
September 20, 2011 at 09:16#26608
Hi
I have a cache problem when I create pdf.
I have a page with a logo in the upper part. I use pd4ml in different sites but when i create pdf i see always the same logo even if i am in another site.
This is my code:<%@ taglib uri="https://pd4ml.com/tlds/pd4ml/2.6" prefix="pd4ml" %> <pd4ml:transform screenWidth="1300" pageFormat="A4" pageOrientation="porttrait" pageInsets="10,10,10,10,points" enableImageSplit="false"> <html> MY HTML... </pd4ml:transform>
I also used:
System.setProperty("pd4ml.cache.enable","false");
But with no luck
What can I do to disable image cache?
I also tried to append a suffix to the image, but it doesn’t work because it doesn’t find the image.Thanks
September 22, 2011 at 07:17September 22, 2011 at 09:51#286684-5 years ago one of our customers faced with the issue like yours. I’ll try to find our discussion thread and to learn how we resolved the problem. I’ll let you know asap.
It had something to do with a reusing of class instances (implement custom JSP tags) by the JSP framework.
Please let us know your PD4ML version and the appserver version/type you run PD4ML under.
September 22, 2011 at 10:59#28669thanks for reply
We have PD4ML Java Library (don’t remember the version. where can i find it?)We have Glassfish App Server as application server
thanks
September 22, 2011 at 14:05#28670You may find the version number in document properties of any generated PDF.
September 22, 2011 at 15:03#28671The only information I see is:
PD4ML. HTML to PDF Converter for Java (371b4)September 26, 2011 at 07:38October 3, 2011 at 07:36#28673I’m the only one that have problem with image cache?
October 5, 2011 at 13:52#28674Sorry for the delay with the reply. It seems my first suggestion regarding reusing of class instances was wrong.
In theory the following tags
<pd4ml:parameters> <pd4ml:parameter key="pd4ml.cache.enable" value="false"/></pd4ml:parameters>
nested to
<pd4ml:transform>should help. (Identical System.setProperty(“pd4ml.cache.enable”,”false”) may fail due to server’s security restriction)I would also recommend to add debug=”true” attribute to
<pd4ml:transform>In the case if the caching is successfully disabled it should print to server’s log
cache disabled. (re-)reading
<URL>Please check if it works for you and outputs the debug message.
October 7, 2011 at 10:33#28675Thanks for your reply.
I add the tag to my page and I can see the log message:
cache disabled. (re-)reading file:/util/images/logo.png|#]But inside pdf I see alway the wrong image.
Every night I restart glassfish and the first time i create a pdf the logo is ok. But from that moment I see always that image even if i’m on another siteOctober 12, 2011 at 14:30#28676It looks like there is an implicit caching on JDK level. We’ll investigate if it is possible at all.
October 27, 2011 at 15:10 -
AuthorPosts
The forum ‘HTML/CSS rendering issues’ is closed to new topics and replies.
