html2canvas

How to use html2canvas in android in order to take a screenshot of an element in webview

我们两清 提交于 2019-12-11 16:53:32
问题 i'm trying to get screenshot of a captcha in webview, using html2canvas plugin implementation 'cljsjs:html2canvas:0.4.1-0' there's also html2canvas:1.0.0-alpha.12-1 but i can't use it because of this error ERROR: Failed to resolve: html2canvas Affected Modules: app Anyway, i found this Android: Sending image URI from webview website to app But i don't know how to use it I tried to Toast the Image Uri to check if it's working or not view.loadUrl("javascript:api.testImage(\t\t\t function()\n" +

Using htmltocanvas for my webpage but highcharts are coming partial

我是研究僧i 提交于 2019-12-11 14:19:12
问题 I am trying to take an image of a part of my webpage, which occasionally would include highcharts. It works well except for some highcharts type. As an example, this is my #PrintPanelScreen on webpage. So partial charts are displaying, check the two links below, first image shows how it looks on webpage and second image shows how it looks when rendered. Notice colors are missing on the chart. this.PrintPanel = function () { html2canvas(document.querySelector("#PrintPanelScreen")).then(canvas

image is downloading in chrome but not in safari

流过昼夜 提交于 2019-12-11 13:33:35
问题 In my application I'm using html2canvas for converting a HTML in to canvas and after that i'm converting that canvas to image using toDataURL() every thing fine in chrome the image is downloading soon after the page loads, but in safari the image loading in a the same page without downloading. $(document).ready(function(e) { html2canvas(document.body, { onrendered: function(canvas) { var test = document.getElementsByClassName('test'); //finding the div.test in the page $(test).append(canvas);

html2canvas OnRender failed because of cross domain images

倖福魔咒の 提交于 2019-12-11 12:48:13
问题 I want a screenshot of the current page through html2canvas. However, the code displays "here" and then stops the second alert function is not triggering alert("here"); html2canvas(instance.element, { onrendered: function(canvas) { alert("here"); instance.options.onPostRender(canvas) In the firebug the following error appears: "NetworkError: 404 Not Found - http://html2canvas.appspot.com/?url=https%3A%2F%2Fwww.otherdomain.com%2Flivezilla%2Fimage.php%3Fid%3D08&callback=html2canvas_1" I think

Save google map as an image - using javascript (able to take screenshot)

我与影子孤独终老i 提交于 2019-12-11 12:38:57
问题 I referred to the following SO questions to capture a screenshot of google maps using javascript (html2canvas). feedback.js, screen-capturing-using-html2canvas, create-screen-shot, capture-div-into-image, html2canvas-github. I used static maps to get the image, but I have close to 150 markers and the total length of the URL went way beyond the 2048 character limit. I am able to capture a screenshot using event listeners in javascript. The code I used to capture the image is below. I tried

Correct proxy script for html2canvas

这一生的挚爱 提交于 2019-12-11 12:05:19
问题 I'm trying to get html2render ( http://html2canvas.hertzen.com/ ) to work on my website. It works for the basic stuff - but none of the images show (as they are on a cdn.domain.com subdomain). I've been reading up, and it seems that it doesn't like other domains out of the box. I found a couple of PHP proxy scripts: https://github.com/brcontainer/html2canvas-php-proxy https://github.com/adjdred/html2canvas-proxy-php I tried to get those going, but we don't have curl enabled on this server. So

html2canvas.js not capturing image for dynamically generated content

半城伤御伤魂 提交于 2019-12-11 09:05:52
问题 I am using vivagraphs to generate dynamic svg element but when I click capture button, no nodes and edges are shown. This is the script: $(document).ready(function() { //var testdiv = document.getElementById("testdiv"); $('#btn').click(function(){ html2canvas($("#graph1"), { onrendered: function(canvas) { var myImage = canvas.toDataURL("img/png"); window.open(myImage); } }); }); While I inspect for elements svg is shown after rendering graph but snapshot does not contain nodes and edges. Is

Html2Canvas not working in IE9 only

假装没事ソ 提交于 2019-12-11 07:56:18
问题 I want to print div area automatically. So I have used Html2Canvas. It working perfectly in all browsers except IE9. Please correct my code if it has any bugs function printSchedule() { var browserName = '${sessionScope.BrowserContext.browserName}'; //console.log("browserName::"+browserName); if(browserName != 'msie'){ $("#printArea").html2canvas(); } else if(browserName == 'msie'){ var el = document.createElement('printArea'); G_vmlCanvasManager.initElement(el); var ctx = el.getContext('2d')

How to combine 3 canvas HTML elements into 1 image file using javascript/jquery? [closed]

狂风中的少年 提交于 2019-12-11 07:29:57
问题 Closed . This question needs details or clarity. It is not currently accepting answers. Want to improve this question? Add details and clarify the problem by editing this post. Closed 3 years ago . I have 3 canvas i.e. canvasTarget, canvasTarget2, canvasTarget3 as shown below: var canvas = document.getElementById("canvasTarget"); var img = canvas.toDataURL("image/png").replace("image/png", "image/octet-stream"); var canvas2 = document.getElementById("canvasTarget2"); var img2 = canvas2

Multipage pdf with html2Canvas

岁酱吖の 提交于 2019-12-11 07:18:50
问题 I am using react-typescript and I have successfully created a PDF file from an html page with the help of this ref Generating a PDF file from React Components But if we want to create a PDF with multiple pages then what to do? with a4 size page with appropriate margins at all sides and in each new page that margin should be applied. And here is my code. private printDocument() { const input = document.getElementById("pdf"); html2canvas(input) .then((canvas) => { const pdf = new jsPDF("p", "px