Using the PDFBox library to embed an Image to a PDF document
I tried to embed an image into a PDF using the apache POI and iText libraries but none of them worked to me. So I tried with the pdfbox library and it worked!
I tried to embed an image into a PDF using the apache POI and iText libraries but none of them worked to me. So I tried with the pdfbox library and it worked!
In this post I will show a Java function that pastes an image into a brand new PDF. The input and output of this function will be Base64 encoded.
Why did I need it? The client requested that the images attached to the case be converted to PDF in order to be sent to a service that only accepts PDF documents.