Skip to content
This repository has been archived by the owner on Jun 25, 2024. It is now read-only.

Commit

Permalink
Use legalthings/pdf.js-viewer
Browse files Browse the repository at this point in the history
  • Loading branch information
moesjarraf committed Sep 2, 2015
1 parent cb014db commit 3b6a70f
Show file tree
Hide file tree
Showing 367 changed files with 54 additions and 76,677 deletions.
38 changes: 25 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,28 +16,40 @@ Also note that images, translations and such are being loaded from the `web` fol
**View**
```html
<!DOCTYPE html>
<html ng-app="app" ng-controller="AppCtrl">
<html lang="en" data-ng-app="app" ng-controller="AppCtrl">
<head>
<meta charset="utf-8"/>
<title>Angular PDF.js demo</title>
<meta name="viewport" content="width=device-width, initial-scale=1">

<!-- pdfjs dependencies -->
<link rel="stylesheet" href="vendor/angular-pdfjs/dist/web/viewer.css"/>
<link rel="resource" type="application/l10n" href="vendor/angular-pdfjs/dist/web/locale/locale.properties"/>
<script src="vendor/angular-pdfjs/dist/web/l10n.js"></script>
<script src="vendor/angular-pdfjs/dist/build/pdf.js"></script>
<script src="vendor/angular-pdfjs/dist/build/pdf.worker.js"></script>
<script src="vendor/angular-pdfjs/dist/web/compatibility.js"></script>
<script src="vendor/angular-pdfjs/dist/web/debugger.js"></script>
<script src="vendor/angular-pdfjs/dist/web/viewer.js"></script>
<link rel="stylesheet" href="bower_components/pdf.js-viewer/viewer.css"/>
<script src="bower_components/pdf.js-viewer/pdf.worker.js"></script>
<script src="bower_components/pdf.js-viewer/pdf.js"></script>

<!-- angular dependencies -->
<script src="vendor/angular/angular.js"></script>
<script src="vendor/angular-pdfjs/dist/pdfjs-viewer.js"></script>
<script src="app.js"></script>
<script src="bower_components/angular/angular.js"></script>
<script src="dist/pdfjs-viewer.js"></script>
<script src="demo/app.js"></script>

<style>
html, body {
height: 100%;
width: 100%;
margin: 0;
padding: 0;
}
.some-pdf-container {
width: 100%;
height: 100%;
}
</style>
</head>
<body>
<pdfjs-viewer src="{{ pdf.src }}"></pdfjs-viewer>
<div class='some-pdf-container'>
<pdfjs-viewer src="{{ pdf.src }}" download="true" print="false" open="false"></pdfjs-viewer>
</div>
</body>
</html>
```
Expand Down
3 changes: 2 additions & 1 deletion bower.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
"url": "git://github.com/legalthings/angular-pdfjs.git"
},
"dependencies": {
"angular": "~1.4.3"
"angular": "~1.4.3",
"pdf.js-viewer": "https://github.com/legalthings/pdf.js-viewer.git#0.1.0"
}
}
29 changes: 20 additions & 9 deletions demo/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,21 +6,32 @@
<meta name="viewport" content="width=device-width, initial-scale=1">

<!-- pdfjs dependencies -->
<link rel="stylesheet" href="dist/web/viewer.css"/>
<link rel="resource" type="application/l10n" href="dist/web/locale/locale.properties"/>
<script src="dist/web/l10n.js"></script>
<script src="dist/build/pdf.js"></script>
<script src="dist/build/pdf.worker.js"></script>
<script src="dist/web/compatibility.js"></script>
<script src="dist/web/debugger.js"></script>
<script src="dist/web/viewer.js"></script>
<link rel="stylesheet" href="bower_components/pdf.js-viewer/viewer.css"/>
<script src="bower_components/pdf.js-viewer/pdf.worker.js"></script>
<script src="bower_components/pdf.js-viewer/pdf.js"></script>

<!-- angular dependencies -->
<script src="bower_components/angular/angular.js"></script>
<script src="dist/pdfjs-viewer.js"></script>
<script src="demo/app.js"></script>

<style>
html, body {
height: 100%;
width: 100%;
margin: 0;
padding: 0;
}

.some-pdf-container {
width: 100%;
height: 100%;
}
</style>
</head>
<body>
<pdfjs-viewer src="{{ pdf.src }}" download="true" print="false" open="false"></pdfjs-viewer>
<div class='some-pdf-container'>
<pdfjs-viewer src="{{ pdf.src }}" download="true" print="false" open="false"></pdfjs-viewer>
</div>
</body>
</html>
Loading

0 comments on commit 3b6a70f

Please sign in to comment.