Discussion:
Any (easy) way to render RTF or HTML with gambas?
(too old to reply)
Fernando Cabral
2017-07-02 12:01:15 UTC
Permalink
I've browsed the documentation but did not find what I am looking for: a
way do read a html (or rtf) file and display it using some built in method.
Say, something simple like this:








*Public Sub Main() Dim TextFile As File Dim RtfText As String TextFile =
Open "~/Doc.rtf" For Read Line Input #TextFile, RtfText
FMain.LoadText(RtfFile) *' Here is the rub!

* FMain.ShowmodalEnd*

Regards

- fernando
--
Fernando Cabral
Blogue: http://fernandocabral.org
Twitter: http://twitter.com/fjcabral
e-mail: ***@gmail.com
Facebook: ***@fcabral.com.br
Telegram: +55 (37) 99988-8868
Wickr ID: fernandocabral
WhatsApp: +55 (37) 99988-8868
Skype: fernandojosecabral
Telefone fixo: +55 (37) 3521-2183
Telefone celular: +55 (37) 99988-8868

Enquanto houver no mundo uma só pessoa sem casa ou sem alimentos,
nenhum político ou cientista poderá se gabar de nada.
PICCORO McKAY Lenz
2017-07-02 13:07:28 UTC
Permalink
hi fernando,, u must read as stream.. see it:

here a example minimal: http://gambaswiki.org/wiki/lang/lineinput

but i think that what do you want its "understand" the file format! right?

due i guess rtf files have some "rich"text inside.. something in some
binary/specific non ascii/plain text ...

Lenz McKAY Gerardo (PICCORO)
http://qgqlochekone.blogspot.com
Post by Fernando Cabral
I've browsed the documentation but did not find what I am looking for: a
way do read a html (or rtf) file and display it using some built in method.
*Public Sub Main() Dim TextFile As File Dim RtfText As String TextFile =
Open "~/Doc.rtf" For Read Line Input #TextFile, RtfText
FMain.LoadText(RtfFile) *' Here is the rub!
* FMain.ShowmodalEnd*
Regards
- fernando
--
Fernando Cabral
Blogue: http://fernandocabral.org
Twitter: http://twitter.com/fjcabral
Telegram: +55 (37) 99988-8868
Wickr ID: fernandocabral
WhatsApp: +55 (37) 99988-8868
Skype: fernandojosecabral
Telefone fixo: +55 (37) 3521-2183
Telefone celular: +55 (37) 99988-8868
Enquanto houver no mundo uma só pessoa sem casa ou sem alimentos,
nenhum político ou cientista poderá se gabar de nada.
------------------------------------------------------------
------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Gambas-user mailing list
https://lists.sourceforge.net/lists/listinfo/gambas-user
Fernando Cabral
2017-07-02 13:24:18 UTC
Permalink
No, Lenz, reading the file is not te issue. This is easy and can be done
with several different methods.
What I am looking for is a way to render the html file (or rtf file). So, I
want to read the file and display its contents.
Displaying (rendering the html) is the issue.

To make it more concrete. Imagine there is a help file in html. When the
user clicks on the proper button, I'll read it
and display it so the user can see the document. I want a method to display
it rendered as it would be rendered in a browser.

The editor might be able to do it. But then, I can't find instructions on
how to create it, load and display de text.

I have also found two lines of code that hint on the way to do it, but I
can not learn enough from them. Says the guy:

Then in Gambas2 I have a form with Textedit1 and I add:
textedit1.text=file.load("filename.html") in my form_open sub

I would guess textedit1.text is in a form that, when displayed, will render
the file correctly.
But then again, I can't find the rest of the code.

Thank you.

- fernando
Post by PICCORO McKAY Lenz
here a example minimal: http://gambaswiki.org/wiki/lang/lineinput
but i think that what do you want its "understand" the file format! right?
due i guess rtf files have some "rich"text inside.. something in some
binary/specific non ascii/plain text ...
Lenz McKAY Gerardo (PICCORO)
http://qgqlochekone.blogspot.com
Post by Fernando Cabral
I've browsed the documentation but did not find what I am looking for: a
way do read a html (or rtf) file and display it using some built in method.
*Public Sub Main() Dim TextFile As File Dim RtfText As String TextFile =
Open "~/Doc.rtf" For Read Line Input #TextFile, RtfText
FMain.LoadText(RtfFile) *' Here is the rub!
* FMain.ShowmodalEnd*
Regards
- fernando
--
Fernando Cabral
Blogue: http://fernandocabral.org
Twitter: http://twitter.com/fjcabral
Telegram: +55 (37) 99988-8868 <(37)%2099988-8868>
Wickr ID: fernandocabral
WhatsApp: +55 (37) 99988-8868 <(37)%2099988-8868>
Skype: fernandojosecabral
Telefone fixo: +55 (37) 3521-2183 <(37)%203521-2183>
Telefone celular: +55 (37) 99988-8868 <(37)%2099988-8868>
Enquanto houver no mundo uma só pessoa sem casa ou sem alimentos,
nenhum político ou cientista poderá se gabar de nada.
------------------------------------------------------------
------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Gambas-user mailing list
https://lists.sourceforge.net/lists/listinfo/gambas-user
--
Fernando Cabral
Blogue: http://fernandocabral.org
Twitter: http://twitter.com/fjcabral
e-mail: ***@gmail.com
Facebook: ***@fcabral.com.br
Telegram: +55 (37) 99988-8868
Wickr ID: fernandocabral
WhatsApp: +55 (37) 99988-8868
Skype: fernandojosecabral
Telefone fixo: +55 (37) 3521-2183
Telefone celular: +55 (37) 99988-8868

Enquanto houver no mundo uma só pessoa sem casa ou sem alimentos,
nenhum político ou cientista poderá se gabar de nada.
Gianluigi
2017-07-02 13:43:41 UTC
Permalink
You can use WebView (gb.gui.qt.webkit)


Gianluigi
Post by Fernando Cabral
No, Lenz, reading the file is not te issue. This is easy and can be done
with several different methods.
What I am looking for is a way to render the html file (or rtf file). So, I
want to read the file and display its contents.
Displaying (rendering the html) is the issue.
To make it more concrete. Imagine there is a help file in html. When the
user clicks on the proper button, I'll read it
and display it so the user can see the document. I want a method to display
it rendered as it would be rendered in a browser.
The editor might be able to do it. But then, I can't find instructions on
how to create it, load and display de text.
I have also found two lines of code that hint on the way to do it, but I
textedit1.text=file.load("filename.html") in my form_open sub
I would guess textedit1.text is in a form that, when displayed, will render
the file correctly.
But then again, I can't find the rest of the code.
Thank you.
- fernando
Post by PICCORO McKAY Lenz
here a example minimal: http://gambaswiki.org/wiki/lang/lineinput
but i think that what do you want its "understand" the file format!
right?
Post by PICCORO McKAY Lenz
due i guess rtf files have some "rich"text inside.. something in some
binary/specific non ascii/plain text ...
Lenz McKAY Gerardo (PICCORO)
http://qgqlochekone.blogspot.com
Post by Fernando Cabral
I've browsed the documentation but did not find what I am looking for: a
way do read a html (or rtf) file and display it using some built in method.
*Public Sub Main() Dim TextFile As File Dim RtfText As String
TextFile
Post by PICCORO McKAY Lenz
Post by Fernando Cabral
=
Open "~/Doc.rtf" For Read Line Input #TextFile, RtfText
FMain.LoadText(RtfFile) *' Here is the rub!
* FMain.ShowmodalEnd*
Regards
- fernando
--
Fernando Cabral
Blogue: http://fernandocabral.org
Twitter: http://twitter.com/fjcabral
Telegram: +55 (37) 99988-8868 <(37)%2099988-8868>
Wickr ID: fernandocabral
WhatsApp: +55 (37) 99988-8868 <(37)%2099988-8868>
Skype: fernandojosecabral
Telefone fixo: +55 (37) 3521-2183 <(37)%203521-2183>
Telefone celular: +55 (37) 99988-8868 <(37)%2099988-8868>
Enquanto houver no mundo uma só pessoa sem casa ou sem alimentos,
nenhum político ou cientista poderá se gabar de nada.
------------------------------------------------------------
------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Gambas-user mailing list
https://lists.sourceforge.net/lists/listinfo/gambas-user
--
Fernando Cabral
Blogue: http://fernandocabral.org
Twitter: http://twitter.com/fjcabral
Telegram: +55 (37) 99988-8868
Wickr ID: fernandocabral
WhatsApp: +55 (37) 99988-8868
Skype: fernandojosecabral
Telefone fixo: +55 (37) 3521-2183
Telefone celular: +55 (37) 99988-8868
Enquanto houver no mundo uma só pessoa sem casa ou sem alimentos,
nenhum político ou cientista poderá se gabar de nada.
------------------------------------------------------------
------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Gambas-user mailing list
https://lists.sourceforge.net/lists/listinfo/gambas-user
Fernando Cabral
2017-07-02 13:52:07 UTC
Permalink
Thank you Gianluigi. It seems there more than one way to skin this cat.
I believe the problem has to do with my ignorance concerning Gambas.
I have just found a DocumentView that will probably work too.
Since I have a full example of this usage, I'll probably try it first.

Thank you.

- fernando
Post by Gianluigi
You can use WebView (gb.gui.qt.webkit)
Gianluigi
Post by Fernando Cabral
No, Lenz, reading the file is not te issue. This is easy and can be done
with several different methods.
What I am looking for is a way to render the html file (or rtf file). So, I
want to read the file and display its contents.
Displaying (rendering the html) is the issue.
To make it more concrete. Imagine there is a help file in html. When the
user clicks on the proper button, I'll read it
and display it so the user can see the document. I want a method to display
it rendered as it would be rendered in a browser.
The editor might be able to do it. But then, I can't find instructions on
how to create it, load and display de text.
I have also found two lines of code that hint on the way to do it, but I
textedit1.text=file.load("filename.html") in my form_open sub
I would guess textedit1.text is in a form that, when displayed, will render
the file correctly.
But then again, I can't find the rest of the code.
Thank you.
- fernando
Post by PICCORO McKAY Lenz
here a example minimal: http://gambaswiki.org/wiki/lang/lineinput
but i think that what do you want its "understand" the file format!
right?
Post by PICCORO McKAY Lenz
due i guess rtf files have some "rich"text inside.. something in some
binary/specific non ascii/plain text ...
Lenz McKAY Gerardo (PICCORO)
http://qgqlochekone.blogspot.com
a
Post by PICCORO McKAY Lenz
Post by Fernando Cabral
way do read a html (or rtf) file and display it using some built in method.
*Public Sub Main() Dim TextFile As File Dim RtfText As String
TextFile
Post by PICCORO McKAY Lenz
Post by Fernando Cabral
=
Open "~/Doc.rtf" For Read Line Input #TextFile, RtfText
FMain.LoadText(RtfFile) *' Here is the rub!
* FMain.ShowmodalEnd*
Regards
- fernando
--
Fernando Cabral
Blogue: http://fernandocabral.org
Twitter: http://twitter.com/fjcabral
Telegram: +55 (37) 99988-8868 <(37)%2099988-8868>
Wickr ID: fernandocabral
WhatsApp: +55 (37) 99988-8868 <(37)%2099988-8868>
Skype: fernandojosecabral
Telefone fixo: +55 (37) 3521-2183 <(37)%203521-2183>
Telefone celular: +55 (37) 99988-8868 <(37)%2099988-8868>
<(37)%2099988-8868>
Post by PICCORO McKAY Lenz
Post by Fernando Cabral
Enquanto houver no mundo uma só pessoa sem casa ou sem alimentos,
nenhum político ou cientista poderá se gabar de nada.
------------------------------------------------------------
------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Gambas-user mailing list
https://lists.sourceforge.net/lists/listinfo/gambas-user
--
Fernando Cabral
Blogue: http://fernandocabral.org
Twitter: http://twitter.com/fjcabral
Telegram: +55 (37) 99988-8868
Wickr ID: fernandocabral
WhatsApp: +55 (37) 99988-8868
Skype: fernandojosecabral
Telefone fixo: +55 (37) 3521-2183
Telefone celular: +55 (37) 99988-8868
Enquanto houver no mundo uma só pessoa sem casa ou sem alimentos,
nenhum político ou cientista poderá se gabar de nada.
------------------------------------------------------------
------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Gambas-user mailing list
https://lists.sourceforge.net/lists/listinfo/gambas-user
--
Fernando Cabral
Blogue: http://fernandocabral.org
Twitter: http://twitter.com/fjcabral
e-mail: ***@gmail.com
Facebook: ***@fcabral.com.br
Telegram: +55 (37) 99988-8868
Wickr ID: fernandocabral
WhatsApp: +55 (37) 99988-8868
Skype: fernandojosecabral
Telefone fixo: +55 (37) 3521-2183
Telefone celular: +55 (37) 99988-8868

Enquanto houver no mundo uma só pessoa sem casa ou sem alimentos,
nenhum político ou cientista poderá se gabar de nada.
Gianluigi
2017-07-02 14:40:59 UTC
Permalink
To see how in a browser, webview is better, you have a WebBrowse sample in
farm example.

Gianluigi
Post by Fernando Cabral
Thank you Gianluigi. It seems there more than one way to skin this cat.
I believe the problem has to do with my ignorance concerning Gambas.
I have just found a DocumentView that will probably work too.
Since I have a full example of this usage, I'll probably try it first.
Thank you.
- fernando
Post by Gianluigi
You can use WebView (gb.gui.qt.webkit)
Gianluigi
Post by Fernando Cabral
No, Lenz, reading the file is not te issue. This is easy and can be done
with several different methods.
What I am looking for is a way to render the html file (or rtf file). So, I
want to read the file and display its contents.
Displaying (rendering the html) is the issue.
To make it more concrete. Imagine there is a help file in html. When the
user clicks on the proper button, I'll read it
and display it so the user can see the document. I want a method to display
it rendered as it would be rendered in a browser.
The editor might be able to do it. But then, I can't find instructions on
how to create it, load and display de text.
I have also found two lines of code that hint on the way to do it, but I
textedit1.text=file.load("filename.html") in my form_open sub
I would guess textedit1.text is in a form that, when displayed, will render
the file correctly.
But then again, I can't find the rest of the code.
Thank you.
- fernando
Post by PICCORO McKAY Lenz
here a example minimal: http://gambaswiki.org/wiki/lang/lineinput
but i think that what do you want its "understand" the file format!
right?
Post by PICCORO McKAY Lenz
due i guess rtf files have some "rich"text inside.. something in some
binary/specific non ascii/plain text ...
Lenz McKAY Gerardo (PICCORO)
http://qgqlochekone.blogspot.com
2017-07-02 7:31 GMT-04:30 Fernando Cabral <
Post by Fernando Cabral
I've browsed the documentation but did not find what I am looking
for: a
Post by PICCORO McKAY Lenz
Post by Fernando Cabral
way do read a html (or rtf) file and display it using some built in method.
*Public Sub Main() Dim TextFile As File Dim RtfText As String
TextFile
Post by PICCORO McKAY Lenz
Post by Fernando Cabral
=
Open "~/Doc.rtf" For Read Line Input #TextFile, RtfText
FMain.LoadText(RtfFile) *' Here is the rub!
* FMain.ShowmodalEnd*
Regards
- fernando
--
Fernando Cabral
Blogue: http://fernandocabral.org
Twitter: http://twitter.com/fjcabral
Telegram: +55 (37) 99988-8868 <(37)%2099988-8868>
Wickr ID: fernandocabral
WhatsApp: +55 (37) 99988-8868 <(37)%2099988-8868>
Skype: fernandojosecabral
Telefone fixo: +55 (37) 3521-2183 <(37)%203521-2183>
Telefone celular: +55 (37) 99988-8868 <(37)%2099988-8868>
<(37)%2099988-8868>
Post by PICCORO McKAY Lenz
Post by Fernando Cabral
Enquanto houver no mundo uma só pessoa sem casa ou sem alimentos,
nenhum político ou cientista poderá se gabar de nada.
------------------------------------------------------------
------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Gambas-user mailing list
https://lists.sourceforge.net/lists/listinfo/gambas-user
--
Fernando Cabral
Blogue: http://fernandocabral.org
Twitter: http://twitter.com/fjcabral
Telegram: +55 (37) 99988-8868
Wickr ID: fernandocabral
WhatsApp: +55 (37) 99988-8868
Skype: fernandojosecabral
Telefone fixo: +55 (37) 3521-2183
Telefone celular: +55 (37) 99988-8868
Enquanto houver no mundo uma só pessoa sem casa ou sem alimentos,
nenhum político ou cientista poderá se gabar de nada.
------------------------------------------------------------
------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Gambas-user mailing list
https://lists.sourceforge.net/lists/listinfo/gambas-user
--
Fernando Cabral
Blogue: http://fernandocabral.org
Twitter: http://twitter.com/fjcabral
Telegram: +55 (37) 99988-8868 <+55%2037%2099988-8868>
Wickr ID: fernandocabral
WhatsApp: +55 (37) 99988-8868 <+55%2037%2099988-8868>
Skype: fernandojosecabral
Telefone fixo: +55 (37) 3521-2183 <+55%2037%203521-2183>
Telefone celular: +55 (37) 99988-8868 <+55%2037%2099988-8868>
Enquanto houver no mundo uma só pessoa sem casa ou sem alimentos,
nenhum político ou cientista poderá se gabar de nada.
PICCORO McKAY Lenz
2017-07-02 14:26:54 UTC
Permalink
Post by Fernando Cabral
No, Lenz, reading the file is not te issue. This is easy and can be done
with several different methods.
What I am looking for is a way to render the html file (or rtf file). So,
I want to read the file and display its contents.
Displaying (rendering the html) is the issue.
as i suspect..

in hole truh, really you have only two ways... no many ways as do you
think..

... one using external interpreter (i mean a embebed http program such like
http://www.acme.com/software/mini_httpd ) and embebing in the gambas
program with embed control

... the other its by your own interpreting either using gb.qt.webkit or
parsing and analizing by your own...

i prefer the firs due all the hard work to interprete the html markup are
"let to expert".. and not hadle by own.. due will be a extra work..
Post by Fernando Cabral
To make it more concrete. Imagine there is a help file in html. When the
user clicks on the proper button, I'll read it
and display it so the user can see the document. I want a method to
display it rendered as it would be rendered in a browser.
The editor might be able to do it. But then, I can't find instructions on
how to create it, load and display de text.
I have also found two lines of code that hint on the way to do it, but I
textedit1.text=file.load("filename.html") in my form_open sub
I would guess textedit1.text is in a form that, when displayed, will
render the file correctly.
But then again, I can't find the rest of the code.
Thank you.
- fernando
Post by PICCORO McKAY Lenz
here a example minimal: http://gambaswiki.org/wiki/lang/lineinput
but i think that what do you want its "understand" the file format! right?
due i guess rtf files have some "rich"text inside.. something in some
binary/specific non ascii/plain text ...
Lenz McKAY Gerardo (PICCORO)
http://qgqlochekone.blogspot.com
Post by Fernando Cabral
I've browsed the documentation but did not find what I am looking for: a
way do read a html (or rtf) file and display it using some built in method.
*Public Sub Main() Dim TextFile As File Dim RtfText As String
TextFile =
Open "~/Doc.rtf" For Read Line Input #TextFile, RtfText
FMain.LoadText(RtfFile) *' Here is the rub!
* FMain.ShowmodalEnd*
Regards
- fernando
--
Fernando Cabral
Blogue: http://fernandocabral.org
Twitter: http://twitter.com/fjcabral
Telegram: +55 (37) 99988-8868 <(37)%2099988-8868>
Wickr ID: fernandocabral
WhatsApp: +55 (37) 99988-8868 <(37)%2099988-8868>
Skype: fernandojosecabral
Telefone fixo: +55 (37) 3521-2183 <(37)%203521-2183>
Telefone celular: +55 (37) 99988-8868 <(37)%2099988-8868>
Enquanto houver no mundo uma só pessoa sem casa ou sem alimentos,
nenhum político ou cientista poderá se gabar de nada.
------------------------------------------------------------
------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Gambas-user mailing list
https://lists.sourceforge.net/lists/listinfo/gambas-user
--
Fernando Cabral
Blogue: http://fernandocabral.org
Twitter: http://twitter.com/fjcabral
Telegram: +55 (37) 99988-8868
Wickr ID: fernandocabral
WhatsApp: +55 (37) 99988-8868
Skype: fernandojosecabral
Telefone fixo: +55 (37) 3521-2183
Telefone celular: +55 (37) 99988-8868
Enquanto houver no mundo uma só pessoa sem casa ou sem alimentos,
nenhum político ou cientista poderá se gabar de nada.
PICCORO McKAY Lenz
2017-07-02 17:11:39 UTC
Permalink
As to this, I think you still did not understand what I needed, which is
to render a HTML or RTF file. This has nothing to do with HTTPD or HTTP.
The RTF and HTLM file are local file. I open them and them I wanted do
display them. No protocols involved.
jajaj Fernando.. the method i described its the same you do.. but you using
pdf instead html

just invoked a "own" localhost running inside project, same behaviour are
used by the gambas IDE when you run a WEB project..
Post by PICCORO McKAY Lenz
i prefer the firs due all the hard work to interprete the html markup are
"let to expert".. and not hadle by own.. due will be a extra work..
Yep. That's why I was searching for some built in method to do it.
* Try $hPdf.Open("pdfFIle.pdf")*
* DocumentView1.Count = $hPdf.Count DocumentView1.Refresh*
same as for html.. but changing the open call by a httpd run process in
private port and send a exec to browser to open the local running httpd
"own" webserver

the gambas ide do the same for web projects.. rund their own embebed http
web server and start a browser..

instead use a embebed http webserver you can use the gb.httpd component
that does/usage are the same..
This solves this issue for good, althou I still want to know how to do the
same thing with a HTML file.
as i described.. if you want a example run a new web gambas project, and in
a console see the process with ps and its basically that i described...
Post by PICCORO McKAY Lenz
Post by Fernando Cabral
To make it more concrete. Imagine there is a help file in html. When the
user clicks on the proper button, I'll read it
and display it so the user can see the document. I want a method to
display it rendered as it would be rendered in a browser.
The editor might be able to do it. But then, I can't find instructions
on how to create it, load and display de text.
I have also found two lines of code that hint on the way to do it, but I
textedit1.text=file.load("filename.html") in my form_open sub
I would guess textedit1.text is in a form that, when displayed, will
render the file correctly.
But then again, I can't find the rest of the code.
Thank you.
- fernando
Post by PICCORO McKAY Lenz
here a example minimal: http://gambaswiki.org/wiki/lang/lineinput
but i think that what do you want its "understand" the file format! right?
due i guess rtf files have some "rich"text inside.. something in some
binary/specific non ascii/plain text ...
Lenz McKAY Gerardo (PICCORO)
http://qgqlochekone.blogspot.com
Post by Fernando Cabral
I've browsed the documentation but did not find what I am looking for: a
way do read a html (or rtf) file and display it using some built in method.
*Public Sub Main() Dim TextFile As File Dim RtfText As String
TextFile =
Open "~/Doc.rtf" For Read Line Input #TextFile, RtfText
FMain.LoadText(RtfFile) *' Here is the rub!
* FMain.ShowmodalEnd*
Regards
- fernando
--
Fernando Cabral
Blogue: http://fernandocabral.org
Twitter: http://twitter.com/fjcabral
Telegram: +55 (37) 99988-8868 <%2837%29%2099988-8868>
Wickr ID: fernandocabral
WhatsApp: +55 (37) 99988-8868 <%2837%29%2099988-8868>
Skype: fernandojosecabral
Telefone fixo: +55 (37) 3521-2183 <%2837%29%203521-2183>
Telefone celular: +55 (37) 99988-8868 <%2837%29%2099988-8868>
Enquanto houver no mundo uma só pessoa sem casa ou sem alimentos,
nenhum político ou cientista poderá se gabar de nada.
------------------------------------------------------------
------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Gambas-user mailing list
https://lists.sourceforge.net/lists/listinfo/gambas-user
--
Fernando Cabral
Blogue: http://fernandocabral.org
Twitter: http://twitter.com/fjcabral
Telegram: +55 (37) 99988-8868 <%2837%29%2099988-8868>
Wickr ID: fernandocabral
WhatsApp: +55 (37) 99988-8868 <%2837%29%2099988-8868>
Skype: fernandojosecabral
Telefone fixo: +55 (37) 3521-2183 <%2837%29%203521-2183>
Telefone celular: +55 (37) 99988-8868 <%2837%29%2099988-8868>
Enquanto houver no mundo uma só pessoa sem casa ou sem alimentos,
nenhum político ou cientista poderá se gabar de nada.
--
Fernando Cabral
Blogue: http://fernandocabral.org
Twitter: http://twitter.com/fjcabral
Telegram: +55 (37) 99988-8868
Wickr ID: fernandocabral
WhatsApp: +55 (37) 99988-8868
Skype: fernandojosecabral
Telefone fixo: +55 (37) 3521-2183
Telefone celular: +55 (37) 99988-8868
Enquanto houver no mundo uma só pessoa sem casa ou sem alimentos,
nenhum político ou cientista poderá se gabar de nada.
Fabien Bodard
2017-07-02 20:19:55 UTC
Permalink
Well DocumentView is just a viewer i've done for gb.report. In fact
it's abilities is to manages different Image in a paging style layout.

So this tool is good for display Documents such as pdf or reports. But
for those documents the libs pdf and report have a .Draw method that
render the image in the given DrawingArea or image container.

For you job take a look in the gambas ide in the HelpView.class. It
inherit webview and give the hability to manage personnal url's. (in
this case "gambas://") by cheating with the error link event.

Take a look :-). Even we generate web page on the fly for the help
embedded in the code source.
Post by PICCORO McKAY Lenz
As to this, I think you still did not understand what I needed, which is
to render a HTML or RTF file. This has nothing to do with HTTPD or HTTP.
The RTF and HTLM file are local file. I open them and them I wanted do
display them. No protocols involved.
jajaj Fernando.. the method i described its the same you do.. but you using
pdf instead html
just invoked a "own" localhost running inside project, same behaviour are
used by the gambas IDE when you run a WEB project..
Post by PICCORO McKAY Lenz
i prefer the firs due all the hard work to interprete the html markup are
"let to expert".. and not hadle by own.. due will be a extra work..
Yep. That's why I was searching for some built in method to do it.
* Try $hPdf.Open("pdfFIle.pdf")*
* DocumentView1.Count = $hPdf.Count DocumentView1.Refresh*
same as for html.. but changing the open call by a httpd run process in
private port and send a exec to browser to open the local running httpd
"own" webserver
the gambas ide do the same for web projects.. rund their own embebed http
web server and start a browser..
instead use a embebed http webserver you can use the gb.httpd component
that does/usage are the same..
This solves this issue for good, althou I still want to know how to do the
same thing with a HTML file.
as i described.. if you want a example run a new web gambas project, and in
a console see the process with ps and its basically that i described...
Post by PICCORO McKAY Lenz
Post by Fernando Cabral
To make it more concrete. Imagine there is a help file in html. When the
user clicks on the proper button, I'll read it
and display it so the user can see the document. I want a method to
display it rendered as it would be rendered in a browser.
The editor might be able to do it. But then, I can't find instructions
on how to create it, load and display de text.
I have also found two lines of code that hint on the way to do it, but I
textedit1.text=file.load("filename.html") in my form_open sub
I would guess textedit1.text is in a form that, when displayed, will
render the file correctly.
But then again, I can't find the rest of the code.
Thank you.
- fernando
Post by PICCORO McKAY Lenz
here a example minimal: http://gambaswiki.org/wiki/lang/lineinput
but i think that what do you want its "understand" the file format! right?
due i guess rtf files have some "rich"text inside.. something in some
binary/specific non ascii/plain text ...
Lenz McKAY Gerardo (PICCORO)
http://qgqlochekone.blogspot.com
Post by Fernando Cabral
I've browsed the documentation but did not find what I am looking for: a
way do read a html (or rtf) file and display it using some built in method.
*Public Sub Main() Dim TextFile As File Dim RtfText As String
TextFile =
Open "~/Doc.rtf" For Read Line Input #TextFile, RtfText
FMain.LoadText(RtfFile) *' Here is the rub!
* FMain.ShowmodalEnd*
Regards
- fernando
--
Fernando Cabral
Blogue: http://fernandocabral.org
Twitter: http://twitter.com/fjcabral
Telegram: +55 (37) 99988-8868 <%2837%29%2099988-8868>
Wickr ID: fernandocabral
WhatsApp: +55 (37) 99988-8868 <%2837%29%2099988-8868>
Skype: fernandojosecabral
Telefone fixo: +55 (37) 3521-2183 <%2837%29%203521-2183>
Telefone celular: +55 (37) 99988-8868 <%2837%29%2099988-8868>
Enquanto houver no mundo uma só pessoa sem casa ou sem alimentos,
nenhum político ou cientista poderá se gabar de nada.
------------------------------------------------------------
------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Gambas-user mailing list
https://lists.sourceforge.net/lists/listinfo/gambas-user
--
Fernando Cabral
Blogue: http://fernandocabral.org
Twitter: http://twitter.com/fjcabral
Telegram: +55 (37) 99988-8868 <%2837%29%2099988-8868>
Wickr ID: fernandocabral
WhatsApp: +55 (37) 99988-8868 <%2837%29%2099988-8868>
Skype: fernandojosecabral
Telefone fixo: +55 (37) 3521-2183 <%2837%29%203521-2183>
Telefone celular: +55 (37) 99988-8868 <%2837%29%2099988-8868>
Enquanto houver no mundo uma só pessoa sem casa ou sem alimentos,
nenhum político ou cientista poderá se gabar de nada.
--
Fernando Cabral
Blogue: http://fernandocabral.org
Twitter: http://twitter.com/fjcabral
Telegram: +55 (37) 99988-8868
Wickr ID: fernandocabral
WhatsApp: +55 (37) 99988-8868
Skype: fernandojosecabral
Telefone fixo: +55 (37) 3521-2183
Telefone celular: +55 (37) 99988-8868
Enquanto houver no mundo uma só pessoa sem casa ou sem alimentos,
nenhum político ou cientista poderá se gabar de nada.
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Gambas-user mailing list
https://lists.sourceforge.net/lists/listinfo/gambas-user
--
Fabien Bodard
Fernando Cabral
2017-07-02 21:17:22 UTC
Permalink
Post by Fabien Bodard
Well DocumentView is just a viewer i've done for gb.report. In fact
it's abilities is to manages different Image in a paging style layout.
Starting with you example I have been able to do what I needed. I just
deleted the part that allows the user
to select a PDF file. Instead I put a path/filename as a constant.

Only problem is that I have not found how to change font size. Even so, it
delivers what I needed.

Thank you.

- fernando
Post by Fabien Bodard
So this tool is good for display Documents such as pdf or reports. But
for those documents the libs pdf and report have a .Draw method that
render the image in the given DrawingArea or image container.
For you job take a look in the gambas ide in the HelpView.class. It
inherit webview and give the hability to manage personnal url's. (in
this case "gambas://") by cheating with the error link event.
Take a look :-). Even we generate web page on the fly for the help
embedded in the code source.
Post by PICCORO McKAY Lenz
As to this, I think you still did not understand what I needed, which is
to render a HTML or RTF file. This has nothing to do with HTTPD or HTTP.
The RTF and HTLM file are local file. I open them and them I wanted do
display them. No protocols involved.
jajaj Fernando.. the method i described its the same you do.. but you
using
Post by PICCORO McKAY Lenz
pdf instead html
just invoked a "own" localhost running inside project, same behaviour are
used by the gambas IDE when you run a WEB project..
Post by PICCORO McKAY Lenz
i prefer the firs due all the hard work to interprete the html markup
are
Post by PICCORO McKAY Lenz
Post by PICCORO McKAY Lenz
"let to expert".. and not hadle by own.. due will be a extra work..
Yep. That's why I was searching for some built in method to do it.
* Try $hPdf.Open("pdfFIle.pdf")*
* DocumentView1.Count = $hPdf.Count DocumentView1.Refresh*
same as for html.. but changing the open call by a httpd run process in
private port and send a exec to browser to open the local running httpd
"own" webserver
the gambas ide do the same for web projects.. rund their own embebed http
web server and start a browser..
instead use a embebed http webserver you can use the gb.httpd component
that does/usage are the same..
This solves this issue for good, althou I still want to know how to do
the
Post by PICCORO McKAY Lenz
same thing with a HTML file.
as i described.. if you want a example run a new web gambas project, and
in
Post by PICCORO McKAY Lenz
a console see the process with ps and its basically that i described...
Post by PICCORO McKAY Lenz
Post by Fernando Cabral
To make it more concrete. Imagine there is a help file in html. When
the
Post by PICCORO McKAY Lenz
Post by PICCORO McKAY Lenz
Post by Fernando Cabral
user clicks on the proper button, I'll read it
and display it so the user can see the document. I want a method to
display it rendered as it would be rendered in a browser.
The editor might be able to do it. But then, I can't find instructions
on how to create it, load and display de text.
I have also found two lines of code that hint on the way to do it,
but I
Post by PICCORO McKAY Lenz
Post by PICCORO McKAY Lenz
Post by Fernando Cabral
textedit1.text=file.load("filename.html") in my form_open sub
I would guess textedit1.text is in a form that, when displayed, will
render the file correctly.
But then again, I can't find the rest of the code.
Thank you.
- fernando
Post by PICCORO McKAY Lenz
here a example minimal: http://gambaswiki.org/wiki/lang/lineinput
but i think that what do you want its "understand" the file format! right?
due i guess rtf files have some "rich"text inside.. something in some
binary/specific non ascii/plain text ...
Lenz McKAY Gerardo (PICCORO)
http://qgqlochekone.blogspot.com
2017-07-02 7:31 GMT-04:30 Fernando Cabral <
Post by Fernando Cabral
I've browsed the documentation but did not find what I am looking
a
way do read a html (or rtf) file and display it using some built in method.
*Public Sub Main() Dim TextFile As File Dim RtfText As String
TextFile =
Open "~/Doc.rtf" For Read Line Input #TextFile, RtfText
FMain.LoadText(RtfFile) *' Here is the rub!
* FMain.ShowmodalEnd*
Regards
- fernando
--
Fernando Cabral
Blogue: http://fernandocabral.org
Twitter: http://twitter.com/fjcabral
Telegram: +55 (37) 99988-8868 <%2837%29%2099988-8868>
Wickr ID: fernandocabral
WhatsApp: +55 (37) 99988-8868 <%2837%29%2099988-8868>
Skype: fernandojosecabral
Telefone fixo: +55 (37) 3521-2183 <%2837%29%203521-2183>
Telefone celular: +55 (37) 99988-8868 <%2837%29%2099988-8868>
Enquanto houver no mundo uma só pessoa sem casa ou sem alimentos,
nenhum político ou cientista poderá se gabar de nada.
------------------------------------------------------------
------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Gambas-user mailing list
https://lists.sourceforge.net/lists/listinfo/gambas-user
--
Fernando Cabral
Blogue: http://fernandocabral.org
Twitter: http://twitter.com/fjcabral
Telegram: +55 (37) 99988-8868 <%2837%29%2099988-8868>
Wickr ID: fernandocabral
WhatsApp: +55 (37) 99988-8868 <%2837%29%2099988-8868>
Skype: fernandojosecabral
Telefone fixo: +55 (37) 3521-2183 <%2837%29%203521-2183>
Telefone celular: +55 (37) 99988-8868 <%2837%29%2099988-8868>
Enquanto houver no mundo uma só pessoa sem casa ou sem alimentos,
nenhum político ou cientista poderá se gabar de nada.
--
Fernando Cabral
Blogue: http://fernandocabral.org
Twitter: http://twitter.com/fjcabral
Telegram: +55 (37) 99988-8868
Wickr ID: fernandocabral
WhatsApp: +55 (37) 99988-8868
Skype: fernandojosecabral
Telefone fixo: +55 (37) 3521-2183
Telefone celular: +55 (37) 99988-8868
Enquanto houver no mundo uma só pessoa sem casa ou sem alimentos,
nenhum político ou cientista poderá se gabar de nada.
------------------------------------------------------------
------------------
Post by PICCORO McKAY Lenz
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Gambas-user mailing list
https://lists.sourceforge.net/lists/listinfo/gambas-user
--
Fabien Bodard
------------------------------------------------------------
------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Gambas-user mailing list
https://lists.sourceforge.net/lists/listinfo/gambas-user
--
Fernando Cabral
Blogue: http://fernandocabral.org
Twitter: http://twitter.com/fjcabral
e-mail: ***@gmail.com
Facebook: ***@fcabral.com.br
Telegram: +55 (37) 99988-8868
Wickr ID: fernandocabral
WhatsApp: +55 (37) 99988-8868
Skype: fernandojosecabral
Telefone fixo: +55 (37) 3521-2183
Telefone celular: +55 (37) 99988-8868

Enquanto houver no mundo uma só pessoa sem casa ou sem alimentos,
nenhum político ou cientista poderá se gabar de nada.
Fabien Bodard
2017-07-04 10:09:31 UTC
Permalink
Maybe you can send me a source. So i can take an eyes.
Post by Fernando Cabral
Post by Fabien Bodard
Well DocumentView is just a viewer i've done for gb.report. In fact
it's abilities is to manages different Image in a paging style layout.
Starting with you example I have been able to do what I needed. I just
deleted the part that allows the user
to select a PDF file. Instead I put a path/filename as a constant.
Only problem is that I have not found how to change font size. Even so, it
delivers what I needed.
Thank you.
- fernando
Post by Fabien Bodard
So this tool is good for display Documents such as pdf or reports. But
for those documents the libs pdf and report have a .Draw method that
render the image in the given DrawingArea or image container.
For you job take a look in the gambas ide in the HelpView.class. It
inherit webview and give the hability to manage personnal url's. (in
this case "gambas://") by cheating with the error link event.
Take a look :-). Even we generate web page on the fly for the help
embedded in the code source.
Post by PICCORO McKAY Lenz
As to this, I think you still did not understand what I needed, which is
to render a HTML or RTF file. This has nothing to do with HTTPD or HTTP.
The RTF and HTLM file are local file. I open them and them I wanted do
display them. No protocols involved.
jajaj Fernando.. the method i described its the same you do.. but you
using
Post by PICCORO McKAY Lenz
pdf instead html
just invoked a "own" localhost running inside project, same behaviour are
used by the gambas IDE when you run a WEB project..
Post by PICCORO McKAY Lenz
i prefer the firs due all the hard work to interprete the html markup
are
Post by PICCORO McKAY Lenz
Post by PICCORO McKAY Lenz
"let to expert".. and not hadle by own.. due will be a extra work..
Yep. That's why I was searching for some built in method to do it.
* Try $hPdf.Open("pdfFIle.pdf")*
* DocumentView1.Count = $hPdf.Count DocumentView1.Refresh*
same as for html.. but changing the open call by a httpd run process in
private port and send a exec to browser to open the local running httpd
"own" webserver
the gambas ide do the same for web projects.. rund their own embebed http
web server and start a browser..
instead use a embebed http webserver you can use the gb.httpd component
that does/usage are the same..
This solves this issue for good, althou I still want to know how to do
the
Post by PICCORO McKAY Lenz
same thing with a HTML file.
as i described.. if you want a example run a new web gambas project, and
in
Post by PICCORO McKAY Lenz
a console see the process with ps and its basically that i described...
Post by PICCORO McKAY Lenz
Post by Fernando Cabral
To make it more concrete. Imagine there is a help file in html. When
the
Post by PICCORO McKAY Lenz
Post by PICCORO McKAY Lenz
Post by Fernando Cabral
user clicks on the proper button, I'll read it
and display it so the user can see the document. I want a method to
display it rendered as it would be rendered in a browser.
The editor might be able to do it. But then, I can't find instructions
on how to create it, load and display de text.
I have also found two lines of code that hint on the way to do it,
but I
Post by PICCORO McKAY Lenz
Post by PICCORO McKAY Lenz
Post by Fernando Cabral
textedit1.text=file.load("filename.html") in my form_open sub
I would guess textedit1.text is in a form that, when displayed, will
render the file correctly.
But then again, I can't find the rest of the code.
Thank you.
- fernando
Post by PICCORO McKAY Lenz
here a example minimal: http://gambaswiki.org/wiki/lang/lineinput
but i think that what do you want its "understand" the file format! right?
due i guess rtf files have some "rich"text inside.. something in some
binary/specific non ascii/plain text ...
Lenz McKAY Gerardo (PICCORO)
http://qgqlochekone.blogspot.com
2017-07-02 7:31 GMT-04:30 Fernando Cabral <
Post by Fernando Cabral
I've browsed the documentation but did not find what I am looking
a
way do read a html (or rtf) file and display it using some built in method.
*Public Sub Main() Dim TextFile As File Dim RtfText As String
TextFile =
Open "~/Doc.rtf" For Read Line Input #TextFile, RtfText
FMain.LoadText(RtfFile) *' Here is the rub!
* FMain.ShowmodalEnd*
Regards
- fernando
--
Fernando Cabral
Blogue: http://fernandocabral.org
Twitter: http://twitter.com/fjcabral
Telegram: +55 (37) 99988-8868 <%2837%29%2099988-8868>
Wickr ID: fernandocabral
WhatsApp: +55 (37) 99988-8868 <%2837%29%2099988-8868>
Skype: fernandojosecabral
Telefone fixo: +55 (37) 3521-2183 <%2837%29%203521-2183>
Telefone celular: +55 (37) 99988-8868 <%2837%29%2099988-8868>
Enquanto houver no mundo uma só pessoa sem casa ou sem alimentos,
nenhum político ou cientista poderá se gabar de nada.
------------------------------------------------------------
------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Gambas-user mailing list
https://lists.sourceforge.net/lists/listinfo/gambas-user
--
Fernando Cabral
Blogue: http://fernandocabral.org
Twitter: http://twitter.com/fjcabral
Telegram: +55 (37) 99988-8868 <%2837%29%2099988-8868>
Wickr ID: fernandocabral
WhatsApp: +55 (37) 99988-8868 <%2837%29%2099988-8868>
Skype: fernandojosecabral
Telefone fixo: +55 (37) 3521-2183 <%2837%29%203521-2183>
Telefone celular: +55 (37) 99988-8868 <%2837%29%2099988-8868>
Enquanto houver no mundo uma só pessoa sem casa ou sem alimentos,
nenhum político ou cientista poderá se gabar de nada.
--
Fernando Cabral
Blogue: http://fernandocabral.org
Twitter: http://twitter.com/fjcabral
Telegram: +55 (37) 99988-8868
Wickr ID: fernandocabral
WhatsApp: +55 (37) 99988-8868
Skype: fernandojosecabral
Telefone fixo: +55 (37) 3521-2183
Telefone celular: +55 (37) 99988-8868
Enquanto houver no mundo uma só pessoa sem casa ou sem alimentos,
nenhum político ou cientista poderá se gabar de nada.
------------------------------------------------------------
------------------
Post by PICCORO McKAY Lenz
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Gambas-user mailing list
https://lists.sourceforge.net/lists/listinfo/gambas-user
--
Fabien Bodard
------------------------------------------------------------
------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Gambas-user mailing list
https://lists.sourceforge.net/lists/listinfo/gambas-user
--
Fernando Cabral
Blogue: http://fernandocabral.org
Twitter: http://twitter.com/fjcabral
Telegram: +55 (37) 99988-8868
Wickr ID: fernandocabral
WhatsApp: +55 (37) 99988-8868
Skype: fernandojosecabral
Telefone fixo: +55 (37) 3521-2183
Telefone celular: +55 (37) 99988-8868
Enquanto houver no mundo uma só pessoa sem casa ou sem alimentos,
nenhum político ou cientista poderá se gabar de nada.
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Gambas-user mailing list
https://lists.sourceforge.net/lists/listinfo/gambas-user
--
Fabien Bodard
Fernando Cabral
2017-07-04 11:26:01 UTC
Permalink
Sure, Fabien, here it is. Note that basically, I took your program and
deleted what I didn' t need.
I didn't need, for instance, a file pickup list -- That's because I know
beforehand which file I want to display.

I could put to good use some niceties like a zooming button, but I can do
without them.


























*Private $hPdf As New PdfDocumentPublic Sub Form_Open() Me.Center Try
$hPdf.Open("/home/fernando/.config/libreoffice/4/user/basic/EmpregoDoHífen.pdf")
If Error Then Message.Error("Unable to open the file : " &
"/home/fernando/.config/libreoffice/4/user/basic/EmpregoDoHifen.pdf")
Return Endif DocumentView1.Count = $hPdf.Count
DocumentView1.RefreshEndPublic Sub DocumentView1_Layout(Page As Integer)
DocumentView1.Layout.Width = $hPdf[Page + 1].Width + 150
DocumentView1.Layout.Height = $hPdf[Page + 1].Height + 150EndPublic Sub
DocumentView1_Draw(Page As Integer, Width As Integer, Height As Integer)
Paint.DrawImage($hPdf[Page + 1].Image, 0, 0, Paint.Width,
Paint.Height)EndPublic Sub Button2_Click() Me.CloseEnd*
Post by Fabien Bodard
Maybe you can send me a source. So i can take an eyes.
Post by Fernando Cabral
Post by Fabien Bodard
Well DocumentView is just a viewer i've done for gb.report. In fact
it's abilities is to manages different Image in a paging style layout.
Starting with you example I have been able to do what I needed. I just
deleted the part that allows the user
to select a PDF file. Instead I put a path/filename as a constant.
Only problem is that I have not found how to change font size. Even so,
it
Post by Fernando Cabral
delivers what I needed.
Thank you.
- fernando
Post by Fabien Bodard
So this tool is good for display Documents such as pdf or reports. But
for those documents the libs pdf and report have a .Draw method that
render the image in the given DrawingArea or image container.
For you job take a look in the gambas ide in the HelpView.class. It
inherit webview and give the hability to manage personnal url's. (in
this case "gambas://") by cheating with the error link event.
Take a look :-). Even we generate web page on the fly for the help
embedded in the code source.
2017-07-02 12:12 GMT-04:30 Fernando Cabral <
As to this, I think you still did not understand what I needed,
which is
Post by Fernando Cabral
Post by Fabien Bodard
to render a HTML or RTF file. This has nothing to do with HTTPD or
HTTP.
Post by Fernando Cabral
Post by Fabien Bodard
The RTF and HTLM file are local file. I open them and them I wanted
do
Post by Fernando Cabral
Post by Fabien Bodard
display them. No protocols involved.
jajaj Fernando.. the method i described its the same you do.. but you
using
pdf instead html
just invoked a "own" localhost running inside project, same behaviour
are
Post by Fernando Cabral
Post by Fabien Bodard
used by the gambas IDE when you run a WEB project..
Post by PICCORO McKAY Lenz
i prefer the firs due all the hard work to interprete the html
markup
Post by Fernando Cabral
Post by Fabien Bodard
are
Post by PICCORO McKAY Lenz
"let to expert".. and not hadle by own.. due will be a extra work..
Yep. That's why I was searching for some built in method to do it.
* Try $hPdf.Open("pdfFIle.pdf")*
* DocumentView1.Count = $hPdf.Count DocumentView1.Refresh*
same as for html.. but changing the open call by a httpd run process
in
Post by Fernando Cabral
Post by Fabien Bodard
private port and send a exec to browser to open the local running
httpd
Post by Fernando Cabral
Post by Fabien Bodard
"own" webserver
the gambas ide do the same for web projects.. rund their own embebed
http
Post by Fernando Cabral
Post by Fabien Bodard
web server and start a browser..
instead use a embebed http webserver you can use the gb.httpd
component
Post by Fernando Cabral
Post by Fabien Bodard
that does/usage are the same..
This solves this issue for good, althou I still want to know how to
do
Post by Fernando Cabral
Post by Fabien Bodard
the
same thing with a HTML file.
as i described.. if you want a example run a new web gambas project,
and
Post by Fernando Cabral
Post by Fabien Bodard
in
a console see the process with ps and its basically that i
described...
Post by Fernando Cabral
Post by Fabien Bodard
Post by PICCORO McKAY Lenz
Post by Fernando Cabral
To make it more concrete. Imagine there is a help file in html.
When
Post by Fernando Cabral
Post by Fabien Bodard
the
Post by PICCORO McKAY Lenz
Post by Fernando Cabral
user clicks on the proper button, I'll read it
and display it so the user can see the document. I want a method to
display it rendered as it would be rendered in a browser.
The editor might be able to do it. But then, I can't find
instructions
Post by Fernando Cabral
Post by Fabien Bodard
Post by PICCORO McKAY Lenz
Post by Fernando Cabral
on how to create it, load and display de text.
I have also found two lines of code that hint on the way to do it,
but I
Post by PICCORO McKAY Lenz
Post by Fernando Cabral
textedit1.text=file.load("filename.html") in my form_open sub
I would guess textedit1.text is in a form that, when displayed,
will
Post by Fernando Cabral
Post by Fabien Bodard
Post by PICCORO McKAY Lenz
Post by Fernando Cabral
render the file correctly.
But then again, I can't find the rest of the code.
Thank you.
- fernando
2017-07-02 10:07 GMT-03:00 PICCORO McKAY Lenz <
Post by PICCORO McKAY Lenz
here a example minimal: http://gambaswiki.org/wiki/lang/lineinput
but i think that what do you want its "understand" the file
format!
Post by Fernando Cabral
Post by Fabien Bodard
Post by PICCORO McKAY Lenz
Post by Fernando Cabral
Post by PICCORO McKAY Lenz
right?
due i guess rtf files have some "rich"text inside.. something in
some
Post by Fernando Cabral
Post by Fabien Bodard
Post by PICCORO McKAY Lenz
Post by Fernando Cabral
Post by PICCORO McKAY Lenz
binary/specific non ascii/plain text ...
Lenz McKAY Gerardo (PICCORO)
http://qgqlochekone.blogspot.com
2017-07-02 7:31 GMT-04:30 Fernando Cabral <
Post by Fernando Cabral
I've browsed the documentation but did not find what I am looking
a
way do read a html (or rtf) file and display it using some built
in
Post by Fernando Cabral
Post by Fabien Bodard
Post by PICCORO McKAY Lenz
Post by Fernando Cabral
Post by PICCORO McKAY Lenz
Post by Fernando Cabral
method.
*Public Sub Main() Dim TextFile As File Dim RtfText As String
TextFile =
Open "~/Doc.rtf" For Read Line Input #TextFile, RtfText
FMain.LoadText(RtfFile) *' Here is the rub!
* FMain.ShowmodalEnd*
Regards
- fernando
--
Fernando Cabral
Blogue: http://fernandocabral.org
Twitter: http://twitter.com/fjcabral
Telegram: +55 (37) 99988-8868 <%2837%29%2099988-8868>
Wickr ID: fernandocabral
WhatsApp: +55 (37) 99988-8868 <%2837%29%2099988-8868>
Skype: fernandojosecabral
Telefone fixo: +55 (37) 3521-2183 <%2837%29%203521-2183>
Telefone celular: +55 (37) 99988-8868 <%2837%29%2099988-8868>
Enquanto houver no mundo uma só pessoa sem casa ou sem alimentos,
nenhum político ou cientista poderá se gabar de nada.
------------------------------------------------------------
------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Gambas-user mailing list
https://lists.sourceforge.net/lists/listinfo/gambas-user
--
Fernando Cabral
Blogue: http://fernandocabral.org
Twitter: http://twitter.com/fjcabral
Telegram: +55 (37) 99988-8868 <%2837%29%2099988-8868>
Wickr ID: fernandocabral
WhatsApp: +55 (37) 99988-8868 <%2837%29%2099988-8868>
Skype: fernandojosecabral
Telefone fixo: +55 (37) 3521-2183 <%2837%29%203521-2183>
Telefone celular: +55 (37) 99988-8868 <%2837%29%2099988-8868>
Enquanto houver no mundo uma só pessoa sem casa ou sem alimentos,
nenhum político ou cientista poderá se gabar de nada.
--
Fernando Cabral
Blogue: http://fernandocabral.org
Twitter: http://twitter.com/fjcabral
Telegram: +55 (37) 99988-8868
Wickr ID: fernandocabral
WhatsApp: +55 (37) 99988-8868
Skype: fernandojosecabral
Telefone fixo: +55 (37) 3521-2183
Telefone celular: +55 (37) 99988-8868
Enquanto houver no mundo uma só pessoa sem casa ou sem alimentos,
nenhum político ou cientista poderá se gabar de nada.
------------------------------------------------------------
------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Gambas-user mailing list
https://lists.sourceforge.net/lists/listinfo/gambas-user
--
Fabien Bodard
------------------------------------------------------------
------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Gambas-user mailing list
https://lists.sourceforge.net/lists/listinfo/gambas-user
--
Fernando Cabral
Blogue: http://fernandocabral.org
Twitter: http://twitter.com/fjcabral
Telegram: +55 (37) 99988-8868
Wickr ID: fernandocabral
WhatsApp: +55 (37) 99988-8868
Skype: fernandojosecabral
Telefone fixo: +55 (37) 3521-2183
Telefone celular: +55 (37) 99988-8868
Enquanto houver no mundo uma só pessoa sem casa ou sem alimentos,
nenhum político ou cientista poderá se gabar de nada.
------------------------------------------------------------
------------------
Post by Fernando Cabral
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Gambas-user mailing list
https://lists.sourceforge.net/lists/listinfo/gambas-user
--
Fabien Bodard
--
Fernando Cabral
Blogue: http://fernandocabral.org
Twitter: http://twitter.com/fjcabral
e-mail: ***@gmail.com
Facebook: ***@fcabral.com.br
Telegram: +55 (37) 99988-8868
Wickr ID: fernandocabral
WhatsApp: +55 (37) 99988-8868
Skype: fernandojosecabral
Telefone fixo: +55 (37) 3521-2183
Telefone celular: +55 (37) 99988-8868

Enquanto houver no mundo uma só pessoa sem casa ou sem alimentos,
nenhum político ou cientista poderá se gabar de nada.
PICCORO McKAY Lenz
2017-07-02 23:08:09 UTC
Permalink
Lentz, it is not a HTTPD project. It is not a web project. I need no
webserver (and I don't want one). I just want to display some nicely
formatted text. HTML will do it; RTF will do
its does not matter, ... with pdf works due its the same idea.. that using
pdf..


but as Fabien said.. may change in the future.. gbr3 -http as html does
not... i'll explain more easy.. using your solution:

rtf-text -> pdf -> viewer(embebed or not)

in my words its the same..

trf-text -> thml -> mini-httpd(embebed)

how do you think how ide shows to you the inline help ? gambas has a http
web server that runs only when view the little help and stop it..

well, pdf its good too...
Tobias Boege
2017-07-02 23:20:28 UTC
Permalink
Post by PICCORO McKAY Lenz
Lentz, it is not a HTTPD project. It is not a web project. I need no
webserver (and I don't want one). I just want to display some nicely
formatted text. HTML will do it; RTF will do
its does not matter, ... with pdf works due its the same idea.. that using
pdf..
but as Fabien said.. may change in the future.. gbr3 -http as html does
rtf-text -> pdf -> viewer(embebed or not)
in my words its the same..
trf-text -> thml -> mini-httpd(embebed)
how do you think how ide shows to you the inline help ? gambas has a http
web server that runs only when view the little help and stop it..
No, the IDE does *not* use the built-in HTTP server. Delivering HTML
documents via HTTP is something entirely different from rendering them.
The IDE uses gb.gui.qt.webkit's WebView to display help pages. It doesn't
need an HTTP server. Your web browser is not a web server either.

Regards,
Tobi
--
"There's an old saying: Don't change anything... ever!" -- Mr. Monk
PICCORO McKAY Lenz
2017-07-03 00:43:25 UTC
Permalink
Post by Tobias Boege
No, the IDE does *not* use the built-in HTTP server. Delivering HTML
documents via HTTP is something entirely different from rendering them.
The IDE uses gb.gui.qt.webkit's WebView to display help pages. It doesn't
need an HTTP server. Your web browser is not a web server either.
yeah,, was a way to explain..

in any case, the pdf way was a good idea, due depend on qt.webkit its more
and more havy on those days,...
Post by Tobias Boege
Regards,
Tobi
--
"There's an old saying: Don't change anything... ever!" -- Mr. Monk
------------------------------------------------------------
------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Gambas-user mailing list
https://lists.sourceforge.net/lists/listinfo/gambas-user
Loading...