java - Merge PDF with FDF output only PDF -
i have pdf , fdf file , want merge them single pdf. .pdf has no fields, these included in .fdf file, contents of fields also. i have several solutions found, these works when fields stored in pdf. i use itext java. does have demo code how can solve problem? thank you! here's code works when fields present in pdf pdfreader pdfreader = new pdfreader(pdfinpath); pdfstamper stamp = new pdfstamper(pdfreader, new fileoutputstream(pdfoutpath)); fdfreader fdfreader = new fdfreader(fdfinpath); acrofields form = stamp.getacrofields(); form.setfields(fdfreader); stamp.close();