Merging data into PDFs


(Anthony) #1

I'd like to be able to generate PDF documents from data that lives in Squiz assets. Typically starting with a PDF that has some acrobat fields embedded in it, then filling those in based on metadata of one or more assets. For example, a standard template that just needs someone's name and address filled in to personalise it.

 

After a bit of research I've found http://www.webmerge.me/ which seems to offer the type of merging facility I'd need. And they have an REST API that allows you to simply POST data over to a URL that uniquely identifies the document template to be used. There's even a PHP stub as well.

 

Has anyone used that particular service? Or could anyone suggest an alternative that they have made use of?

 

I suspect using the REST assets or triggers could enable me to invoke their functionality. But would anyone like to comment on whether its the type of service that might one day merit a bit of bespoke coding to integrate more tightly (a bit like Nick did recently with Urban Airship)? Populating PDFs on the fly seems like something lots of people might find useful?

 

As ever, any helpful comments or suggestions most welcome!

 

Anthony

 


(Nic Hubbard) #2

I suspect using the REST assets or triggers could enable me to invoke their functionality. But would anyone like to comment on whether its the type of service that might one day merit a bit of bespoke coding to integrate more tightly (a bit like Nick did recently with Urban Airship)? Populating PDFs on the fly seems like something lots of people might find useful?

 

I had at one time, years ago, worked on this functionality. We really needed to do something like this, but after just a bit of work I abandoned the project.

 

I do still think it would be really nice to have though.


(Anthony) #3

Quick update... I managed to get a REST asset to post data to a dummy document on webmerge.me and it all worked fine. Either using their option to have the document emailed or by creating a design with a header of application/pdf to make it pop the result document right up in the browser.

 

There servcie is a bit short on advanced options, so I'm a little limited in what I can do, but the support guy was really helpful so I'm going to persevere.

 

But so far I just put static text into the post data... my challenge now is on the squiz side to figure out how I could get dynamic data from other assets into there... I need to nest something and / or pass lots of GET parameters around... lots to think about but its a start.