page to image image to email email to fax

Discussion in 'ASP .Net' started by jason@cyberpine.com, Jul 15, 2004.

  1. Guest

    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.
     
    , Jul 15, 2004
    #1
    1. Advertising

  2. EO Guest

    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.

    <> wrote in message
    news:...
    > 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.
     
    EO, Jul 16, 2004
    #2
    1. Advertising

  3. Guest

    "EO" <> wrote in message news:<#>...
    > 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.
     
    , Jul 16, 2004
    #3
  4. AdamM Guest

    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

    wrote in message news:<>...
    > 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.
     
    AdamM, Jul 27, 2004
    #4
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Jim Heavey

    Screen Image To Fax

    Jim Heavey, Feb 16, 2004, in forum: ASP .Net
    Replies:
    1
    Views:
    298
    John Oakes
    Feb 16, 2004
  2. Tanya

    Fax / Email a Crystal Report

    Tanya, Oct 22, 2004, in forum: ASP .Net
    Replies:
    1
    Views:
    3,062
    Guest
    Mar 15, 2005
  3. =?Utf-8?B?UGFyYWtp?=

    Reading Fax and email content

    =?Utf-8?B?UGFyYWtp?=, Jun 21, 2005, in forum: ASP .Net
    Replies:
    2
    Views:
    410
    =?Utf-8?B?UGFyYWtp?=
    Jun 22, 2005
  4. Yash Ganthe
    Replies:
    0
    Views:
    398
    Yash Ganthe
    Dec 30, 2009
  5. Caryn Graves
    Replies:
    3
    Views:
    120
    Mike Brind
    Sep 13, 2006
Loading...

Share This Page