-
Notifications
You must be signed in to change notification settings - Fork 7
Open
Description
This is actually pretty useful if you want to handle PDF's through node.js servers. Ever thought about supporting complex objects? Right now if you want to support dot notation you need to do something like this:
var dataObj = {};
dataObj['user.name'] = 'Bob';
dataObj['user.signature'] = 'CEO';
var fdfContents = fdf.generate(dataObj);
And if you attempt to do anything fancier than a single level deep object it dies:
var dataObj = {};
dataObj.user.name = 'Bob';
dataObj.user.signature = 'CEO';
var fdfContents = fdf.generate(dataObj);
// ^ Dies
I bet you could do some fancy recursive functions and create a path variable that displays an object's dot notation path. Set up an identical object of one that was passed into the .generate(), and you could use that object when you input the name into the .fdf file contents.
Thoughts?
Metadata
Metadata
Assignees
Labels
No labels