Hi
PLEASE HELP
I have a problem with my PDFBox API.
I am currently getting a PDF Document and then I want to add a string at location
0,0, when i try to save it , it is not saving the changes and it remains as it is.
The Following is the code used:
PDPage page = (PDPage) allPages.get(f);
System.out.println(page);
PDRectangle pageSize = page.findMediaBox();
float stringWidth = font.getStringWidth( ab );
float centeredPosition = (pageSize.getWidth() - (stringWidth*fontSize)/1000f)/2f;
PDPageContentStream contentStream = new PDPageContentStream(pdoc,page,true,true);
contentStream.beginText();
contentStream.setFont( font, fontSize );
//contentStream.addLine(10, 10, 10, 10);
contentStream.moveTextPositionByAmount(0 , 0);
contentStream.drawString( ab );
contentStream.endText();
contentStream.close();
pdoc.save("C:/1/1.pdf");
pdoc.close();