Need Help ASAP!

C

Chad A. Beckner

Hey all,

I've spent all day trying to figure this out. What I need is a script to
grab a webpage and display it as an (thumbnail?) image on one of my pages.
GotDotNet has a webservice to do this, but I need everything to be "local",
i.e. I can't call their webservice. Does anyone know where I can find the
code to do this (I think I've seen it out there before, just can't find it
again). Any help would be tremendously appreciated!!!

Thanks to everyone,

Chad
 
C

clintonG

Look through CodeProject.com as I recall I 'may' have
seen something there but I have no clue which search term to use.

You 'do' want to Google: "screen scrape"+"asp.net" to get started


--
<%= Clinton Gallagher
A/E/C Consulting, Web Design, e-Commerce Software Development
Wauwatosa, Milwaukee County, Wisconsin USA
NET csgallagher@ REMOVETHISTEXT metromilwaukee.com
URL http://www.metromilwaukee.com/clintongallagher/
 
C

Chad A. Beckner

I've looked through there (trust me!) All I can find is about scraping the
"contents" of the page, I need an actual screen "capture". Any ideas?

Chad
 
J

John Saunders

Chad A. Beckner said:
I've looked through there (trust me!) All I can find is about scraping the
"contents" of the page, I need an actual screen "capture". Any ideas?

Chad,

Since the browser is what creates an image from HTML, I expect you'd have to
get that image from the browser, somehow. It's not really an ASP.NET
question.
 
C

Chad A. Beckner

I disagree, it IS an ASP .NET question... I want to create an image of a
remote webpage, and display it in my aspx file (not include an image "from"
their page). I know this is possible, I've seen it out there, but there's
not very good documentation on how to do it. See this site for an example
of what I am trying to do:

http://www.alexa.com/search?q=yahoo

Chad
 
A

ashelley

nah, it isn't really a .net question. you are going to have to launch
a instance of a browser, get it to load the page and copy the window
(print screen pretty much), save it to an image and then display it.

It is non trivial and non asp.net.

-Adam
 
R

Richard

Ofcourse its a .NET question, he ask's for it. and his question is about
..NET making a printscreen. He doesn't want to do it manual by making a
printscreen but he wants it automaticly in .NET. Can this be done? I dont
know if it can be done but for now it would be better if someone replies
that actually does know if it can be done or not. Anyway I myself want to
know aswell if it can be done and how.

Richard
 
A

ashelley

Ofcourse its a .NET question, he ask's for it. and his question is about
.NET making a printscreen. He doesn't want to do it manual by making a
printscreen but he wants it automaticly in .NET. Can this be done? I dont
know if it can be done but for now it would be better if someone replies
that actually does know if it can be done or not. Anyway I myself want to
know aswell if it can be done and how.

Richard


" nah, it isn't really a .net question"
was supposed to be "nah, it isn't really an asp.net question" as he
insisted. It was my opinion that he might think that a web page can
be directly interpreted as an image without a heavy and expensive
renderer ( a fully capable browser if he wants to render pages
accurately). It could probably done with asp.net but its more of a
windows programming with .net question.

thats all i was saying. no offense.

-Adam
 
C

clintonG

Hey Chad you owe me big time :) for taking my time to go digging
through the nightmare that is my Favorites collection and finding this [1]
control that shows the objective can be done. Whether it is elegant
or not is a matter of personal opinion.

--
<%= Clinton Gallagher
A/E/C Consulting, Web Design, e-Commerce Software Development
Wauwatosa, Milwaukee County, Wisconsin USA
NET csgallagher@ REMOVETHISTEXT metromilwaukee.com
URL http://www.metromilwaukee.com/clintongallagher/

[1] http://www.tonec.com/products/wssh/index.html
 
C

Chad A. Beckner

Thanks ClintonG. Only 1 more question: I don't want to purchase any
software, I would like to code for how to do this... :) Sorry to be
difficult (and I really appreciate you going through your Favorites (I have
a ton too, so I know how it is!), I just need to figure out how to do this
myself. It's not for a commercial app, but it is something that I need to
do.

I'll keep looking too, but if anyone has info, I'd be much obliged!

Chad


clintonG said:
Hey Chad you owe me big time :) for taking my time to go digging
through the nightmare that is my Favorites collection and finding this [1]
control that shows the objective can be done. Whether it is elegant
or not is a matter of personal opinion.

--
<%= Clinton Gallagher
A/E/C Consulting, Web Design, e-Commerce Software Development
Wauwatosa, Milwaukee County, Wisconsin USA
NET csgallagher@ REMOVETHISTEXT metromilwaukee.com
URL http://www.metromilwaukee.com/clintongallagher/

[1] http://www.tonec.com/products/wssh/index.html



" nah, it isn't really a .net question"
was supposed to be "nah, it isn't really an asp.net question" as he
insisted. It was my opinion that he might think that a web page can
be directly interpreted as an image without a heavy and expensive
renderer ( a fully capable browser if he wants to render pages
accurately). It could probably done with asp.net but its more of a
windows programming with .net question.

thats all i was saying. no offense.

-Adam
 
J

John Saunders

Chad A. Beckner said:
I disagree, it IS an ASP .NET question... I want to create an image of a
remote webpage, and display it in my aspx file (not include an image "from"
their page). I know this is possible, I've seen it out there, but there's
not very good documentation on how to do it. See this site for an example
of what I am trying to do:

Chad, if you ask the creators of the ActiveX control whose URL another
poster has supplied, I bet they'll tell you that their control either hosts
IE inside of it or else parses the HTML itself. Those are the only ways to
do it - somebody has to render the HTML into pixels.

It's also totally separate from ASP.NET, as the translation will be
happening entirely on the "client" side. If you happen to host the "client
side" on your server, that's up to you, but it's still a web client which
can render HTML (i.e., a browser).
 
C

Chad Beckner

Hey John, hehe, we keep running into eachother! :)

So, are you saying that there is no "server side" code to translate HTML
to an image file? I've seen many examples on the internet of how to do this
(see previous posts for an example), but I guess what I need now is to
figure out how I can translate the HTML to an image. I've got it connecting
and getting the page data, but have no idea of how to do it using .NET
(again, it may not be ASP .NET specific, but where to post from here??). As
always, thanks for your time and help! :)

Chad
 
J

John Saunders

Chad Beckner said:
Hey John, hehe, we keep running into eachother! :)

So, are you saying that there is no "server side" code to translate HTML
to an image file? I've seen many examples on the internet of how to do this
(see previous posts for an example), but I guess what I need now is to
figure out how I can translate the HTML to an image. I've got it connecting
and getting the page data, but have no idea of how to do it using .NET
(again, it may not be ASP .NET specific, but where to post from here??). As
always, thanks for your time and help! :)

No, there is no server-side code for rendering HTML into an image. However,
since your server is also running Windows, you might be able to use a
client-side technique to do it. I know that it's possible to feed HTML to
the IE COM object (I seem to remember you have to do a navigate, then load
the HTML, something like that). There may then be some mechanism to get the
thing to render to a device context of your choice, perhaps one backed in
memory which you could subsequently read to get the image.

Frankly, if I were you, I'd either pay someone else to do this or reevaluate
the requirements. For instance, do you have to be able to get a thumbnail of
any random web page, or is it only some pages? Do you perhaps have control
over those pages? If so, then perhaps there's a way to get those pages to
generate both HTML and an image? Maybe those pages use only a subset of
HTML? Perhaps a subset which isn't that difficult to parse and render?

Good luck with this.
 
R

Roger Helliwell

Hey all,

I've spent all day trying to figure this out. What I need is a script to
grab a webpage and display it as an (thumbnail?) image on one of my pages.
GotDotNet has a webservice to do this, but I need everything to be "local",
i.e. I can't call their webservice. Does anyone know where I can find the
code to do this (I think I've seen it out there before, just can't find it
again). Any help would be tremendously appreciated!!!

I'm guessing that such a screen scrape wouldn't be done on the fly for
efficiency reasons. Rather, you could develop a seperate MFC app that
visited a URL, rendered the contents using the WebBrowser control then
saved the viewport as a jpeg. Your web-app could then just link to the
resulting jpegs.

Roger
 

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,744
Messages
2,569,482
Members
44,901
Latest member
Noble71S45

Latest Threads

Top