codetoad.com
  ASP Shopping CartForum & BBS
  - all for $20 from CodeToad Plus!
  
  Home || ASP | ASP.Net | C++/C# | DHTML | HTML | Java | Javascript | Perl | VB | XML || CodeToad Plus! || Forums || RAM 
Search Site:
Search Forums:
  Screen print and email as an attachment  TKOEHN5751 at 05:18 on Wednesday, October 20, 2004
 

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?

  Re: Screen print and email as an attachment  Troy Wolf at 14:48 on Wednesday, October 20, 2004
 

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.

Troy Wolf: site expert
Shiny Solutions









CodeToad Experts

Can't find the answer?
Our Site experts are answering questions for free in the CodeToad forums








Recent Forum Threads
•  Re: JavaSript Problem In Mac Safari Browser
•  Re: DHTML div positionning Problem
•  Convert script to NS6 compatible - Please Help!
•  Print .doc file from the website using System.Diagnostics.Process
•  Re: Fullscreen code
•  Re: iframe targeting
•  Excel n ASP
•  Remote Cart Shopping Cart
•  Mouse click coordinates on an ActiveX control?


Recent Articles
Communicating with the Database (Using ADO)
MagicGrid
Simple Thumbnail Browsing Solution
Type Anywhere
A Better Moustrap: FmtDate to replace FormatDateTime
ASP.NET Forum Source Code
Internal Search Engine
Javascript Growing Window
Simple date validation
Search engine friendly URLs using ASP.NET (C#.NET)


Site Survey
Help us serve you better. Take a five minute survey. Click here!

© Copyright codetoad.com 2001-2005