@Override FDFField exportFDF() throws IOException { FDFField fdfField = new FDFField(); fdfField.setPartialFieldName(getPartialName()); fdfField.setValue(getValue()); List<PDField> children = getChildren(); List<FDFField> fdfChildren = new ArrayList<>(); for (PDField child : children) { fdfChildren.add(child.exportFDF()); } fdfField.setKids(fdfChildren); return fdfField; }
/** * This will export all FDF form data. * * @return An FDF document used to export the document. * @throws IOException If there is an error when exporting the document. */ public FDFDocument exportFDF() throws IOException { FDFDocument fdf = new FDFDocument(); FDFCatalog catalog = fdf.getCatalog(); FDFDictionary fdfDict = new FDFDictionary(); catalog.setFDF(fdfDict); List<FDFField> fdfFields = new ArrayList<>(); List<PDField> fields = getFields(); for (PDField field : fields) { fdfFields.add(field.exportFDF()); } fdfDict.setID(document.getDocument().getDocumentID()); if (!fdfFields.isEmpty()) { fdfDict.setFields(fdfFields); } return fdf; }
@Override FDFField exportFDF() throws IOException { FDFField fdfField = new FDFField(); fdfField.setPartialFieldName(getPartialName()); fdfField.setValue(getValue()); List<PDField> children = getChildren(); List<FDFField> fdfChildren = new ArrayList<>(); for (PDField child : children) { fdfChildren.add(child.exportFDF()); } fdfField.setKids(fdfChildren); return fdfField; }
@Override FDFField exportFDF() throws IOException { FDFField fdfField = new FDFField(); fdfField.setPartialFieldName(getPartialName()); fdfField.setValue(getValue()); List<PDField> children = getChildren(); List<FDFField> fdfChildren = new ArrayList<FDFField>(); for (PDField child : children) { fdfChildren.add(child.exportFDF()); } fdfField.setKids(fdfChildren); return fdfField; }
/** * This will export all FDF form data. * * @return An FDF document used to export the document. * @throws IOException If there is an error when exporting the document. */ public FDFDocument exportFDF() throws IOException { FDFDocument fdf = new FDFDocument(); FDFCatalog catalog = fdf.getCatalog(); FDFDictionary fdfDict = new FDFDictionary(); catalog.setFDF(fdfDict); List<FDFField> fdfFields = new ArrayList<FDFField>(); List<PDField> fields = getFields(); for (PDField field : fields) { fdfFields.add(field.exportFDF()); } fdfDict.setID(document.getDocument().getDocumentID()); if (!fdfFields.isEmpty()) { fdfDict.setFields(fdfFields); } return fdf; }
/** * This will export all FDF form data. * * @return An FDF document used to export the document. * @throws IOException If there is an error when exporting the document. */ public FDFDocument exportFDF() throws IOException { FDFDocument fdf = new FDFDocument(); FDFCatalog catalog = fdf.getCatalog(); FDFDictionary fdfDict = new FDFDictionary(); catalog.setFDF(fdfDict); List<FDFField> fdfFields = new ArrayList<>(); List<PDField> fields = getFields(); for (PDField field : fields) { fdfFields.add(field.exportFDF()); } fdfDict.setID(document.getDocument().getDocumentID()); if (!fdfFields.isEmpty()) { fdfDict.setFields(fdfFields); } return fdf; }