G
G
Gena2019-10-30 15:36:04
Java
Gena, 2019-10-30 15:36:04

How to add image to background pdf?

Good afternoon.
Tell me how you can add a picture (watermark) to the background in the finished pdf? What are there for the library?
I have a byte[] pdf, what and how can I use to insert an image in the background. Tried to use pdfbox 2.0 with Overlay embed, end up getting java.io.IOException: Error: Header doesn't contain versioninfo.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
F
Frozen Coder, 2019-10-30
@GAS812

I happened to do this in one of the projects. We used itextpdf 5 . It seems that 5 is no longer supported , but this does not prevent the project from continuing to work). Now they have 7 versions and it seems to be paid - https://itextpdf.com/en
There is a PdfWriter and you can do it with it. Like there was something
Where Image is also a class from itextpdf. He seemed to have several options for creating.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question