As far I know FDK isn't free, but if your version is high enough, Extendscript is included for free.
Correction, AFAIK, there is no charge for using the FDK nor do you need a license to develop plug-ins.
For prototyping and application, it might be easier to develop using Extendscript.
FrameScript from Finite Matters (http://www.framescript.com/) is another scripting alternative (commercial) that may be more robust and is much better documented than Extendscript.
To simply automate FM to PDF conversion, you might want to look one of the FM batch tools like:
Datazone's DZbatcher http://www.miramo.com/english/overview/download.html
Omni Systems Mif2go runfm (part of mif2go): http://mif2go.com/
Sorry Arnis, in my mind FDK = FrameScript - my mistake!
Actually, I believe the FDK is free. FrameScript is not, which is
probably what you were thinking of.