I've been trying to get the helloworld example for pdf.js to run in Meteor. So far I have:
Stripped out almost everything from index.html:
<body>
<canvas id="the-canvas" style="border:1px solid black;"/>
</body>
I thought this was enough to have the example working, but Meteor ends up complaining about the "!DOCTYPE html" declaration in pdf.js, which doesn't exist inside the file, so I am guessing that it gets imported from somewhere.
It feels like I'm missing something obvious to get this working, is there an easy solution for this?
(Aside: I am aware of the pdf.js smart package, but since I am doing development on Windows it's not really an option for me because I can't get Meteorite. Although I figure that since a smart package already exists, it's quite doable get the two to work together.)
PDF. js is an open-source JavaScript PDF viewer that renders PDF using web standards-compliant HTML5. Primarily seen in Mozilla Firefox's as the built-in PDF viewer, PDF. js also serves as an easy way for developers and integrators to embed PDF viewing capabilities in a web app or server.
js is a JavaScript library that renders Portable Document Format (PDF) files using the web standards-compliant HTML5 Canvas.
PDF. js is an open source project and always looking for more contributors.
Meteor shouldn't really complain about the doctype declaration in js files. Is this a built version of pdf.js?
You can technically use atmosphere packages in your project by copying over the files as described in package.js
and smart.json
at the repo, in this case at https://github.com/peerlibrary/meteor-pdf.js
i.e add coffeescript & underscore (in api.use
)
meteor add coffeescript underscore
Then copy the files over to your server
dir: (as in api.add_files
)
bootstrap.coffee
server.coffee
Then you have it installed as if it were put in by meteorite only the files are physically put in, additionally a node module is also required as described at https://github.com/peerlibrary/meteor-pdf.js
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With