I'm having some trouble placing an image in the bottom-left corner of a PDF document.
Here's my code:
PdfReader reader = new PdfReader("source.pdf");
PdfStamper stamper = new PdfStamper(reader, new FileOutputStream(pdfTarget));
Image qrImg = Image.getInstance("qrcode.png");
qrImg.setAbsolutePosition(0,0);
// place the image at the i-th page
PdfContentByte content = stamper.getOverContent(i);
content.addImage(qrImg);
This works for almost every pdf document I tried unless a single one that you can find here: https://ufile.io/50016
For this document the bottom left corner starts at (50,50) so the absolute position should be (50,50) that is incorrect for all the others pdfs.
I can't find a way to place the image at (0,0) or any other fixed absolute position that results in placing it always at the bottom left corner. Any advice?