|
I am looking for a javascript that would initiate a screen capture or window capture and then print that image.
Ideally I would like the image to get attached and sent in an email to an address the user would provide on a form.
I have a page for ordering business cards and this would serve as a copy of the users request.
http://www.cexp-wsgp.com/NorthTexas/form.htm
Any Ideas?
|
|
|
Any ideas? Lots of them! Narrowing them down to what you need is the hard part! I was the lead developer of Consolidated Graphics' COIN. COIN is an e-commerce app for ordering printed materials. Mostly it is used by CGX clients to order imprinted items such as business cards, stationary, brochures, etc. Some of the feature highlights are that the user can enter their personal data, then view a PDF of what the item will look like. The PDF is generated on the fly incorporating the user-entered data into the resulting image. The user can add items to a shopping cart, pay with a credit card, and checkout. When they checkout, the system emails a high-res, print-ready PDF to the printing company. (For standard imprinted items, this print-ready PDF is the user-data only as the shells are pre-printed with the company design.) http://www.cgxcoin.com/
If it sounds like I'm selling COIN, I'm not. I am proud of my work on that product, though, and think it is a fantastic app. However, it's not for sale -- it is used internally by CGX to support their 60+ printing companies. My point is, though, that I can definitely help you with the type of project you are developing. One of the world's best postscript programmers is a good friend of mine who actually started the COIN development about 8 years ago. http://www.tgreer.com
Now for some immediate tips to answer your questions:
To print the business card image only, probably the easiest way to do that is to pop a new window, write the image to the window (either by loading it directly from the server or you could use javascript to document.write the image from the parent page to the child window), then call the window.print() method for the child window. This would cause the browser's print dialog to appear, and when printed, would only print the image since the image is the only thing in the page. You could also use media-specific styles (CSS) to specify parts of the page to print or not print. Combine this with some javascript, and you could have a "Print Image" button that would set all the page content except the image to not print, then call the window's print method, then, after printing, set the styles back to normal. (This will probably require more explaining!)
About CSS media types http://wsabstract.com/dhtmltutors/cssmedia.shtml
To send email, I need to know your web server OS and what scripting language(s) you have available on your web server. Windows? Linux? ASP? PHP? JSP? etc.
|
|
|
|
|
|
|
|
|
|