Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
PUBLIC CLOUD
PRIVATE CLOUD
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Intelligence (Analytics)
PDF with Watermark Performance Issues
Jim Phelps
<p>Our application is creating reports with watermarks and we are finding it takes a long percentage of the process to create (like 10 seconds) and the size of the report goes from 134kb to 537kb if using watermarks on the pages.</p><p> </p><p>Thank you for your help.</p><p> </p><p>Jim</p><p> </p>
Find more posts tagged with
Comments
kclark
<p>What version of birt are you using for your application, what's the size of the watermark image, and what is the format? Depending on the size of the image your using for the watermark this could impact the generation of the PDF since images will be embedded in the PDF. Can you post the java code your using to generate the PDF?</p>
Jim Phelps
<p>The watermarks are png files of 53K</p><p> </p><p>We are using Java and creating PDF's</p><p> </p><p>We are conditionally setting the watermarks with the following jscript in the beforeFactory.</p><p> </p><p>waterMarkURL = params["waterMarkURL"];</p><p><strong class='bbc'>if</strong>(waterMarkURL != <strong class='bbc'>null</strong>){</p><p> //Packages.java.lang.System.out.println("waterMarkURL"+waterMarkURL);</p><p><strong class='bbc'> this</strong>.getMasterPage("Blank first page").getStyle().backgroundImage = waterMarkURL;</p><p><strong class='bbc'> this</strong>.getMasterPage("Header Page 2 and beyond").getStyle().backgroundImage = waterMarkURL;</p><p>}</p><p> </p><p>Would it be faster to embed the watermarks in different templates and conditionally call the template that has the watermark we want to use, rather than setting the backgroundImage at runtime? Ofcourse, I could test this myself, but just checking on other's knowledge is easier
</p><p> </p><p>Thanks,</p><p> </p><p>Jim</p>
kclark
<p>What version of BIRT are you running? I created a small Java program that builds to identical report designs. One with a watermark 24.74kb PNG and the other without. The report is 8 pages and the difference is 1.3kb. Can you post your report design for me to take a look at with the image you are using? The report with the watermark completed in 3382ms and the one without completed in 804ms.</p>