PDF Generating Tool Support Forum

HOME   Login   Register    Search




  Subject: Reading Watermark image with getResourceAsBytes
   PostPosted: 09 Nov 2011, 01:44 
Have you way to use getResourceAsBytes to load a image to set watermark without a <img> tag?


  Subject: Re: Reading Watermark image with getResourceAsBytes
   PostPosted: 15 Nov 2011, 12:26 
I am not sure if I understand you correctly.

Normally a watermark is defined with API calls like the following:

PD4PageMark footer = new PD4PageMark();
footer.setWatermark("http://server/image.jpg", new Rectangle(10,10,200,200), 30);
pd4ml.setPageFooter(footer);

(It is a bit confusing as it uses footer or header API and actually defines no footer or header)

So as you see there is no <img> tag, you just specify image URL.

The URL may also be of the following protocols "file:" - to read local image file, "java:" - to read a watermark image from JAR and "data:image/png;base64," - to pass base64 encoded images (png, jpeg or gif).



[Reply]     [ 2 posts ] 

cron
Copyright ©2004-10 zefer|org. All rights reserved. Bookmark and Share