/** * This will takes the values from the fdf document and import them into the * PDF document. * * @param pdfDocument The document to put the fdf data into. * @param fdfDocument The FDF document to get the data from. * * @throws IOException If there is an error setting the data in the field. */ public void importFDF( PDDocument pdfDocument, FDFDocument fdfDocument ) throws IOException { PDDocumentCatalog docCatalog = pdfDocument.getDocumentCatalog(); PDAcroForm acroForm = docCatalog.getAcroForm(); acroForm.setCacheFields( true ); acroForm.importFDF( fdfDocument ); }
/** * This will takes the values from the fdf document and import them into the * PDF document. * * @param pdfDocument The document to put the fdf data into. * @param fdfDocument The FDF document to get the data from. * * @throws IOException If there is an error setting the data in the field. */ public void importFDF( PDDocument pdfDocument, FDFDocument fdfDocument ) throws IOException { PDDocumentCatalog docCatalog = pdfDocument.getDocumentCatalog(); PDAcroForm acroForm = docCatalog.getAcroForm(); if (acroForm == null) { return; } acroForm.setCacheFields( true ); acroForm.importFDF( fdfDocument ); //TODO this can be removed when we create appearance streams acroForm.setNeedAppearances(true); }
public void importFDF(PDDocument pdfDocument, FDFDocument fdfDocument) throws IOException { PDDocumentCatalog docCatalog = pdfDocument.getDocumentCatalog(); PDAcroForm acroForm = docCatalog.getAcroForm(); acroForm.setCacheFields(true); acroForm.importFDF(fdfDocument); }
/** * This will takes the values from the fdf document and import them into the * PDF document. * * @param pdfDocument The document to put the fdf data into. * @param fdfDocument The FDF document to get the data from. * * @throws IOException If there is an error setting the data in the field. */ public void importFDF( PDDocument pdfDocument, FDFDocument fdfDocument ) throws IOException { PDDocumentCatalog docCatalog = pdfDocument.getDocumentCatalog(); PDAcroForm acroForm = docCatalog.getAcroForm(); acroForm.setCacheFields( true ); acroForm.importFDF( fdfDocument ); }
/** * This will takes the values from the fdf document and import them into the * PDF document. * * @param pdfDocument The document to put the fdf data into. * @param fdfDocument The FDF document to get the data from. * * @throws IOException If there is an error setting the data in the field. */ public void importFDF( PDDocument pdfDocument, FDFDocument fdfDocument ) throws IOException { PDDocumentCatalog docCatalog = pdfDocument.getDocumentCatalog(); PDAcroForm acroForm = docCatalog.getAcroForm(); if (acroForm == null) { return; } acroForm.setCacheFields( true ); acroForm.importFDF( fdfDocument ); //TODO this can be removed when we create appearance streams acroForm.setNeedAppearances(true); }