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

Fails To Load JavaScript Reference

hazardscout wrote on 2014-10-14:
I'm using PDF Crowd in NodeJS to render some HTML as a PDF. For a few months it worked perfectly, but two weeks ago the graphs stopped showing. When I render the HTML in a browser, everything looks perfect.

After debugging, I noticed that PDFCrowd never loads my main script:
<script src=""></script>

But other scripts load fine:
<script src=""></script>

These are static files served through CloudFront.

The script that fails to load is large at 238KB but other larger scripts load fine. I've read the Limitation docs and I'm well under the 40 second, 20MB upload, 100MB download, 8 redirects, and 2000 resources limits.

Is there a way to understand why PDF Crowd won't load this script?
hazardscout wrote on 2014-10-14:
I've finally discovered and fixed the issue. I doubt it will help anyone, but I'll post my fix anyways.

I have a short jQuery plugin called notify that shows notifications at the top of the page. This lib would not load in PDF Crowd. When bundled with other scripts, it caused the whole bundle to fail to load in PDF Crowd (but worked in Chrome, Safari, etc).

Ultimately I was able to identify the cause - the script used the javascript keyword `class` as a key on an object. This revision fixed the issue and caused the bundle to load properly.
support wrote on 2014-10-15:

Thank you for reporting this. Indeed, using a JS keyword as a property name confuses the JS parser we use. A workaround is to use obj['class'] instead of obj.class