0
Wie bekomme ich Feldposition mit PDFBox 2.0.0? mit PDFBox 1.8.11 funktioniert es mir wie folgt aus:pdfbox PDFBox 2.0.0 bekomme Feldposition
String formTemplate = "Template.pdf";
PDDocument pdfDocument = PDDocument.load(new File(formTemplate));
PDDocumentCatalog docCatalog = pdfDocument.getDocumentCatalog();
PDAcroForm acroForm = docCatalog.getAcroForm();
String fieldName = "Name";
PDField f = acroForm.getField(fieldName);
if (f != null) {
PDRectangle r = f.getWidget().getRectangle();
float llx = r.getLowerLeftX();
float lly = r.getLowerLeftY();
float urx = r.getUpperRightX();
float ury = r.getUpperRightY();
Jetzt f.getWidget() Sie nicht mehr arbeiten ..
dank ron