html2canvas

HTML2Canvas with CORS in S3 and CloudFront

匿名 (未验证) 提交于 2019-12-03 08:46:08
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I have a problem and I'm totally desperate... :( I'm using HTML2Canvas to create a screenshot of a div with many contents. I have read many similar questions: Question 1 and Question2 , and I have found another one very similar to my problem: CORS policy on cached Image In Firefox, all is working fine, but in Chrome, I'm having problems with the CORS. I have this error: Image from origin ' http://files.domain.ly ' has been blocked from loading by Cross-Origin Resource Sharing policy: No 'Access-Control-Allow-Origin' header is present on the

Using html2canvas to render a highcharts chart to pdf doesn't work on IE and Firefox

匿名 (未验证) 提交于 2019-12-03 08:42:37
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: We are using html2canvas.js and html2canvas.svg.js (version 0.5.0 beta1) and highcharts.js to download a donut chart into pdf. This works as expected in Chrome, however in IE and Firefox this isnt working. In IE the chart is rendered incorrectly, and in Firefox it is not rendered at all. Below are screenshots of the download in Chrome, IE and Firefox Chrome IE (Edge) Firefox The code i am using to do the html2canvas is as follows: html2canvas($("#container"), { onrendered: function (canvas) { var imgData = canvas.toDataURL( 'image/png'); var

html2canvas not working at all

匿名 (未验证) 提交于 2019-12-03 08:28:06
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: Here is the code which isn't working. Basically I'm allowing the user to edit some text in the div and then display its screenshot. Can someone please tell why is it not working? <!doctype html> <html> <head> <link type="text/css" rel="stylesheet" href="main.css" /> <title>Poster</title> </head> <body> <div id="main_image"> <img src="image.jpg" id= "image"/> <div id="user_text">IT IS TOTALLY AWESOME</div> </div> <div id="edit_text_box"> <textarea id="user_input" placeholder="Your text here.." rows="2" cols="30" ></textarea> <div id="change

html2canvas in angular 4

痴心易碎 提交于 2019-12-03 07:41:13
I am able to take a screenshot using html2canvas in angular 4 but i need to send the string image to the server side using a http post call Component import { Component, OnInit, NgZone } from '@angular/core'; import { Router, ActivatedRoute, Params } from '@angular/router'; import { EventsEmitter } from '../../assets/scripts/services/eventsEmitter'; import { WindowRef } from '../../assets/scripts/services/window'; import { ImagesService } from '../images/images.component.service'; import { DomSanitizer } from '@angular/platform-browser'; import * as html2canvas from "html2canvas"; @Component({

JSPDF - addHTML() Multiple Canvas Page

拥有回忆 提交于 2019-12-03 06:02:27
I noticed already have a release "addHTML() can now split the canvas into multiple pages" which can find through this link : https://github.com/MrRio/jsPDF/releases/tag/v1.0.138 . May i know how it work? In my case, i just tried it out when click on "save as pdf" button, it just render a single page instead of multiple pages (sometimes didn't worked, i assume because the content is too long to be generated as pdf). Would appreciate if there are some examples for this case. Thanks! Attached my codes below: var pdf = new jsPDF('p', 'pt', 'a4'); pdf.addHTML($(".pdf-wrapper"), function () { var

'Promise' is undefined in IE [closed]

青春壹個敷衍的年華 提交于 2019-12-03 04:04:43
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 3 years ago . I'm getting a 'Promise' is undefined error in IE. Why is that and how can I solve this? 回答1: Add something like <script src="https://cdnjs.cloudflare.com/ajax/libs/bluebird/3.3.5/bluebird.min.js"></script> To <head>...</head> This will pull in an external Bluebird Promise Library, so that you will be able to use

html2canvas javascript screenshot and upload

耗尽温柔 提交于 2019-12-03 03:26:54
Would it be possible to use html2canvas ( This) to take a picture of the user`s screen but also upload the image, get the upload link and send it with ajax to the webserver? if so, how can i do this? Yes it is certainly possible to do such a thing. Firstly use the html2canvas api to take a picture of the user's screen: html2canvas(document.body).then(function(canvas) { }); Secondly use the following function to convert the returned canvas image into a base64 encoded URL (defaults to png): canvas.toDataURL(); Specification For canvas.toDataURL Now construct a request to send your base64 encoded

Using html2Canvas with HighCharts

匿名 (未验证) 提交于 2019-12-03 02:03:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I want to use html2canvas discussed at http://html2canvas.hertzen.com/documentation.html to convert the html content to image. However I am not getting image of HighCharts properly. On IE10 It renders blank image and on Chrome it renders a part of it. Is it possible to use html2canvas for this purpose. 回答1: Highcharts uses svg to draw charts. You will need to use canvg library for drawing this svg to a temporary canvas and then remove that canvas once you take the screenshot using html2canvas. Here is the link for canvg : https://code.google

Selenium: chrome driver makes screenshot just of visible part of page

匿名 (未验证) 提交于 2019-12-03 01:57:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 由 翻译 强力驱动 问题: I need to do screenshot of full page using chrome driver, but it makes it partly. File screenshotFile = (( TakesScreenshot ) driver ). getScreenshotAs ( OutputType . FILE ); The screenshot looks as visible rectangle with correct information and big black area below. 回答1: This is a known bug: https://code.google.com/p/chromedriver/issues/detail?id=294 (Only for Chrome driver, firefox driver works fine) 回答2: Might worth trying to use this library: https://www.assertthat.com/posts/selenium_shutterbug_make_custom_screenshots_with

html2canvas - is there to print a hidden DIV to pdf?

匿名 (未验证) 提交于 2019-12-03 01:41:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 由 翻译 强力驱动 问题: Background I have a table of records that uses the "tabulator" control to allow users to sort, filter etc. once they have the results they want in the table, I need to provide a way for users trigger the creation of a PDF per row, using a PDF template. At the top of the page, I have a drop down menu where they can select a template. For example, it will have options like this: pdf with blue logo pdf with pink logo etc. What I know how to do: 1. I know how to loop through the selected records in my table in jquery 2. I know how to