PD4ML v4 Forums PD4ML v3 Archived Forums (Read Only) Troubleshooting Reading Watermark image with getResourceAsBytes Re: Re: Reading Watermark image with getResourceAsBytes


I am not sure if I understand you correctly.

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

[language=java:3pa5cvkc]PD4PageMark footer = new PD4PageMark();
footer.setWatermark(“http://server/image.jpg”, new Rectangle(10,10,200,200), 30);
(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 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).