prerus Posted July 2, 2008 Posted July 2, 2008 (edited) Hi there, I need a way to generate FDF files; I figure if I can make a text file, I can change the extension from txt to fdf and have it work, however there are a few file markers that need to be in the fdf for it to work which may cause problems in writing them to the text file. Those markers are: %FDF-1.2 %âãÏÓ %%EOF Any assistance would be much appreciated. Cheers! Pedrom Adeli Edited July 2, 2008 by Guest
prerus Posted July 2, 2008 Author Posted July 2, 2008 (edited) It's a format that stores PDF field information, here's what a really simple FDF file looks like. edit: Open the file inside with wordpad or notepad. fdfsample.zip Edited July 2, 2008 by Guest rephrase
Lee Smith Posted July 2, 2008 Posted July 2, 2008 I can not remember not being able to open a file that was zipped before, but your file keeps creating archives of itself. Looks like a windows member will have to help you. Lee
prerus Posted July 2, 2008 Author Posted July 2, 2008 Woah, my mistake. The file wasn't in the archive : here it is again fdfsample.zip
comment Posted July 3, 2008 Posted July 3, 2008 It looks like it will always contain data from a single record? If so, you could calculate the contents in a calculation field, then use Export Field Contents to create your file. This assumes that Acrobat can handle the UTF-16 encoding that Filemaker invariably uses when exporting a single field. If not, then exporting as XML with a suitable style-sheet would be a good choice.
prerus Posted July 3, 2008 Author Posted July 3, 2008 It looks like it can handle UTF-16, I'm still having an issue with writing the information to a file. I'm using the old "echo $text >> file" method however, I'm running into a problem with the "<<" section of the FDF format.
comment Posted July 3, 2008 Posted July 3, 2008 I'm afraid I don't follow. I suggested exporting directly from a field - no external scripting should be necessary.
prerus Posted July 7, 2008 Author Posted July 7, 2008 I've just upgraded to FM 9 Advanced and I'm writing a function; I'm not entirely clear on how I can export the fields to fit that template... if you could walk me through it, it would be greatly appreciated.
comment Posted July 7, 2008 Posted July 7, 2008 Here's a simple file that generates a text file identical to yours (except the encoding). FDFgen.fp7.zip
prerus Posted July 10, 2008 Author Posted July 10, 2008 Oh wow, that's really cool. I'll go through the code and post back with any question I may have. Thanks a bunch!
comment Posted July 10, 2008 Posted July 10, 2008 Let us know how it goes, so that we know in case this question comes up again.
ciarliera Posted April 5, 2010 Posted April 5, 2010 When you export the field contents do you change the extension to fdf? I have changed the name in the fdf file to match the name of a pdf form that I have on my desktop and then tried to export the field contents with an .fdf extension and then open with Adobe Reader and Acrobat but it says that the file is damaged... any ideas?
Recommended Posts
This topic is 5346 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now