When I'm appending the text in pdf using pdfbox is working fine but the problem is that text append inversely.
Example:
I'm adding some text in (x,y)=(0,0) The text added in last of the page. The text should be added in the first of the page.
PDDocument pDDocument = PDDocument.load(new java.io.File(filePath));
PDPage page = new PDPage();
page = pDDocument.getPages().get(0);
PDPageContentStream pDPageContentStream = new PDPageContentStream(pDDocument,page,PDPageContentStream.AppendMode.APPEND,true,true);
pDPageContentStream.setFont(org.apache.pdfbox.pdmodel.font.PDType1Font.TIMES_BOLD_ITALIC, 12);
pDPageContentStream.beginText();
pDPageContentStream.newLineAtOffset(0, 0);
pDPageContentStream.showText("Welcome!");
pDPageContentStream.endText();
pDPageContentStream.close();
pDDocument.save(newFilePath);
pDDocument.close();
When I'm set the position of the newLineAtOffset(0,0). Expected result, text should be added in the first of the page.