如何在phonegap中打印图像

时间:2017-08-18 10:39:41

标签: javascript jquery cordova phonegap

我在第一段代码中拍照。在其他代码中我想打印它。但图像不会出现在打印屏幕上。为什么?

            navigator.camera.getPicture(onSuccess, onError, {
            quality: 100,
            destinationType: Camera.DestinationType.FILE_URL,
            sourceType: Camera.PictureSourceType.CAMERA,
            mediaType: Camera.MediaType.PICTURE,
            saveToPhotoAlbum:true,   //targetWidth:200 ,
            //targetHeight: 200,

            correctOrientation: true,
            allowEdit:true
        });
          function onSuccess(imageData) {
            image=document.getElementById("myImage");
            image.src = imageData;
            path = image.src;
          }

 printt: function () {            

           window.plugin.printer.print(image);


       },

0 个答案:

没有答案