Reputation: 53
I'm trying to generate a pdf from a twig that's modified in the client side. To do so I'm sending the html document to the server through AJAX but that's not possible since I'm receiving a binary document that can't be handled by JavaScript. Using a simple link neither is valid since I have to send the current twig state... Any suggestions?
Thanks everybody.
Upvotes: 1
Views: 1376
Reputation: 53
Examine the js here, it does almost the same and has choices for saving result, loading to a new window or displaying inline as embed. cloudformatter.com/CSS2Pdf
The solution gived by Kevin Brown was perfect.
Upvotes: 1