html Phonegap rotate_camera_pdf_version1
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了html Phonegap rotate_camera_pdf_version1相关的知识,希望对你有一定的参考价值。
<!DOCTYPE html>
<!--
Copyright (c) 2012-2014 Adobe Systems Incorporated. All rights reserved.
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
-->
<html>
<head>
<meta charset="utf-8" />
<meta name="format-detection" content="telephone=no" />
<meta name="msapplication-tap-highlight" content="no" />
<!-- WARNING: for iOS 7, remove the width=device-width and height=device-height attributes. See https://issues.apache.org/jira/browse/CB-4323 -->
<meta name="viewport" content="user-scalable=no, initial-scale=1, maximum-scale=1, minimum-scale=1, width=device-width, height=device-height, target-densitydpi=device-dpi" />
<link rel="stylesheet" type="text/css" href="css/index.css" />
<title>Hello World</title>
</head>
<style>
canvas
{
border:1px solid red;
}
</style>
<body>
<div>
<h1>Hi Nicole v_rotateer</h1>
<div id="deviceready" class="blink">
<p class="event listening">Connecting to Device</p>
<p class="event received">Device is Ready</p>
</div>
<img id="myImage" width="300px" onclick="rCanvas(this.src, this.id)"/>
<br/>
<img id="ti3" onclick="rCanvas(this.src, this.id)" src="data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAAQABAAD/2wBDAAEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQH/2wBDAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEB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ZNNnBbj995UrQ/aPN2d6+OwzmqSU8NJSTd/w8j93ljcJaHtcTlfNyR5ee/Lya8vsbP+Fbb+/zn//Z"/>
<div>
<br/>
<button style="width: 300px; height: 60px" onclick="pdf()">Create the pdf with an image</button>
<br/>
<button style="width: 300px; height: 60px" onclick="take_photo()">Add photo</button>
<br/>
<button style="width: 300px; height: 60px" onclick="resample_photo()">Resample photo to 300px wide</button>
</div>
</div>
<!-----------SCRIPTS-------------------------------------->
<script type="text/javascript" src="cordova.js"></script>
<script type="text/javascript" src="js/index.js"></script>
<script type="text/javascript" src="js/jquery-1.11.3.min.js"></script>
<script type="text/javascript" src="js/jspdf.js"></script>
<script type="text/javascript" src="js/jspdf.plugin.standard_fonts_metrics.js"></script>
<script type="text/javascript" src="js/jspdf.plugin.split_text_to_size.js"></script>
<script type="text/javascript" src="js/jspdf.plugin.from_html.js"></script>
<script type="text/javascript" src="js/jspdf.plugin.addimage.js"></script>
<script type="text/javascript">
app.initialize();
</script>
<script>
function rCanvas(b64_string, id)
{
var display_width = 300; //the rotated image will always be this wide
var img = document.createElement('IMG');
img.src = b64_string;
var canvas = document.createElement('canvas');
var ctx = canvas.getContext("2d");
canvas.width = img.width;
canvas.height = img.height;
ctx.drawImage(img, 0, 0, img.width, img.height, 0, 0, img.width, img.height);
// create a temporary canvas
var tempCanvas = document.createElement('canvas');
var tempCtx = tempCanvas.getContext('2d');
// resize the tempCanvas
tempCanvas.width = img.height;
tempCanvas.height = img.width;
// translate+rotate and draw the resized image to tempCanvas
tempCtx.translate(img.height/ 2, img.width/ 2);
tempCtx.rotate(Math.PI / 2);
tempCtx.drawImage(canvas, 0, 0, img.width, img.height, -img.width/2, -img.height/2, img.width, img.height);
//just put the tempCanvas on the page
//document.body.appendChild(tempCanvas);
if(img.width >= img.height)
{
document.getElementById(id).width = display_width/img.width * img.height;
document.getElementById(id).height = display_width;
}
else
{
document.getElementById(id).width = display_width;
document.getElementById(id).height = display_width/img.height * img.width;
}
document.getElementById(id).src = tempCanvas.toDataURL("image/jpeg", 1);
}
</script>
<script>
/*Xperia phones will not update once file is save without first restarting the phone. In this case the pdf will need
to be emailed to yourself OR the phone must be reset before the MTP picks up the new file*/
function pdf()
{
var imgData = 'data:image/jpeg;base64,/9j/4QAYRXhpZgAASUkqAAgAAAAAAAAAAAAAAP/sABFEdWNreQABAAQAAABQAAD/4QMzaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wLwA8P3hwYWNrZXQgYmVnaW49Iu+7vyIgaWQ9Ilc1TTBNcENlaGlIenJlU3pOVGN6a2M5ZCI/PiA8eDp4bXBtZXRhIHhtbG5zOng9ImFkb2JlOm5zOm1ldGEvIiB4OnhtcHRrPSJBZG9iZSBYTVAgQ29yZSA1LjMtYzAxMSA2Ni4xNDY3MjksIDIwMTIvMDUvMDMtMTM6NDA6MDMgICAgICAgICI+IDxyZGY6UkRGIHhtbG5zOnJkZj0iaHR0cDovL3d3dy53My5vcmcvMTk5OS8wMi8yMi1yZGYtc3ludGF4LW5zIyI+IDxyZGY6RGVzY3JpcHRpb24gcmRmOmFib3V0PSIiIHhtbG5zOnhtcD0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wLyIgeG1sbnM6eG1wTU09Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9tbS8iIHhtbG5zOnN0UmVmPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvc1R5cGUvUmVzb3VyY2VSZWYjIiB4bXA6Q3JlYXRvclRvb2w9IkFkb2JlIFBob3Rvc2hvcCBFbGVtZW50cyAxMi4wIFdpbmRvd3MiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6MkZCNUJDRDc3NDg4MTFFNThCNTM4MjdGODI2RTlGNzciIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6MkZCNUJDRDg3NDg4MTFFNThCNTM4MjdGODI2RTlGNzciPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2V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mjTqZmKqq0rmQEGZp+DiG3H/0iDvZ9Kv8AYrZYt5uIJO9c2qRoAiwT3tZAARqARXHDLlgtbY6+b+Atkx5beC/yDl3YGKzkllvYFDuOjsPr1MwGUrrUczk2G8GRO2iZTdw47pjs20Nn9tO7Jt/uq1qJWSPfNsuLERxSqAbiILcq7ISCR24nAIBoTTLC3fse/jT4pp/wVXa5WVvwajr/AB1Oj3ejkh0FCkcZPYZhpPTkVoxpmef+uMVtRfkdwk40LIe3A/VQyMNVMwpzA40qD/ljqq5OC38sghmjVgrO8EjPJO4BLOxIYClTTLhXDND0CzvBDb61Khm1kUPU2XMcDXOhy54aqmyOgOTO1WYkJkGL0IpQKCKg0amo/D8sGqoPFVJMuktq1lVoHblWgy+Rz/FMESnQ9MA9fbhHHrYyHWwL1U05E1qedMvwKHpjb0QO9vEAP+Y7d/ePs+/z7fer/urw7lfqp/0ryxY/hW2SKfl137T/2Q==';
var doc = new jsPDF();
doc.setFontSize(40);
doc.text(35, 25, "Image should be below");
doc.addImage(imgData, 'JPEG', 15, 40, 180, 180); //data, type, xpos, ypos, width, height
//doc.output('dataurl');
//doc.save('sample-file.pdf');
var pdfOutput = doc.output();
var length = pdfOutput.length;
var arrBuffer = new Uint8Array(new ArrayBuffer(length));
var i = 0;
for (; i < length; i++)
{
arrBuffer[i] = pdfOutput.charCodeAt(i);
}
// Overwrite the output variable with a blob
pdfOutput = new Blob([arrBuffer], {type: "application/pdf"});
window.requestFileSystem(LocalFileSystem.PERSISTENT, 0, function(fileSystem) {
console.log(fileSystem.name);
console.log(fileSystem.root.name);
console.log(fileSystem.root.fullPath);
fileSystem.root.getFile("Download/test.pdf", {create: true}, function(entry) {
var fileEntry = entry;
console.log(entry);
entry.createWriter(function(writer) {
writer.onwrite = function(evt) {
console.log("write success");
};
console.log("writing to file");
writer.write( pdfOutput );
}, function(error) {
console.log(error);
});
}, function(error){
console.log(error);
});
},
function(event){
console.log( evt.target.error.code );
});
alert("pdf created");
}
</script>
<script>
function take_photo()
{
navigator.camera.getPicture(onSuccess, onFail, { quality: 50, destinationType: Camera.DestinationType.DATA_URL });
}
function onSuccess(imageURI)
{
//var image = document.getElementById('myImage');
//image.src = "data:image/jpeg;base64," + imageURI;
resample_photo('myImage', 600, 300, "data:image/jpeg;base64," + imageURI)
}
function onFail(message)
{
alert('Failed because: ' + message);
}
function test()
{
alert("tested");
}
</script>
<script>
function resample_photo(holder_image, resampled_width, display_width, b64)
{
//var resampled_width = 600; //pixels to make the image this wide (height is automatically detected)
//var display_width = 300;
//var b64 = 'data:image/jpeg;base64,/9j/4QAYRXhpZgAASUkqAAgAAAAAAAAAAAAAAP/sABFEdWNreQABAAQAAABQAAD/4QMzaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wLwA8P3hwYWNrZXQgYmVnaW49Iu+7vyIgaWQ9Ilc1TTBNcENlaGlIenJlU3pOVGN6a2M5ZCI/PiA8eDp4bXBtZXRhIHhtbG5zOng9ImFkb2JlOm5zOm1ldGEvIiB4OnhtcHRrPSJBZG9iZSBYTVAgQ29yZSA1LjMtYzAxMSA2Ni4xNDY3MjksIDIwMTIvMDUvMDMtMTM6NDA6MDMgICAgICAgICI+IDxyZGY6UkRGIHhtbG5zOnJkZj0iaHR0cDovL3d3dy53My5vcmcvMTk5OS8wMi8yMi1yZGYtc3ludGF4LW5zIyI+IDxyZGY6RGVzY3JpcHRpb24gcmRmOmFib3V0PSIiIHhtbG5zOnhtcD0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wLyIgeG1sbnM6eG1wTU09Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9tbS8iIHhtbG5zOnN0UmVmPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvc1R5cGUvUmVzb3VyY2VSZWYjIiB4bXA6Q3JlYXRvclRvb2w9IkFkb2JlIFBob3Rvc2hvcCBFbGVtZW50cyAxMi4wIFdpbmRvd3MiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5pa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5NCdKQEzzGKE6lIlYsI4+GrPI8uf45YFEh1oUt5NLJKcyI2/wDGmomukHVU1IJIPDlwpgtUejUq3dgrM1DqozNT15U/X5f4kR521Kv7qLvadB0etFpp409fh88E2sju1FXFuLTLog2hrguOmSzsolAU5Vyt64dvjnrb5mg30X2pv3IjK7tc6vstkvmjTqZmKqq0rmQEGZp+DiG3H/0iDvZ9Kv8AYrZYt5uIJO9c2qRoAiwT3tZAARqARXHDLlgtbY6+b+Atkx5beC/yDl3YGKzkllvYFDuOjsPr1MwGUrrUczk2G8GRO2iZTdw47pjs20Nn9tO7Jt/uq1qJWSPfNsuLERxSqAbiILcq7ISCR24nAIBoTTLC3fse/jT4pp/wVXa5WVvwajr/AB1Oj3ejkh0FCkcZPYZhpPTkVoxpmef+uMVtRfkdwk40LIe3A/VQyMNVMwpzA40qD/ljqq5OC38sghmjVgrO8EjPJO4BLOxIYClTTLhXDND0CzvBDb61Khm1kUPU2XMcDXOhy54aqmyOgOTO1WYkJkGL0IpQKCKg0amo/D8sGqoPFVJMuktq1lVoHblWgy+Rz/FMESnQ9MA9fbhHHrYyHWwL1U05E1qedMvwKHpjb0QO9vEAP+Y7d/ePs+/z7fer/urw7lfqp/0ryxY/hW2SKfl137T/2Q==';
var img = document.createElement('IMG');
img.src = b64;
var canvas = document.createElement('canvas');
var ctx = canvas.getContext("2d");
canvas.width = resampled_width;
canvas.height = (resampled_width/img.width) * img.height;
ctx.drawImage(img, 0, 0, img.width, img.height, 0, 0, canvas.width, canvas.height);
//just put the tempCanvas on the page
//document.body.appendChild(canvas);
document.getElementById(holder_image).width = display_width;
document.getElementById(holder_image).height = display_width/canvas.width * canvas.height;
document.getElementById(holder_image).src = canvas.toDataURL("image/jpeg", 1);
}
</script>
</body>
</html>
以上是关于html Phonegap rotate_camera_pdf_version1的主要内容,如果未能解决你的问题,请参考以下文章
PhoneGap或者Cordova框架下实现Html5中JS调用Android原生代码
如何在 Cordova / Phonegap 的远程 html 文件中包含本地脚本?
在 HTML5/JQueryMobile/PhoneGap 中添加滑动支持