June 2, 2015 fine weather
GitHub website: https://github.com/
The following pdf.js as a case description: Https://github.com/mozilla/pdf.js
1). Click on the download zip to the right of the case website to download the source code and unzip
Note: Of course, you can also use the HTTPS clone URL and the clone in the desktop way to download the source, do not explain
2). Locate the viewer.html file in the Web directory where you unzipped the file, and rename the file with the suffix. jsp.
Note: Of course, you can also check the source of the online demo, and copy the demo source to the corresponding JSP file can be
3). Step-by-step integration of JS, CSS files into the Web project
Note: For convenience, it is best to build a JS, CSS respectively to put JS and CSS files
4). Run the project in Eclipse, and repeatedly combine Google Chrome's console console to view the error problem and resolve it until all errors disappear
In addition, the uploader also provides a better way to get the code, the following simple to say
1). To get a local copy of the current code, clone it using git:
$ git clone git://github.com/mozilla/pdf.js.git$ cd pdf.js
Note: Git for windows:http://msysgit.github.io/, install directly
2). Next, install the node. JS via the official package or via NVM. If everything worked out, run
$ npm install
To install any dependencies for pdf.js.
Note: Nodejs Download official website is: http://nodejs.org/, cannot open the case can turn over the wall or when use other website substitute. To install a problem, you can refer to w3cschool.cc this site, Nodejs do not understand, you can check the Baidu encyclopedia
3). Finally you need to start a local Web server as some browsers does not allow opening PDF files using a file://URL. Run
$ node make server
4). And then you can open
Http://localhost:8888/web/viewer.html
It is also possible to view all test PDF files on the right side by opening
Http://localhost:8888/test/pdfs/?frame
Note: You can search by everything this software when you can't find the Pdf.js folder. Everything is: http://www.voidtools.com/
Solve the problem of source deployment to eclipse from GitHub download web