PD4ML v4 Forums PD4ML v3 Archived Forums (Read Only) Troubleshooting pd4ml.cache.enable=false

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #26680

    We have a customer using the Java PD4ML version 3.71b12 in a web application.

    They referenced that they allow their users to modify the image associated with their logo at runtime. This likely means physically deleting one image and replacing it (with the same name) using a different image.

    The customer states that when exporting to PDF, the old image appears to be cached and still displayed during export. This does not occur when running the report or exporting to Excel.

    Are there any methods of controlling the cache for rendering the PDF exports in the Java engine?

    I checked the documentation and came up with the following. Will setting pd4ml.cache.enable=false in pd4browser.properties resolve the issue?
    Or do I have to add -Dpd4ml.cache.enable=false to the Java options.

    Thanks in advance,

    Clifton Sothoron
    LogiXML Inc.

    #28872

    I went ahead and applied the pd4ml.cache.enable=false. The debug messages seem to indicate that it works. However, the customer reports that
    when the image has changed the old version still is used inside the PDF.

    What do I have to do to get PD4ML to pick up the current version of the image file?

    Best,

    Clifton Sothoron

    Here is the debug log from an initial PDF export:

    version: PD4ML 371b12 Pro
    new parse attempt with: UTF8
    loading CSS file file:C:/Users/snickels/Documents/Code/ONEview/trunk/Source/reporting/build/web/rdTemplate/rdPopup/rdPopupPanel.css
    cache disabled. (re-)reading file:C:/Users/snickels/Documents/Code/ONEview/trunk/Source/reporting/build/web/rdTemplate/rdPopup/rdPopupPanel.css
    loading CSS file file:C:/Users/snickels/Documents/Code/ONEview/trunk/Source/reporting/build/web/rdTemplate/rdSchedule/rdScheduleStyle.css
    cache disabled. (re-)reading file:C:/Users/snickels/Documents/Code/ONEview/trunk/Source/reporting/build/web/rdTemplate/rdSchedule/rdScheduleStyle.css
    loading CSS file file:C:/Users/snickels/Documents/Code/ONEview/trunk/Source/reporting/build/web/_SupportFiles/css.IpswitchReportingPDF.css
    cache disabled. (re-)reading file:C:/Users/snickels/Documents/Code/ONEview/trunk/Source/reporting/build/web/_SupportFiles/css.IpswitchReportingPDF.css
    can not embed file:C:/Users/snickels/Documents/Code/ONEview/trunk/Source/reporting/build/web/_SupportFiles/images.company_logo.png. Not embeddable color type. Reformatting image…
    cache disabled. (re-)reading file:C:/Users/snickels/Documents/Code/ONEview/trunk/Source/reporting/build/web/_SupportFiles/images.company_logo.png
    image size: 2402
    debug counter: 1
    debug counters: 1
    done in 3776ms.

    And here is the debug log from another PDF export after uploading a new image. Note that the image size changes. However, the resulting PDF displayed the old image.

    version: PD4ML 371b12 Pro
    new parse attempt with: UTF8
    loading CSS file file:C:/Users/snickels/Documents/Code/ONEview/trunk/Source/reporting/build/web/rdTemplate/rdPopup/rdPopupPanel.css
    cache disabled. (re-)reading file:C:/Users/snickels/Documents/Code/ONEview/trunk/Source/reporting/build/web/rdTemplate/rdPopup/rdPopupPanel.css
    loading CSS file file:C:/Users/snickels/Documents/Code/ONEview/trunk/Source/reporting/build/web/rdTemplate/rdSchedule/rdScheduleStyle.css
    cache disabled. (re-)reading file:C:/Users/snickels/Documents/Code/ONEview/trunk/Source/reporting/build/web/rdTemplate/rdSchedule/rdScheduleStyle.css
    loading CSS file file:C:/Users/snickels/Documents/Code/ONEview/trunk/Source/reporting/build/web/_SupportFiles/css.IpswitchReportingPDF.css
    cache disabled. (re-)reading file:C:/Users/snickels/Documents/Code/ONEview/trunk/Source/reporting/build/web/_SupportFiles/css.IpswitchReportingPDF.css
    cache disabled. (re-)reading file:C:/Users/snickels/Documents/Code/ONEview/trunk/Source/reporting/build/web/_SupportFiles/images.company_logo.png
    image size: 3030
    cache disabled. (re-)reading java:/resources/icons/rb-on-big.gif
    image size: 8339
    cache disabled. (re-)reading java:/resources/icons/rb-off-big.gif
    image size: 8576
    cache disabled. (re-)reading java:/resources/icons/rb-off-big.gif
    image size: 8576
    done in 1202ms.

    #28873

    We’ll address the issue tomorrow. Hopefully it will be fixed with the beta release planned this week.

    #28874

    We’ve just refined pd4ml.clearCache() method to remove ALL cached objects, including harmless parsed CSS properties.

    But it seems the issues with the cache reset happened only if you reuse PD4ML instance for multiple conversions (which is not recommended, in general). So I am not sure if we addressed exactly the issue you faced with

    Also -Dpd4ml.cache.enable=false prevents downloaded objects from being cached. Bearing in mind the image size has been changed in the debug output, I’ve got no explanation from where the old image comes from.

    Should we send you an actual development build to test the caching issues on your side?

    #28875

    Using the API to clear the cache instead of setting the property resolved our problem.

    Thanks for replying,

    Clifton Sothoron

    #28876

    Glad you resolved the issue.

Viewing 6 posts - 1 through 6 (of 6 total)

The forum ‘Troubleshooting’ is closed to new topics and replies.