Watch, Follow, &
Connect with Us

For forums, blogs and more please visit our
Developer Tools Community.


Welcome, Guest
Guest Settings
Help

Thread: Display HTML page in program



Permlink Replies: 18 - Last Post: Dec 8, 2017 6:52 AM Last Post By: Roy Lambert
Ed Dressel

Posts: 42
Registered: 10/10/99
Display HTML page in program
Click to report abuse...   Click to reply to this thread Reply
  Posted: Nov 28, 2017 11:38 AM
I would like to display a HTML page in my program, but (1) I really don't want to rely on Internet Explorer (so TWebBrowswer isn't want I am wanting; I know of PBear but it looks outdated) and (2) I'm happy to go with a PDF if there is not a really clean/easy way to do this (and I do have a 3rd party control from DevEx that allows for the PDF to be displayed).

Does anyone have any recommendations for this?

Ed Dressel
Dave Nottage

Posts: 1,850
Registered: 1/7/00
Re: Display HTML page in program
Click to report abuse...   Click to reply to this thread Reply
  Posted: Nov 28, 2017 11:43 AM   in response to: Ed Dressel in response to: Ed Dressel
Ed Dressel wrote:

Does anyone have any recommendations for this?

I strongly recommend these:

https://delphihtmlcomponents.com/

--
Dave Nottage [MVP, TeamB]
Find hints, tips and tricks at Delphi Worlds blog: http://www.delphiworlds.com
Roy Lambert

Posts: 1,063
Registered: 8/7/01
Re: Display HTML page in program
Click to report abuse...   Click to reply to this thread Reply
  Posted: Nov 28, 2017 11:18 PM   in response to: Ed Dressel in response to: Ed Dressel
Ed

Whilst I can support Dave's recommendation I'm puzzled.

You say HTMLViewer looks outdated. Its still supported and it displays pretty near anything its asked to. Added to the fact that its free then as a contender to display web pages its pretty good. At some point with HTML5 and whatever else comes along I'm sure it will be less useful. When HTML5 is going to take over the web I can't predict.

Roy Lambert

Rudy Velthuis (...


Posts: 7,731
Registered: 9/22/99
Re: Display HTML page in program
Click to report abuse...   Click to reply to this thread Reply
  Posted: Dec 2, 2017 6:38 AM   in response to: Roy Lambert in response to: Roy Lambert
Roy Lambert wrote:

Ed

Whilst I can support Dave's recommendation I'm puzzled.

You say HTMLViewer looks outdated. Its still supported and it
displays pretty near anything its asked to. Added to the fact that
its free then as a contender to display web pages its pretty good. At
some point with HTML5 and whatever else comes along I'm sure it will
be less useful. When HTML5 is going to take over the web I can't
predict.


It already has, AFAICT.

--
Rudy Velthuis http://www.rvelthuis.de

"The supreme art of war is to subdue the enemy without
fighting."
-- Sun tzu
Roy Lambert

Posts: 1,063
Registered: 8/7/01
Re: Display HTML page in program
Click to report abuse...   Click to reply to this thread Reply
  Posted: Dec 3, 2017 12:03 AM   in response to: Rudy Velthuis (... in response to: Rudy Velthuis (...
Rudy / Brandon


The standard may have been agreed, there may be some sites out there that refuse to do things if you don't have an HTML5 browser but the vast majority of the sites I visit will happily display in an old browser. I use Maxthon, I've only just upgraded to MX5 from MX4. Github didn't like me downloading things because I had an old browser, FT didn't display a captcha when trying to log in.

I've just tried MX3 which was installed in an old VM and that still happily browses sites like Amazon & BBC, and my bank.

We must have a different definition of "take over" but that's hardly a suprise is it <G>

Roy Lambert

Brandon Staggs

Posts: 683
Registered: 3/3/01
Re: Display HTML page in program
Click to report abuse...   Click to reply to this thread Reply
  Posted: Dec 3, 2017 5:47 PM   in response to: Roy Lambert in response to: Roy Lambert
"Roy Lambert" wrote on Sun, 3 Dec 2017 00:03:45 -0800:

We must have a different definition of "take over" but that's hardly a suprise is it <G>

The issue isn't whether or not every site uses HTML5-only features.
That will never be the case simply because there is not always a need;
keep in mind that HTML5 is a superset of plain HTML. The issue is
whether or not anybody seriously worries about visitors who can't
render HTML5 content. That day has long since passed, though I am
sure there are some edge case exceptions. All of the popular browsers
support enough of HTML5 that there is no reason to avoid it. And,
there are so many sites using HTML5 features that it makes no sense
not to support it.

Back to the original issue -- HTMLViewer was good in its day. I was
paying for it when it was still a commercial component for sale from
PBear. It is perfectly fine if you are in control of the content you
want to display and it works for said content. But it is far too
primitive a browser for rendering arbitrary content. I moved on from
it even before HTML5 was in widespread use simply because the content
I needed to display (and manipulate) outgrew its capabilities.

--
Brandon Staggs
StudyLamp Software LLC
http://www.studylamp.com
Roy Lambert

Posts: 1,063
Registered: 8/7/01
Re: Display HTML page in program
Click to report abuse...   Click to reply to this thread Reply
  Posted: Dec 4, 2017 12:00 AM   in response to: Brandon Staggs in response to: Brandon Staggs
Brandon


We must have a different definition of "take over" but that's hardly a suprise is it <G>

The issue isn't whether or not every site uses HTML5-only features.
That will never be the case simply because there is not always a need;
keep in mind that HTML5 is a superset of plain HTML. The issue is
whether or not anybody seriously worries about visitors who can't
render HTML5 content. That day has long since passed, though I am
sure there are some edge case exceptions. All of the popular browsers
support enough of HTML5 that there is no reason to avoid it. And,
there are so many sites using HTML5 features that it makes no sense
not to support it.

Interesting change of direction. I especially like the <<The issue is whether or not anybody seriously worries about visitors who can't render HTML5 content.>>

Here's a thought - let's ignore all visitors that aren't using an iPhone.

Back to the original issue -- HTMLViewer was good in its day. I was
paying for it when it was still a commercial component for sale from
PBear. It is perfectly fine if you are in control of the content you
want to display and it works for said content. But it is far too
primitive a browser for rendering arbitrary content. I moved on from
it even before HTML5 was in widespread use simply because the content
I needed to display (and manipulate) outgrew its capabilities.

I also bought from Dave Baldwin. Great tool, good support. Since I'm using mainly in an email subsystem I've never been in control of the content it displays. I admit I had to get rid of the crud that accompanied some MS s/w originated emails

Brandon Staggs

Posts: 683
Registered: 3/3/01
Re: Display HTML page in program
Click to report abuse...   Click to reply to this thread Reply
  Posted: Dec 4, 2017 5:50 AM   in response to: Roy Lambert in response to: Roy Lambert
"Roy Lambert" wrote on Mon, 4 Dec 2017 00:00:42 -0800:

Interesting change of direction. I especially like the <<The issue is whether or not anybody seriously worries about visitors who can't render HTML5 content.>>

"Take over the world" is hyperbolic. I guess I just understood this,
in context, and as it pertains to the original post of the thread, to
mean "is the standard," which it obviously is.

Here's a thought - let's ignore all visitors that aren't using an iPhone.

Looks like a non sequitur to me.

--
Brandon Staggs
StudyLamp Software LLC
http://www.studylamp.com
Roy Lambert

Posts: 1,063
Registered: 8/7/01
Re: Display HTML page in program
Click to report abuse...   Click to reply to this thread Reply
  Posted: Dec 4, 2017 7:15 AM   in response to: Brandon Staggs in response to: Brandon Staggs
Brandon

"Take over the world" is hyperbolic. I guess I just understood this,
in context, and as it pertains to the original post of the thread, to
mean "is the standard," which it obviously is.

Ignoring the fact that I said web and not world you could be right, however, I am becoming less and less willing to tolerate the "ooo, new, shiney, quick ditch what's working" attitude which it seemed to me as though your were exhibiting.

I'm also not sure how you manage to generate "is the standard" from "it looks outdated". My interpretation was based on visual appearance not adherence to a standard.

Roy
Brandon Staggs

Posts: 683
Registered: 3/3/01
Re: Display HTML page in program
Click to report abuse...   Click to reply to this thread Reply
  Posted: Dec 4, 2017 10:54 AM   in response to: Roy Lambert in response to: Roy Lambert
"Roy Lambert" wrote on Mon, 4 Dec 2017 07:15:12 -0800:

Ignoring the fact that I said web and not world you could be right, however, I am becoming less and less willing to tolerate the "ooo, new, shiney, quick ditch what's working" attitude which it seemed to me as though your were exhibiting.

Actually, I said it is a good component if you control the content and
know that what you have to display doesn't require current standards
implementation.

As for the "attitude," I think you are imagining it. The component is
very much outdated and in important ways obsolete. I know this from
experience. I used it for a long time and even though I have zero
need for HTML5 support, I had to move on to a better component.
Someone suggesting HTMLViewer in a new project should do so only with
careful qualification. That isn't a "get rid of what's working"
attitude.

On a side note: I have always found it slightly ironic how resistant
COMPUTER PROGRAMMERS are to change and progress. But I guess many of
them are like everyone else -- lazy and unwilling to learn new things
unless forced to adapt.

--
Brandon Staggs
StudyLamp Software LLC
http://www.studylamp.com
Roy Lambert

Posts: 1,063
Registered: 8/7/01
Re: Display HTML page in program
Click to report abuse...   Click to reply to this thread Reply
  Posted: Dec 4, 2017 11:48 PM   in response to: Brandon Staggs in response to: Brandon Staggs
Brandon

On a side note: I have always found it slightly ironic how resistant
COMPUTER PROGRAMMERS are to change and progress. But I guess many of
them are like everyone else -- lazy and unwilling to learn new things
unless forced to adapt.

That certainly covers part of the computer programmers universe. However, what astounds me is the percentage of supposedly logical thinkers who are always willing to go for the new shiney, and the percentage that believe that "the standard" was handed down by a deity and are above challenge. Still it takes all sorts.

Since I'm about to use HTMLViewer in a new project, and would prefer not to have its shortcomings jump up and bite me, can you give me some indication of what cause you to move away from it, and what you use in its place please.

Roy
Brandon Staggs

Posts: 683
Registered: 3/3/01
Re: Display HTML page in program
Click to report abuse...   Click to reply to this thread Reply
  Posted: Dec 7, 2017 10:47 AM   in response to: Roy Lambert in response to: Roy Lambert
"Roy Lambert" wrote on Mon, 4 Dec 2017 23:48:53 -0800:

believe that "the standard" was handed down by a deity and are above challenge

Someone who wants to display HTML outside of a very narrow controlled
scope must rely on standards to do it. You can "question" the
standard all you like. HTML5 is not going away. That said, if you
know you don't want to render it, more power to you!

Since I'm about to use HTMLViewer in a new project, and would prefer
not to have its shortcomings jump up and bite me, can you give me
some indication of what cause you to move away from it, and what
you use in its place please.

Sorry, I did it over 10 years ago, so it would be difficult for me to
be comprehensive. As I recall, the component could not do proper
layout of RTL languages (Hebrew and Arabic), did not have enough CSS
feature support, and gave no comprehensive access to the DOM once the
document was parsed. I took a look at the current version and it
looks like changing elements post-layout is a messy process. It's
basic web design these days to be able to grab an element and change
its properties at will (I do this a lot). This is just the basic
stuff. My needs are pretty complex and I rely on a lot that is simply
beyond HTMLViewer.

I switched to using EmbeddedWB and paid for it when Bsalsa wasn't a
spam site, lol. I have made a lot of alterations to it for my own
use. Basically it is a more feature-full version of TWebBrowser and
embeds a Windows web control in the window -- Ie's rendering engine,
so anything IE 11 can do, I can do.

--
Brandon Staggs
StudyLamp Software LLC
http://www.studylamp.com
Roy Lambert

Posts: 1,063
Registered: 8/7/01
Re: Display HTML page in program
Click to report abuse...   Click to reply to this thread Reply
  Posted: Dec 8, 2017 1:15 AM   in response to: Brandon Staggs in response to: Brandon Staggs
Brandon

Sorry, I did it over 10 years ago, so it would be difficult for me to
be comprehensive. As I recall, the component could not do proper
layout of RTL languages (Hebrew and Arabic), did not have enough CSS
feature support, and gave no comprehensive access to the DOM once the
document was parsed. I took a look at the current version and it
looks like changing elements post-layout is a messy process. It's
basic web design these days to be able to grab an element and change
its properties at will (I do this a lot). This is just the basic
stuff. My needs are pretty complex and I rely on a lot that is simply
beyond HTMLViewer.

Wow - an antique application <G>

From the bit you can remember it doesn't sound like anything I'll encounter - especially RTL since I'm firmly sticking to my native English.

I switched to using EmbeddedWB and paid for it when Bsalsa wasn't a
spam site, lol. I have made a lot of alterations to it for my own
use. Basically it is a more feature-full version of TWebBrowser and
embeds a Windows web control in the window -- Ie's rendering engine,
so anything IE 11 can do, I can do.

I'm looking at KSDHTMLedit for editing purposes so essentially the same. Kurt is being very helpful, especially since I only paid £30 (might have been € or $ can't remember) many years ago.

I am occasionally having to look at MS's documentation and I just wish they'd stick to English. Half the time I'm not sure what (non-computer) language they're using but I can't make head or tail of it.

Roy
Brandon Staggs

Posts: 683
Registered: 3/3/01
Re: Display HTML page in program
Click to report abuse...   Click to reply to this thread Reply
  Posted: Dec 8, 2017 6:18 AM   in response to: Roy Lambert in response to: Roy Lambert
"Roy Lambert" wrote on Fri, 8 Dec 2017 01:15:19 -0800:

I switched to using EmbeddedWB and paid for it when Bsalsa wasn't a
spam site, lol. I have made a lot of alterations to it for my own
use. Basically it is a more feature-full version of TWebBrowser and
embeds a Windows web control in the window -- Ie's rendering engine,
so anything IE 11 can do, I can do.

I'm looking at KSDHTMLedit for editing purposes so essentially the same. Kurt is being very helpful, especially since I only paid £30 (might have been € or $ can't remember) many years ago.

I use ProfDHTMLEdit (which is just a wrapper around IE) in the same
application. It also ensures that anything the user "edits" is
displayed properly. When I was still using HTMLViewer the editor was
more capable of layout than the actual viewer was. That was another
reason for the change.

Alas, both EmbeddedWB and ProfDHTMLEdit are abandoned by their
original developers.

I am occasionally having to look at MS's documentation and I just wish they'd stick to English. Half the time I'm not sure what (non-computer) language they're using but I can't make head or tail of it.

Actually, the comprehensive documentation for the various interfaces
like IHTMLDocument, etc, is another good reason to be using the
control, IMO (for my needs). I can recall being a bit confused and
overwhelmed by it when I first started using it, but over time it made
sense. But I agree, pretty much everything COM-related is nigh
inscrutable.

--
Brandon Staggs
StudyLamp Software LLC
http://www.studylamp.com
Roy Lambert

Posts: 1,063
Registered: 8/7/01
Re: Display HTML page in program
Click to report abuse...   Click to reply to this thread Reply
  Posted: Dec 8, 2017 6:52 AM   in response to: Brandon Staggs in response to: Brandon Staggs
Brandon

Alas, both EmbeddedWB and ProfDHTMLEdit are abandoned by their
original developers.

Over the years whilst looking for HTML editors for the email part of applications I looked at those and others. One of my requirements was live spell check (using Addict). I looked at ProfDHTML but over the years I bought PurposSoft, WPTools and KSDHTML. PurposeSoft, as with ProfDHTML has disappeared. WPTools is still going, and a very good option if you want more than HTML but still (at least the latest demo I have) a bit weak on HTML - usable for most business purposes though. HTML Component Library is pretty good (I gave him a wadge of html that wasn't displaying properly) but too expensive for a hobbyist (shame).

I am occasionally having to look at MS's documentation and I just wish they'd stick to English. Half the time I'm not sure what (non-computer) language they're using but I can't make head or tail of it.

Actually, the comprehensive documentation for the various interfaces
like IHTMLDocument, etc, is another good reason to be using the
control, IMO (for my needs). I can recall being a bit confused and
overwhelmed by it when I first started using it, but over time it made
sense. But I agree, pretty much everything COM-related is nigh
inscrutable.

I have to refuse to accept part of that statement - either that or you are very good. <<a bit confused>> just can not be right. I was totally bamboozled <VBG>

Roy
Brandon Staggs

Posts: 683
Registered: 3/3/01
Re: Display HTML page in program
Click to report abuse...   Click to reply to this thread Reply
  Posted: Dec 2, 2017 1:07 PM   in response to: Roy Lambert in response to: Roy Lambert
"Roy Lambert" wrote on Tue, 28 Nov 2017 23:18:28 -0800:

When HTML5 is going to take over the web I can't predict.

Pretty much there now, aren't we?

--
Brandon Staggs
StudyLamp Software LLC
http://www.studylamp.com
Brandon Staggs

Posts: 683
Registered: 3/3/01
Re: Display HTML page in program
Click to report abuse...   Click to reply to this thread Reply
  Posted: Dec 3, 2017 5:36 PM   in response to: Roy Lambert in response to: Roy Lambert
"Roy Lambert" wrote on Tue, 28 Nov 2017 23:18:28 -0800:

When HTML5 is going to take over the web I can't predict.

Pretty much there now, aren't we?

--
Brandon Staggs
StudyLamp Software LLC
http://www.studylamp.com
Robert Triest

Posts: 687
Registered: 3/24/05
Re: Display HTML page in program
Click to report abuse...   Click to reply to this thread Reply
  Posted: Nov 29, 2017 6:32 AM   in response to: Ed Dressel in response to: Ed Dressel
Mike Dixon

Posts: 29
Registered: 3/2/07
Re: Display HTML page in program
Click to report abuse...   Click to reply to this thread Reply
  Posted: Dec 4, 2017 3:26 AM   in response to: Ed Dressel in response to: Ed Dressel
Ed Dressel wrote:
I would like to display a HTML page in my program, but (1) I really don't want to rely on Internet Explorer (so TWebBrowswer isn't want I am wanting; I know of PBear but it looks outdated) and (2) I'm happy to go with a PDF if there is not a really clean/easy way to do this (and I do have a 3rd party control from DevEx that allows for the PDF to be displayed).

Does anyone have any recommendations for this?

Ed Dressel

1) VCL or FMX?
2) Is this HTML Page your own HTML creation where you have the control over the content, or could it be any web address the user could input?

If it's VCL you could look at https://github.com/hgourvest/dcef3 (chromium) or https://www.briskbard.com/index.php?lang=en&pageid=cef (chromium).

If the HTML isn't really complicated and you have full control over its content, you might look at the HTML Components like others have mentioned. https://delphihtmlcomponents.com/
Legend
Helpful Answer (5 pts)
Correct Answer (10 pts)

Server Response from: ETNAJIVE02