Depends on "UltimatePDF_ExternalLogic" and "Ultimate PDF" from forge.
On new application creation select UltimatePDF from the application template list.
Detailed documentation and code can be found here.