Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 6 years ago.
Improve this question
I'm using html2canvas to generate a screenshot of a url. This screenshot is displayed on the page and I want to be able to break it into pieces when it's clicked.
The output file that I get from html2canvas is a canvas element.
How can I "break" it to random pieces? Should I create new canvas element for every piece that I want?
Html2Canvas does not click . It just renders the DOM elements provided to it.So I dont think you can break the rendered canvas into pieces.
How it works
The script traverses through the DOM of the page it is loaded on. It gathers information on all the elements there, which it then uses to
build a representation of the page. In other words, it does not
actually take a screenshot of the page, but builds a representation of
it based on the properties it reads from the DOM.
But one thing you can do is divide your DOM content into parts and the you can use Html2Canvas for every DOM pieces and you get the required result.
Related
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 2 years ago.
Improve this question
I have really struggled a lot on this problem. I want to find the character index in google docs which have 150 pages.
What I want:
exact character index of on the page text click,
Reference: What i saw Save API, gets that information somehow, you can check by following the below steps.
go to page 100th in a google document by scrolling.
open debugger and check SAVE API call after editing in the document.
Check the request body "ibi" property will give you the exact index.
I want to get that index on page text click.
Currently, It is not possible for apps script to capture client side DOM events. Also, there is nothing in the official documentation about capturing selection from document. Though selection capture is possible both in Sheets and Slides.
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 5 years ago.
Improve this question
How can I create something like a profile card where I will modify some text and colors and then make it an image? I have no idea where to start.
The best thing to use in this case is SVG. You're combining data with a variety of elements and then putting them all together. SVG is much like HTML, but with a tighter focus on the image itself. You can combine raster elements, your data, and vector elements, to make the final image. From there you can either use this image directly or render it to a PNG.
I strongly recommend leaving it in SVG if at all possible, to preserve the text nature of a lot of this data. Not everyone can see the screen. If you burn text into a raster image, screen readers won't be able to read it.
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 6 years ago.
Improve this question
I want to create a webpage with several small tiles that enlarge when clicked (And show more/different content, but that's not a part of this question).
This is what I have now: http://puu.sh/nX929.png
When I click on the first tile, it looks exactly like I want it to: http://puu.sh/nX9l9.png
But when I click the second tile it looks like this: http://puu.sh/nX95G.png (gap on the left)
That's not what I want, I want to other (small) tiles to float around it. To fill the empty space.
The source code (+ live example) can be found here (but I wouldn't mind doing it in a completely different way): https://www.crescendosassenheim.nl/Hugo/Training/
I don't even know what to Google, because I have absolutely no idea what kind of technique I can use to achieve what I want. Any suggestions?
http://masonry.desandro.com/methods.html Take a look at this I am sure this will help you, what you want is even displayed at the bottom of the page i am linking.
Download masonry in your computer link to it and follow the little guide in their website.
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 7 years ago.
Improve this question
I've searched arround on Google but couldn't find a clear answer on my question. The idea of what I want to do is quite simple:
There's a site called "glws.org" with a bunch of <div>'s and <input>'s on the page. You can add strings to the URL (example: https://glws.org/#S76561198105687636A2280482163D16883436630920468625) and for different strings after the # in the URL, different values are put into the <input>'s. The site reads the string after the # and has a script that converts it into values and puts the values in read-only <input>'s. Because they are <input>'s and not <p>'s for example, I can't just read them by printing out the HTML code.
Is there a way to retrieve the value in the input fields through a Java program? I've tried to read the source code of the page with Sockets but that obviously just prints the <input> tags without the value because it's not like a <p> or something.
Any help is appreciated!
You can use Selenium web driver to do browser actions on the website programatically and wait till some elements appear on the page.
https://code.google.com/p/selenium/wiki/GettingStarted
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 7 years ago.
Improve this question
I want to display 1000x1000 array in some way. Array element would either be black or white, depending on boolean value. For this job I am thinking about either javascript or winforms, but before I jump into, I wanted to hear what could be drawbacks for these choices. I am much more familiar with javascript than winforms though. As for winforms, I tought that there could be too many GDI objects to handle. Any ideas, suggestions?
I'm not familiar with win-forms but the first idea that came to mind was just a plain old html table. It would be a lot of html though to have 1000 x 1000. Second thing that came to mind would be an SVG. You can manipulate an SVG with JavaScript as shown here http://tutorials.jenkov.com/svg/scripting.html. Theres also this post which shows how to create tables with SVG.You would probably want to generate the SVG before hand to save the application from doing a lot of work and then set the colors using a loop. You can even use photoshop and save as SVG and then open the file in an editor to get the SVG code.