page to image image to email email to fax

J

jason

Hello.

This one is kinda out there.

I have asp.net code that will email my yahoo account a <img> like with
image on the server. When I open it in yahoo I get the full image on
screen. works great.

Any way to create an image (in asp.net on the server) of full web page
- text and all. Currently I have dynamic on top of that image and can
do a screen print and fax it. Some how i'd like to automate the
process where I could press a button on the page and automagically my
filled in image form with text and all is emailed to an email to fax
service that will fax it to phyically fax machine somewhere.

Currently i have code to email any image i pass a specific page via a
variable in the address header mypage.aspx?whatimage=xxx.gif

and .

I have an aspx page that plugs data on top an image form via
varialbles form.aspx?name=jason?addr=4040%2055



Is this a wild dream? If not, point me in the right direction.

A big question will also be if any email to fax service would ever
process anything but text emails. I get the feeling so far is going to
be NO anyways.

Thanks.
 
E

EO

Capturing a screenprint of a browser session is not possible through .net,
however, it may be possible with an activex control. I'd suggest posting in
an activex newsgroup.
 
J

jason

EO said:
Capturing a screenprint of a browser session is not possible through .net,
however, it may be possible with an activex control. I'd suggest posting in
an activex newsgroup.


True, but actually rethinking my problem/objective out I see a better
approach for myself and will share what I have in hopes that somebody
here could help me and others that may follow.

I'm trying to fax out an image with data on top of that image. I
already have a fax provider that will fax emails with gif and jpg
attachements . And already have a button that will fax a specific
image .. and all that works great.

What I need to be able to do is write text on top of an image and save
that image with the dynamic Text. I think I'm close, but can't seem to
connect the dots. Here's what I have and the error I'm getting:

Credit to anybody who's code I grabbed off this newsgroups.



<%@ import namespace="System" %>
<%@ import namespace="System.Drawing" %>
<%@ import namespace="System.Drawing.Imaging" %>
<%@ import namespace="System.IO" %>
<%@Import Namespace="System.Uri" %>
<%@Import Namespace="System.Net" %>


<script runat="server">

Sub sendFile()

' create New image and bitmap objects. Load the image file and put
into a resized bitmap.
dim g as System.Drawing.Image =
System.Drawing.Image.FromFile(server.mappath(request("src")))

'use image as background

Dim img As Bitmap = _
New Bitmap(g.Width, _
g.Height, PixelFormat.Format24bppRgb)
Dim w As Graphics = Graphics.FromImage(img)
w.DrawImageUnscaled(g, 0, 0, g.Width, g.Height)


'write on image

w.TextRenderingHint = Text.TextRenderingHint.AntiAlias
Dim imgFont As Font = New Font("Tahoma", 18, FontStyle.Bold)
Dim imgBrush As SolidBrush = _
New SolidBrush(Color.FromArgb(128, Color.Red))
Dim centerFormat As New StringFormat()
centerFormat.Alignment = StringAlignment.Center
centerFormat.Trimming = StringTrimming.None
Dim buyNow As String = "-hello-"
w.DrawString(buyNow, imgFont, imgBrush, _
New RectangleF(0, 107, w.Width, w.Height - 107),centerFormat)

dim thisFormat=g.rawformat
dim imgOutput as New Bitmap(g)

' Set the contenttype
response.contenttype="image/jpeg"

' send the resized image to the viewer
imgOutput.save(response.outputstream, thisformat) ' output to the user

' tidy up
g.dispose()
imgOutput.dispose()

end sub

</script>


<%
response.clear
call sendFile()
response.end
%>


I call the page via http://xxx.xxx.xxx?src=yyy.jpg

and the error I get is:

BC30561: 'Text' is ambiguous, imported from the namespaces or types
'System.Drawing, System'.

Source Error:



Line 25: 'write on image
Line 26:
Line 27: w.TextRenderingHint = Text.TextRenderingHint.AntiAlias
Line 28: Dim imgFont As Font = New Font("Tahoma", 18, FontStyle.Bold)
Line 29: Dim imgBrush As SolidBrush = _




Many Thanks for any help or information.
 
A

AdamM

Jason Hello,

The Interfax service will do what you require, since you can send it a
URL to render and transmit by fax. So you would simply create a .url
file which properly holds the URL you wish to fax, like:

[InternetShortcut]
URL=http://www.yourserverhere.com?any=variables&you=want

Interfax picks up the URL, opens the page and faxes whatever it sees
to your destination number.

You can test all this for free through our developer program at
http://www.interfax.net/en/dev/index.html .

Adam M
Interfax
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,743
Messages
2,569,478
Members
44,898
Latest member
BlairH7607

Latest Threads

Top