Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can we have a simple example without system.js? #9784

Closed
aidanlister opened this issue Jun 6, 2018 · 3 comments
Closed

Can we have a simple example without system.js? #9784

aidanlister opened this issue Jun 6, 2018 · 3 comments
Labels

Comments

@aidanlister
Copy link

Is there not enough PDF.JS to learn without trying to work out the System.JS stuff?

// In production, the bundled pdf.js shall be used instead of SystemJS.
Promise.all([System.import('pdfjs/display/api'),
             System.import('pdfjs/display/worker_options'),
             System.import('pdfjs/display/network'),
             System.resolve('pdfjs/worker_loader')])
       .then(function (modules) {
  var api = modules[0];
  var GlobalWorkerOptions = modules[1].GlobalWorkerOptions;
  var network = modules[2];
@Snuffleupagus
Copy link
Collaborator

Maybe it'd make sense to simply remove https://github.com/mozilla/pdf.js/tree/master/examples/helloworld, and update all the relevant links to point to https://github.com/mozilla/pdf.js/blob/master/examples/learning/helloworld.html instead?
Especially since the example is using PDF.js without building it first, which (as far as I know) isn't officially supported and thus probably shouldn't be advertised in this kind of highly visible way.

Similarly, https://github.com/mozilla/pdf.js/blob/master/examples/svgviewer probably ought to be updated as well. Or it might be better to just replace it with a (much simpler) components based svgviewer example?

@timvandermeij What do you think?

@timvandermeij
Copy link
Contributor

timvandermeij commented Jun 6, 2018

Yes, I think reconsidering the examples is a good idea here. We should advertise the components as much as possible since it's the easiest way to build upon the PDF.js library.

@Bluejanis
Copy link

I wish there were some examples on how to use pdfjs with systemjs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants