Showing an entire ASP website as an image - javascript

I have an ASP website that gets data from SQL queries and puts them into divs and then, superimposes the divs over an image. The only problem is that when people try to save the image, they do not get the data or the divs with the image.
Is there anyway I can combine the divs and the image into one single picture using ASP or even ASP.NET? This way when people try to save the images, they get the original image and also the data that is put on top of the image as well.
I have been trying to use the
Response.ContentType = "image/gif"
tag in a separate page and tried to call that page as an image but that's not working when you have HTML combined with the ASP. Can anyone please help.

Youc can use html2canvas library to take "screenshots" of entire pages.
Update:
Apparently it is possibe server-side as well (using ASP.NET tho) by using WebBrowswer control (yes it can be used in ASP.NET as well). Take a look

Related

Picture gallery with django

I created a image gallery using JS, CSS, and HTML to extract data from a JSON file, which I created, then set up tiles and modals for each image. It works perfectly, but then I was told to convert it to the Django framework to make it maintainable by non-coders. I have no experience with Django, so I have idea where to even start with this.
Here is part of the gallery: http://i.imgur.com/NGZ7Evt.png
Here is a sample modal: http://i.imgur.com/CTzCt2J.png
Note: these are just filler images and text.
When the page loads, it parses out the JSON and sets up the code for the tiles. Then it creates a modal for each tile.
Are there any references or tutorials I can look at to get what I want? Or will I just have to completely change how my page works?

on click of button convert html page to image and download using JS ,Jquery

I have created a invoice based html page which has a button. onclick of the button, the html page should be downloaded as a image. using javascript or jquery.
I don't expect this to be the best answer, but it seemed interesting enough to post.
Write an app (may be with PhantomJS) that opens up the desired HTML document, sizes the window properly, and takes a screen shot. Then, remove the borders of the image.
(OR)
HTML2Canvas exists to render HTML onto (which you can then use as an image). (This may be of some help after converting to canvas - how to save canvas as png image?)

Generate PDF of a section of a php page once rendered into HTML and CSS and account for pdf page-breaks

The system I am working on has a questionnaire in it and then shows the responses to the admin in a nice report on screen. I need to create functionality that turns the on screen report into a pdf, similar to how the browser generates a pdf of the page when you select print. Although I need to only turn a section of the page into pdf. And it would be ideal to be able to alter the HTML so that the pdf page breaks don't interfere with the presentation of the report.
You can download a pdf of how the report looks, generated by the browser functionality. This is just an example, I need the pdf to be generated by a link or button and not include the whole page (the top part in this case).
I have tried some php HTML to pdf generators, but it's difficult because the HTML is dynamically generated so I'm not sure how to send all the HTML, once rendered, to the page that creates the pdf.
To overcome the page breaks, I've considered using javascript or jquery to read the height of the div of each question within the report and then write a simple script to calculate if the next div will fit on the page and if not add a margin on top of that div so that it starts on a new page.
What software can I use to generate the pdf, given these requirements? Either php or javascript. Appreciate the help.
Have you considered Snappy for PHP? It makes use of wkhtmltopdf behind the curtains to convert any HTML document into PDF.
We are using it and it works great.
https://github.com/KnpLabs/snappy
You could try mpdf and use the page-break-inside: avoid property which is actually a CSS property. I have not used this, but it might be what you're looking for.
Looks like you can add this property to the <div> and <table> tags (mPDF Supported CSS).

Emdebbed Adobe - how to goto another page in PDF with external buttons?

I have pdf embedded in html, pdf embedded object has internal controls & so on. But they are smnall. I need make them bigger. I.e. external.
Now have a problem, - how to make page up/[age down, with external buttons/links? I try send up/down to holder DIV - but with no effect. Is this ever possible to do ?
I hear that somehow is possible make an images from PDF, but i need this at UNIX hosting, and this will be not an PDF.
Pls help me
Please read about PDF Open Parameters. I think you might be able to manipulate embedded PDF with that parameters.
Another approach is to create a set of images from your PDFs using some PDF library.
And another approach is to use Google Docs PDF Viewer.
You can create the scroll plugin to make up/down. however you can create the master DIV with static width and height and overflow hidden, and then make the child div inside this. Then with your external buttons, when you click to down, you must be decrease the top of the child DIV. and then you got it. have good time.

Is it possible to add text into SWF file online by ASP.NET or Javascript?

I have a site that contains some videos that made by graphic designer , he also edit them now and then and add videos. I want to add text to the video that after X seconds at the bottom of the video that will show some text. For example: "Hosted by XXX". I cannot ask this from the designer because the text changes once a month and he will charge me for that work every time.
This videos are in swf (flash) format. I need to do it online - while the page loaded or even asynchronously. My site it wrote in asp.net so this must be done(if it can) by asp.net or javascript.
I have zero knowledge in flash but I have now problem to learn if this thing possible..
Can you say if it is possible? And if so give the concept by it can be done.
You can use html and javascript (preferably using the JQuery and JQuery UI javascript libraries)
Write a javascript function to show and position your html element. You will need some way of determining the coordinates dynamically.
Have this function fire on the click of a video object e.g
onclick='myJavascriptFunction(videoID)'.
If you need to delay it you can do that in the javascript function.
Just do it in html (driven by asp if you will)?
Or am I missing something?
Or you could acces a webserver to load in text, or you could add it in the flashvars, or ...
First you need the source code for the file.
Just a SWF will not work and I will not promote de-compiling someone elses work.
Next in the HTML you set up flashvars to be passed to your flash app the flash var will contain your text for the label.
Finally You create a TextField in the flash app and assign it the flashvar

Categories