Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #26626

    Have you way to use getResourceAsBytes to load a image to set watermark without a Image from the forum topic: Reading Watermark image with getResourceAsBytes tag?

    #28715

    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 Image from the forum topic: Reading Watermark image with getResourceAsBytes 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).

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

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