"Examples/Video/ios/Video.xcodeproj/project.pbxproj" did not exist on "6d3dccc91cd67e0820965fd48e77f9bf632b7960"
Commit 189f57df authored by 楊慶堂's avatar 楊慶堂

增加 pdfjs 相關檔案

parent 8312d5d4
......@@ -4,7 +4,7 @@ android {
compileSdkVersion 27
defaultConfig {
applicationId "pdfjs.scott.idv.androidpdfjs"
minSdkVersion 15
minSdkVersion 16
targetSdkVersion 27
versionCode 1
versionName "1.0"
......
RCopyright 1990-2009 Adobe Systems Incorporated.
All rights reserved.
See ./LICENSECNS2-H
\ No newline at end of file
RCopyright 1990-2009 Adobe Systems Incorporated.
All rights reserved.
See ./LICENSE ETen-B5-H` ^
\ No newline at end of file
RCopyright 1990-2009 Adobe Systems Incorporated.
All rights reserved.
See ./LICENSE!!]aX!!]`21> p z$]"Rd-U7* 4%+ Z {/%<9Kb1]." `],"]
"]h"]F"]$"]"]`"]>"]"]z"]X"]6"]"]r"]P"]."] "]j"]H"]&"]"]b"]@"]"]|"]Z"]8"]"]t"]R"]0"]"]l"]J"]("]"]d"]B"] "X~']W"]5"]"]q"]O"]-"] "]i"]G"]%"]"]a"]?"]"]{"]Y"]7"]"]s"]Q"]/"] "]k"]I"]'"]"]c"]A"]"]}"]["]9
\ No newline at end of file
%%Copyright: -----------------------------------------------------------
%%Copyright: Copyright 1990-2009 Adobe Systems Incorporated.
%%Copyright: All rights reserved.
%%Copyright:
%%Copyright: Redistribution and use in source and binary forms, with or
%%Copyright: without modification, are permitted provided that the
%%Copyright: following conditions are met:
%%Copyright:
%%Copyright: Redistributions of source code must retain the above
%%Copyright: copyright notice, this list of conditions and the following
%%Copyright: disclaimer.
%%Copyright:
%%Copyright: Redistributions in binary form must reproduce the above
%%Copyright: copyright notice, this list of conditions and the following
%%Copyright: disclaimer in the documentation and/or other materials
%%Copyright: provided with the distribution.
%%Copyright:
%%Copyright: Neither the name of Adobe Systems Incorporated nor the names
%%Copyright: of its contributors may be used to endorse or promote
%%Copyright: products derived from this software without specific prior
%%Copyright: written permission.
%%Copyright:
%%Copyright: THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
%%Copyright: CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
%%Copyright: INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
%%Copyright: MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
%%Copyright: DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
%%Copyright: CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
%%Copyright: SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
%%Copyright: NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
%%Copyright: LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
%%Copyright: HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
%%Copyright: CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
%%Copyright: OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
%%Copyright: SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
%%Copyright: -----------------------------------------------------------
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=5">
<title>PDF Viewer</title>
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<style type="text/css">
canvas {
width: 100%;
border: 1px solid black;
}
</style>
<script type="text/javascript" src="pdf.min.js"></script>
<script type="text/javascript">
const url = location.search.substring(1);
PDFJS.cMapUrl = 'cmaps/';
PDFJS.cMapPacked = true;
let pdfDoc = null;
function createPage() {
const div = document.createElement('canvas');
document.body.appendChild(div);
return div;
}
function renderPage(num) {
pdfDoc.getPage(num).then((page) => {
let scale = 1;
let viewport = page.getViewport(scale);
let canvas = createPage();
let ctx = canvas.getContext('2d');
canvas.height = viewport.height;
canvas.width = viewport.width;
let renderTask = page.render({
canvasContext: ctx,
viewport
});
renderTask.then(() => {
if(num < pdfDoc.numPages) {
renderPage(num+1);
}
});
});
}
PDFJS.getDocument(url).then((pdf) => {
pdfDoc = pdf;
renderPage(1);
});
</script>
</head>
<body>
</body>
</html>
\ No newline at end of file
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment