This is an archived forum post. The information may be outdated. Contact us if you have any questions.

Javascript MVC frameworks break on Pdfcrowd

jonoomph wrote on 2013-10-29:
Many popular Javascript MVC frameworks, such as Angular.js break when trying to use Pdfcrowd's "Save to PDF link" feature. These frameworks build HTML dynamically in the browser with Javascript after the Document.Ready() event has fired. So, there is always a slight delay as the page is built. If Pdfcrowd offered a 'Delay' setting, where it would allow the Javascript to run for a second or two before parsing the HTML, that might solve the problem.

Please let me know if there is anyway to use the "Save to PDF link" with Javascript frameworks such as Angular.js.

Thanks!
-Jonathan
support wrote on 2013-10-30:
Hello Jonathan,

The API does not provide any 'Delay' setting at the moment.

Pdfcrowd uses a heuristics to decide how long to wait after the onload event is fired. The heuristics mostly works, but there are cases when Javascript is aborted prematurely. The typical causes are ajax calls taking too long or use of the setTimeout()/setInterval() functions.

If your page uses any initial animation, it often helps to turn it off. In general, it helps to do as much work as possible before or right after the onload event is fired. Javascript code executed before the onload event should never be aborted prematurely.
rmorlok wrote on 2014-05-13:
Has there been any change on this? I am also running into problems using Angular.js.
support wrote on 2014-05-14:
Hello,

No changes on this, sorry.