0

I need to programmatically edit a PDF file that already exist like the image below. How can I "Open" this document, "Draw" and then "Save" An edited version of this PDF? Thank you

enter image description here

enter image description here

Víctor Gómez
  • 724
  • 6
  • 23

1 Answers1

0

I got it! Used the iText library incorporated the Android Project.

PdfReader pdfReader = new PdfReader("sdcard/local_pdf.pdf");
PdfStamper pdfStamper = new PdfStamper(pdfReader,
        new FileOutputStream("sdcard/local_pdf_fill.pdf"));
content = pdfStamper.getOverContent(1);
content.beginText();
content.setFontAndSize(bf, 9);
content.showTextAligned(PdfContentByte.ALIGN_CENTER, "STRING HERE", x, y, 0);
//max X = 800, max Y = 600, 0 = rotation