build without the generic viewer
See original GitHub issueI just need to use the API (I want to create a custom viewer)
How to…
- build WITHOUT the generic viewer
- build with all dependencies
- compatible with all browsers
- build a worker file together with one pdf.js file where all source files are merged together
# npm install -g gulp-cli
# cd /path/to/pdfjs
# npm install
# gulp bundle
/var/www/pdfjs/node_modules/webpack/lib/webpack.js:7
const Compiler = require("./Compiler");
^^^^^
SyntaxError: Use of const in strict mode.
at Module._compile (module.js:439:25)
at Object.Module._extensions..js (module.js:474:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)
at Module.require (module.js:364:17)
at require (module.js:380:17)
at Object.<anonymous> (/var/www/pdfjs/gulpfile.js:36:16)
at Module._compile (module.js:456:26)
at Object.Module._extensions..js (module.js:474:10)
at Module.load (module.js:356:32)
Issue Analytics
- State:
- Created 6 years ago
- Comments:10 (5 by maintainers)
Top Results From Across the Web
B1 not producing graphics! No current viewer, how to properly ...
During Geant4 installation, I created three directories: build , install/4.10.06.p01 , GEANT4_WORK inside the parent ${SOFTWARE}/academic/geant4 ...
Read more >Extension methods must be defined in a non-generic static class
I'd like to know what causes the bug? But the work-around is to write a new Extension class (not nested) even in same...
Read more >Build a Generic CSV Writer/Reader Using Reflection
In this guide, I will explain how to write a generic CSV Writer/Reader that will automatically pick data from the public properties of...
Read more >Storing and managing build logs | Cloud Build Documentation
Select Logging > Logs Viewer role. Click Save. If your build logs are in the default Google-created Cloud Storage bucket, grant the Project...
Read more >Getting Started
Please refer to this wiki page for information about supported browsers. Prebuilt (modern browsers). Includes the generic build of PDF.js and the viewer....
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
What is
pdf_viewer.js
for? I keep gettingI’m trying out
pageviewer
because it looks more like the old version I have usedIs it not possible just to grap
pdf.js
,pdf_worker.js
andtextlayer
-something and make it work like in the good old days? I don’t need the whole projectThe regressions have been fixed and the examples are working again. The steps outlined in https://github.com/mozilla/pdf.js/issues/8292#issuecomment-294376046 should make all examples work for you as well. I think most problems you decribed happened because we have been refactoring the codebase to use ES6 syntax and you uncovered something we forgot about during the refactoring.
The
pageviewer
/simpleviewer
examples are about as easy as it gets while still having the functionality you ask for, so I don’t think there is more we can do here. Of course, if you feel improvements can be made, feel free to submit a pull request for review. Closing for now as all actionable issues seem to have been resolved.