Wed - Jul 06, 2011 : 05:59 pm
PDFTK - Generate Issues
So, I've been working on this PDF project for awhile, and I think it might be beneficial for me to add some notes which were somewhat elusive on the net.
The FDF file which is generated by PDFTK generate is encoded in UTF-16 character set - and is very hard to work with. I found this script which solves the problem, and allows the FDF file to still function.
I doubt it will work if the field names contain anything other than ASCII.
$ cat Project2.fdf | sed -e's/\x00//g' | sed -e's/\xFE\xFF//g' | less
(change "less" to "> "filename.txt", and it'll output the new fdf file nicely)
That's about it.