Bug 873360 - Profile information storage. (untested, WIP)
Extend generateDocument to extract data from profile.