()
| 95 | } |
| 96 | |
| 97 | public Integer call() |
| 98 | { |
| 99 | ImportXFDF importer = new ImportXFDF(); |
| 100 | try (PDDocument pdf = Loader.loadPDF(infile); |
| 101 | FDFDocument fdf = Loader.loadXFDF(xfdffile)) |
| 102 | { |
| 103 | importer.importFDF( pdf, fdf ); |
| 104 | |
| 105 | if (outfile == null) |
| 106 | { |
| 107 | outfile = infile; |
| 108 | } |
| 109 | |
| 110 | pdf.save(outfile); |
| 111 | } |
| 112 | catch (IOException ioe) |
| 113 | { |
| 114 | SYSERR.println( "Error importing XFDF data [" + ioe.getClass().getSimpleName() + "]: " + ioe.getMessage()); |
| 115 | return 4; |
| 116 | } |
| 117 | return 0; |
| 118 | } |
| 119 | } |