+ Start a Discussion

Uncaught ReferenceError: AcroForm is not defined


Having an issue with attempting to use jsPDF as a library within my lightning component. I have uploaded the zip as a Static Resource, and am have properly included the file in my application.

The issue is when my page loads I get the followign error:

Uncaught ReferenceError: AcroForm is not defined throws at /resource/JSPDF101/jsPDF-1.2.60/dist/jspdf.min.js:238:8028

I've tried the minified and debug version of the file, both of which are giving me the same error message. 

I've been unable to find out why this is happening. Now I had imagined that all of this would be properly handled by the jsPDF file, but seems there are some reference problems. I even attempted to load the acroform.js file as a Static Resource separately but to no avail. 

Any help is greatly appreciated, thank you.
can you share your lightning component code where you add static resource reference for js file ?
Hey Soni

Here is where I add the static resource 
<aura:application >
    <ltng:require styles="/resource/SLDS101/assets/styles/salesforce-lightning-design-system.css"
                  scripts="/resource/JQ101/jquery-3.1.0.min.js, /resource/JSPDF101/jsPDF-1.2.60/dist/jspdf.min.js" />
    <div class="student-roster-app">
        <c:studentRosterList />
hi Hartley
Go to Setup select Critical Update-:
Deactivate:  Enable Lightning LockerService Security

and try again and let me inform it will work or not ! :)

Hey Soni,

The Enable Lightning LockerService Security was already disabled on my sandbox, so that didn't work. Any other ideas?

I still would like some assitance on this ? Or if someone can show me how to use the window.print() function as I can't seem to get that to work either. The print function does not seem to be defined under the window object that Salesforce provides. Any help would be greatly appreciated thank you.
I noticed that if I enabled the Lightning Locker Service this allows me to then access the window object, but I then can't seem to use the print function, any ideas ? I really need to be able to print my html to PDF or just export or print to PDF. If it helps I added my lightning component as a button on VisualForce to load the page.
I was able to just wrap my button wtih an achor tag and use 
This however does not solve my issue with implementing the jsPDF plugin
Renu KyalRenu Kyal
Can you please help me with the code you used in Component and controller to get this working? I am facing the same issue