Closed SensationSama closed 7 years ago
Hi @SensationSama, can you provide a full JSFiddle (ore something else) with your code? Thanks!
@dennybiasiolli I'm not on the current version of angular but it's approximately like this.
Script imports at the top are set up for a local directory, so they're definitely wrong via fiddle.
I also nested the <canvas>
content in the inject in the example. (I don't see anywhere to incorporate an additional html file)
@SensationSama I doubt that your example is an angular app. Without a real example I can not tell you where the problem is. Sorry
@SensationSama maybe you have to compile your injection? For the next time remember that deleted comments are sent via email anyway :).
@dennybiasiolli @simobasso I ended up using https://pdfobject.com/
Thanks anyway fellas
Objective
Using the library I was receiving a null context error due to the javascript running before the modal loads. (The Bootstrap devs don't want manipulation to happen from the controller, so there's no event catch for the modal being loaded or ready)
As a lame solution I made it so that the user can press a preview button on the modal. This calls a function injectPdf which adds the rest of the neccessary code to display the PDF. Now it's a simple implementation, but still not working.
Modal Controller
Modal HTML
pdf.html
<canvas id="pdf-canvas"></canvas>
Html gets injected so no clue what is lacking here. Currently it doesn't display and I'm not getting any console errors. Thanks.