Merge pull request #7268 from yurydelendik/components-samples
Better components examples.
This commit is contained in:
commit
3cbaa9a499
@ -29,16 +29,17 @@ limitations under the License.
|
|||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
<link rel="stylesheet" href="../../build/components/pdf_viewer.css">
|
<link rel="stylesheet" href="../../build/dist/web/pdf_viewer.css">
|
||||||
|
|
||||||
<!-- for legacy browsers -->
|
<!-- for legacy browsers -->
|
||||||
<script src="../../build/components/compatibility.js"></script>
|
<script src="../../build/dist/web/compatibility.js"></script>
|
||||||
<script src="../../build/pdf.js"></script>
|
|
||||||
<script src="../../build/components/pdf_viewer.js"></script>
|
<script src="../../build/dist/build/pdf.js"></script>
|
||||||
|
<script src="../../build/dist/web/pdf_viewer.js"></script>
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body tabindex="1">
|
<body tabindex="1">
|
||||||
<div id="pageContainer" class="pdfPage"></div>
|
<div id="pageContainer" class="pdfViewer singlePageView"></div>
|
||||||
|
|
||||||
<script src="pageviewer.js"></script>
|
<script src="pageviewer.js"></script>
|
||||||
</body>
|
</body>
|
||||||
|
@ -16,17 +16,17 @@
|
|||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
if (!PDFJS.PDFViewer || !PDFJS.getDocument) {
|
if (!PDFJS.PDFViewer || !PDFJS.getDocument) {
|
||||||
alert('Please build the library and components using\n' +
|
alert('Please build the pdfjs-dist library using\n' +
|
||||||
' `gulp generic components`');
|
' `gulp dist`');
|
||||||
}
|
}
|
||||||
|
|
||||||
// The workerSrc property shall be specified.
|
// The workerSrc property shall be specified.
|
||||||
//
|
//
|
||||||
PDFJS.workerSrc = '../../build/pdf.worker.js';
|
PDFJS.workerSrc = '../../build/dist/build/pdf.worker.js';
|
||||||
|
|
||||||
// Some PDFs need external cmaps.
|
// Some PDFs need external cmaps.
|
||||||
//
|
//
|
||||||
// PDFJS.cMapUrl = '../../external/bcmaps/';
|
// PDFJS.cMapUrl = '../../build/dist/cmaps/';
|
||||||
// PDFJS.cMapPacked = true;
|
// PDFJS.cMapPacked = true;
|
||||||
|
|
||||||
var DEFAULT_URL = '../../web/compressed.tracemonkey-pldi-09.pdf';
|
var DEFAULT_URL = '../../web/compressed.tracemonkey-pldi-09.pdf';
|
||||||
|
@ -35,12 +35,13 @@ limitations under the License.
|
|||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
<link rel="stylesheet" href="../../build/components/pdf_viewer.css">
|
<link rel="stylesheet" href="../../build/dist/web/pdf_viewer.css">
|
||||||
|
|
||||||
<!-- for legacy browsers -->
|
<!-- for legacy browsers -->
|
||||||
<script src="../../build/components/compatibility.js"></script>
|
<script src="../../build/dist/web/compatibility.js"></script>
|
||||||
<script src="../../build/pdf.js"></script>
|
|
||||||
<script src="../../build/components/pdf_viewer.js"></script>
|
<script src="../../build/dist/build/pdf.js"></script>
|
||||||
|
<script src="../../build/dist/web/pdf_viewer.js"></script>
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body tabindex="1">
|
<body tabindex="1">
|
||||||
|
@ -16,17 +16,17 @@
|
|||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
if (!PDFJS.PDFViewer || !PDFJS.getDocument) {
|
if (!PDFJS.PDFViewer || !PDFJS.getDocument) {
|
||||||
alert('Please build the library and components using\n' +
|
alert('Please build the pdfjs-dist library using\n' +
|
||||||
' `gulp generic components`');
|
' `gulp dist`');
|
||||||
}
|
}
|
||||||
|
|
||||||
// The workerSrc property shall be specified.
|
// The workerSrc property shall be specified.
|
||||||
//
|
//
|
||||||
PDFJS.workerSrc = '../../build/pdf.worker.js';
|
PDFJS.workerSrc = '../../build/dist/build/pdf.worker.js';
|
||||||
|
|
||||||
// Some PDFs need external cmaps.
|
// Some PDFs need external cmaps.
|
||||||
//
|
//
|
||||||
// PDFJS.cMapUrl = '../../external/bcmaps/';
|
// PDFJS.cMapUrl = '../../build/dist/cmaps/';
|
||||||
// PDFJS.cMapPacked = true;
|
// PDFJS.cMapPacked = true;
|
||||||
|
|
||||||
var DEFAULT_URL = '../../web/compressed.tracemonkey-pldi-09.pdf';
|
var DEFAULT_URL = '../../web/compressed.tracemonkey-pldi-09.pdf';
|
||||||
|
@ -37,6 +37,15 @@
|
|||||||
border: none;
|
border: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.pdfViewer.singlePageView {
|
||||||
|
display: inline-block;
|
||||||
|
}
|
||||||
|
|
||||||
|
.pdfViewer.singlePageView .page {
|
||||||
|
margin: 0;
|
||||||
|
border: none;
|
||||||
|
}
|
||||||
|
|
||||||
.pdfViewer .page canvas {
|
.pdfViewer .page canvas {
|
||||||
margin: 0;
|
margin: 0;
|
||||||
display: block;
|
display: block;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user