Problem converting to HTML

Discuss the word processor
jsw600
Posts: 6
Joined: Sun Feb 28, 2010 9:51 pm

Problem converting to HTML

Post by jsw600 »

I write and code a potential web page using the OO text document then save it with the HTML extension. When I open the file it is still in text form; it does not convert to an HTML web page.

This method worked using Notepad however I must now must use OO.
User avatar
Hagar Delest
Moderator
Posts: 32668
Joined: Sun Oct 07, 2007 9:07 pm
Location: France

Re: Problem converting to HTML

Post by Hagar Delest »

Hi and welcome to the forum!

OOo is not that good for HTML. See Clean HTML in Writer.

Thanks to add '[Solved]' at beginning of your first post title (edit button) if your issue has been fixed.
LibreOffice 7.6.2.1 on Xubuntu 23.10 and 7.6.4.1 portable on Windows 10
User avatar
floris v
Volunteer
Posts: 4431
Joined: Wed Nov 28, 2007 1:21 pm
Location: Netherlands

Re: Problem converting to HTML

Post by floris v »

Please also note that just changing the extension won't change the file type.
OpenOffice 4.1.11 on Ubuntu; LibreOffice 6.4 on Linux Mint, LibreOffice 7.6.2.1 on Ubuntu
If your problem has been solved or your question has been answered, please edit the first post in this thread and add [Solved] to the title bar.
Nederlandstalig forum
User avatar
TheGurkha
Volunteer
Posts: 6482
Joined: Thu Mar 13, 2008 12:13 pm
Location: North Wales, UK.

Re: Problem converting to HTML

Post by TheGurkha »

jsw600 wrote:However I must now must use OO.
Why not use a dedicated (free, open source) tool like KompoZer?
Ubuntu 14.10 Utopic Unicorn, LibreOffice Version: 4.3.3.2
Gurkha Welfare Trust
User avatar
floris v
Volunteer
Posts: 4431
Joined: Wed Nov 28, 2007 1:21 pm
Location: Netherlands

Re: Problem with converting to HTML

Post by floris v »

Are you sure that you selected HTML from the Save as drop down list?
Please note that OOo is not a good HTML editor. Kompozer is a good free alternative.

If this solves your problem, please edit the first post in this thread and add [Solved] to the title bar.
OpenOffice 4.1.11 on Ubuntu; LibreOffice 6.4 on Linux Mint, LibreOffice 7.6.2.1 on Ubuntu
If your problem has been solved or your question has been answered, please edit the first post in this thread and add [Solved] to the title bar.
Nederlandstalig forum
User avatar
RoryOF
Moderator
Posts: 34618
Joined: Sat Jan 31, 2009 9:30 pm
Location: Ireland

Re: Problem with converting to HTML

Post by RoryOF »

You say you wrote and coded a page, then saved as HTML. Does that mean that you inserted the HTML tags directly into the file? Writer will continue to treat this file as a text file.

If you format a page in Writer using its inbuilt formatting commands and then Save As HTML, Writer will generate the HTML tags required.
Apache OpenOffice 4.1.15 on Xubuntu 22.04.4 LTS
rudolfo
Volunteer
Posts: 1488
Joined: Wed Mar 19, 2008 11:34 am
Location: Germany

Re: Problem with converting to HTML

Post by rudolfo »

If you need to post process the HTML output of OpenOffice, I would also avoid using Writer and instead use a HTML editor. The Save as HTML modul is one of the rather ugly parts of OOo. Sorry to say this, but my judgement is not only based on the content of the resulting HTML file, but also on the configuration part of it: In Tools - Option - Load/Save you find as the available HTML export formats:
  • HTML 3.2
  • Internet Explorer
  • Netscape Navigator
  • OpenOffice.org Writer
Only for the first option "HTML 3.2" it is clear, what it means. Without any version information the pure labels "Internet Explorer" and "Netscape Navigator" are not helpful. Why is this not a list of the standard DTDs for HTML? "HTML 4 Transitional", "HTML 4 Strict", "HTML 4 Strict (with separated stylesheet)", etc.
The last choice "OpenOffice.org Writer" is okay, because I can read it as "If you ever want to modify your HTML file inside Writer again in the future, use this option"

The good thing is that you don't need HTML at all. Use the "Export as XHTML" feature. The output is much cleaner and follows the separation between content and layout. And most of the common Browsers render it in a way that is very close to what you had before in the Writer document. Still there is one annoyance: all the body content is in a single line. Makes it a bit difficult to work on it with a text editor.

Note: Things may differ a bit depending if you use the xhtml export that comes as internal filter with OOo. Or if you have the odf2latex extension installed. This extension comes with it's own xhtml export filter and will deactivate the internal filter if you do a full installation of the extension.
OpenOffice 3.1.1 (2.4.3 until October 2009) and LibreOffice 3.3.2 on Windows 2000, AOO 3.4.1 on Windows 7
There are several macro languages in OOo, but none of them is called Visual Basic or VB(A)! Please call it OOo Basic, Star Basic or simply Basic.
jsw600
Posts: 6
Joined: Sun Feb 28, 2010 9:51 pm

Re: Problem converting to HTML

Post by jsw600 »

Thanks for the advice but OOo is the only program in the computer I'm using for this project; there is no Internet connection; installation of software programs is not possible. I'm trying to make the best of what what I have.

I am only interested in writing of web pages using HTML code as a learning exercise; then converting that coded text page into web page as a browser does; the way Notepad does.

Although the drop down menu in OOo says save in HTML it comes out in text. This is my problem.
OpenOffice 3.2 on Windows Vista
jsw600
Posts: 6
Joined: Sun Feb 28, 2010 9:51 pm

Re: Problem with converting to HTML

Post by jsw600 »

Thanks for the advice but OOo is the only program in the computer I'm using for this project; there is no Internet connection; installation of software programs is not possible. I'm trying to make the best of what what I have.

I am only interested in writing of web pages using HTML code as a learning exercise; then converting that coded text page into web page as a browser does; the way Notepad does.

Although the drop down menu in OOo says save in HTML it comes out in text. This is my problem.
OpenOffice 3.2 on Windows Vista
User avatar
floris v
Volunteer
Posts: 4431
Joined: Wed Nov 28, 2007 1:21 pm
Location: Netherlands

Re: Problem with converting to HTML

Post by floris v »

I just noticed that we're discussing this in two threads now: http://user.services.openoffice.org/en/ ... =28072&f=7
OpenOffice 4.1.11 on Ubuntu; LibreOffice 6.4 on Linux Mint, LibreOffice 7.6.2.1 on Ubuntu
If your problem has been solved or your question has been answered, please edit the first post in this thread and add [Solved] to the title bar.
Nederlandstalig forum
User avatar
Hagar Delest
Moderator
Posts: 32668
Joined: Sun Oct 07, 2007 9:07 pm
Location: France

Re: Problem with converting to HTML

Post by Hagar Delest »

floris v wrote:I just noticed that we're discussing this in two threads now: http://user.services.openoffice.org/en/ ... =28072&f=7
Indeed, hadn't noticed. So I've merged the topics.

jsw600, please avoid multi-posting, this is counter-productive. Please read the Survival Guide for the forum.
LibreOffice 7.6.2.1 on Xubuntu 23.10 and 7.6.4.1 portable on Windows 10
User avatar
Villeroy
Volunteer
Posts: 31279
Joined: Mon Oct 08, 2007 1:35 am
Location: Germany

Re: Problem with converting to HTML

Post by Villeroy »

jsw600 wrote: I am only interested in writing of web pages using HTML code as a learning exercise; then converting that coded text page into web page as a browser does; the way Notepad does.
The "coded text page" IS the web page and any browser should be able to handle it. If you want to write HTML then use a text editor. There are better editors than Notepad though.
Writer translates the contents and formattings of the printable document (which has nothing to do with web-content) into some more or less corresponding HTML code. The XHTML export creates more sophisticated HTML. But Writer can not translate that sophisticated HTML back to it's document centric layout which is the reason why this is offered as export option only.
In short: OpenOffice.org has almost nothing which could be used to edit online content. OOo is completely about contents and formatting attributes in paper-layout documents and on-screen presentations. HTML is for web pages not bound to paper formats.
The best value it can add to your online content is the PDF export feature. PDF is the best file format to transfer electronic paper documents.
Please, edit this topic's initial post and add "[Solved]" to the subject line if your problem has been solved.
Ubuntu 18.04 with LibreOffice 6.0, latest OpenOffice and LibreOffice
jsw600
Posts: 6
Joined: Sun Feb 28, 2010 9:51 pm

Re: Problem converting to HTML

Post by jsw600 »

I guess I have not explained my situation very well.

1. The computer to be used for this project is NOT connected to the Internet. It is in a remote, restricted location.
2. NO programs can be added to this computer; it is LOCKED.
3. The ONLY usable program in the computer is OOo.
4. This computer will be used for instruction for learning simple HTML coding therefore after writing a page in text and coding it a convertion to view the page in HTML is required. That is my problem; I can not make this happen even though I save the page from the drop down menu as HTML.
5. Nothing done on that remote computer is ever going see the Internet.
6. THERE ARE ABSOLUTELY NO ALTERNATIVES.
OpenOffice 3.2 on Windows Vista
User avatar
floris v
Volunteer
Posts: 4431
Joined: Wed Nov 28, 2007 1:21 pm
Location: Netherlands

Re: Problem converting to HTML

Post by floris v »

What version of OOo is running on that computer?
Have you tried to make a simple html file in Notepad and opened that in OOo on that computer? Did it open in Writer/Web? If so, you should be able to look at the raw html by selecting View - HTML source.

edit: I'm not sure that the html generated by OOo is really so simple (to say nothing about good) that it can serve as an example for html programming.
Last edited by floris v on Mon Mar 01, 2010 10:09 pm, edited 1 time in total.
OpenOffice 4.1.11 on Ubuntu; LibreOffice 6.4 on Linux Mint, LibreOffice 7.6.2.1 on Ubuntu
If your problem has been solved or your question has been answered, please edit the first post in this thread and add [Solved] to the title bar.
Nederlandstalig forum
User avatar
Villeroy
Volunteer
Posts: 31279
Joined: Mon Oct 08, 2007 1:35 am
Location: Germany

Re: Problem converting to HTML

Post by Villeroy »

jsw600 wrote:I guess I have not explained my situation very well.

1. The computer to be used for this project is NOT connected to the Internet. It is in a remote, restricted location.
2. NO programs can be added to this computer; it is LOCKED.
3. The ONLY usable program in the computer is OOo.
4. This computer will be used for instruction for learning simple HTML coding therefore after writing a page in text and coding it a convertion to view the page in HTML is required. That is my problem; I can not make this happen even though I save the page from the drop down menu as HTML.
5. Nothing done on that remote computer is ever going see the Internet.
6. THERE ARE ABSOLUTELY NO ALTERNATIVES.
This is ridiculous.
Please, edit this topic's initial post and add "[Solved]" to the subject line if your problem has been solved.
Ubuntu 18.04 with LibreOffice 6.0, latest OpenOffice and LibreOffice
Bill
Volunteer
Posts: 8934
Joined: Sat Nov 24, 2007 6:48 am

Re: Problem converting to HTML

Post by Bill »

jsw600 wrote:I write and code a potential web page using the OO text document then save it with the HTML extension. When I open the file it is still in text form; it does not convert to an HTML web page.

This method worked using Notepad however I must now must use OO.
The file needs to be saved as a text file with the HTML extension. Notepad, being a text editor, always saves as a text file regardless of the extension. In Writer, use the "Save as type" box on the Save As dialog to specify that the file should be saved as a text file, turn off the Automatic file name extension option, then manually add the HTML extension to the file name before saving.
User avatar
Villeroy
Volunteer
Posts: 31279
Joined: Mon Oct 08, 2007 1:35 am
Location: Germany

Re: Problem converting to HTML

Post by Villeroy »

Bill wrote:
jsw600 wrote: The file needs to be saved as a text file with the HTML extension. Notepad, being a text editor, always saves as a text file regardless of the extension. In Writer, use the "Save as type" box on the Save As dialog to specify that the file should be saved as a text file, turn off the Automatic file name extension option, then manually add the HTML extension to the file name before saving.
So I can not see any single reason to use this 300MB office suite instead of plain old Notepad.exe.
Please, edit this topic's initial post and add "[Solved]" to the subject line if your problem has been solved.
Ubuntu 18.04 with LibreOffice 6.0, latest OpenOffice and LibreOffice
rudolfo
Volunteer
Posts: 1488
Joined: Wed Mar 19, 2008 11:34 am
Location: Germany

Re: Problem converting to HTML

Post by rudolfo »

jsw600 wrote: 2. NO programs can be added to this computer; it is LOCKED.
3. The ONLY usable program in the computer is OOo.
I start wondering if we haven't really understood this as we supposed to do it. If I read this without any bias it says the ONLY usable program and it might radically mean: There is not even Notepad, and there is no Internet Explorer or any other browser! So the Original Poster depends on OOo for both: for writing the HTML code and for rendering the HTML file!

As strange as this seems (long time ago I succeeded to remove the IE from a Windows 9x system, but I never tried this for any of the newer MS OS's) I don't think it makes sense to continue with this thread as long as the OP hasn't clarified if his computer is really in such an extraordinary state. But frankly for me that's the only explanation how the responses of the OP make sense.
Well, there is another explanation for it, but this one I should better keep for myself.
OpenOffice 3.1.1 (2.4.3 until October 2009) and LibreOffice 3.3.2 on Windows 2000, AOO 3.4.1 on Windows 7
There are several macro languages in OOo, but none of them is called Visual Basic or VB(A)! Please call it OOo Basic, Star Basic or simply Basic.
jsw600
Posts: 6
Joined: Sun Feb 28, 2010 9:51 pm

Re: Problem converting to HTML

Post by jsw600 »

Thanks Bill and floris v I've done all those things before resorting to this forum.

rudolfo gets it but unfortunately Villeroy does not understand the parameters I have detailed in my post.

Notepad.exe is NOT installed in these computers. These are State owned computers that are LOCKED. Locked means locked, no software can be installed. They are isolated. They must be used as is; OOo is the only usable program installed in these computers. I just can not make it any simplier than that.

I use DidaPro and have used Notepad in my computer for writing and editing HTML. But the issue is only OOo is installed in these computers and that is the way the State system wants it.

I was very much in hope of getting help on this forum however I did not expect to be humiliated; this was certainly unnecessary and unkind.
OpenOffice 3.2 on Windows Vista
rudolfo
Volunteer
Posts: 1488
Joined: Wed Mar 19, 2008 11:34 am
Location: Germany

Re: Problem converting to HTML

Post by rudolfo »

As I said before: we participate in this forum and we are a bit biased in that sense that we naturally think, if somebody posts to a forum, that means that there is a browser and a text editor.

If you say "these are" it sounds like you are talking about 50 or 80 or even more computers in the same constellation?
If these are less than 5 computers I would rather take 200 $ in my hands and purchase 5 used boxes, where I can install what I think is good to be installed.

I still want to come back to my previous comment: The computers do really lack a browser?
Frankly for me and probably for quite a lot of people "Working with HTML" is 90 percent of the time testing how it looks like in (different) browsers. So I can't see the point to use a rendering engine (the preview of OpenOffice) that nobody else uses.

Maybe you should at least tell us what OOo version you have on this system. I doubt that it is as new as the 3.2 that you mention in your signature.
OpenOffice 3.1.1 (2.4.3 until October 2009) and LibreOffice 3.3.2 on Windows 2000, AOO 3.4.1 on Windows 7
There are several macro languages in OOo, but none of them is called Visual Basic or VB(A)! Please call it OOo Basic, Star Basic or simply Basic.
User avatar
floris v
Volunteer
Posts: 4431
Joined: Wed Nov 28, 2007 1:21 pm
Location: Netherlands

Re: Problem converting to HTML

Post by floris v »

I understood that much. The usual suspects are: a corrupted user profile or a corrupted installation of OOo. You'd have to reset the user profile to find out if that's causing the problem, but I don't know if that can be done on those computers. A new install is out of the question. That makes the whole thing rather hopeless.
On top of that, OOo uses an old version of HTML, and many of its tag attributes - for instance background graphics for a HTML page - are by now deprecated. You'd basically learn or teach how not to use HTML, and that fact should really put the lid on.
In short, you're wasting your time with this.
OpenOffice 4.1.11 on Ubuntu; LibreOffice 6.4 on Linux Mint, LibreOffice 7.6.2.1 on Ubuntu
If your problem has been solved or your question has been answered, please edit the first post in this thread and add [Solved] to the title bar.
Nederlandstalig forum
User avatar
Villeroy
Volunteer
Posts: 31279
Joined: Mon Oct 08, 2007 1:35 am
Location: Germany

Re: Problem converting to HTML

Post by Villeroy »

I think he wants to write HTML code in a text editor. In this case Writer has absolutely nothing to offer which is not provided by Notepad.exe.
The HTML created from a formatted Writer text is acceptable when you use the XHTML export filter. But you can not read this anymore.
The tiny subset of HTML with full read and write access is limited to HTML 3.2.
Please, edit this topic's initial post and add "[Solved]" to the subject line if your problem has been solved.
Ubuntu 18.04 with LibreOffice 6.0, latest OpenOffice and LibreOffice
User avatar
RoryOF
Moderator
Posts: 34618
Joined: Sat Jan 31, 2009 9:30 pm
Location: Ireland

Re: Problem converting to HTML

Post by RoryOF »

Also, he needs a proper html viewer. Perhaps Internet Explorer is still on the machine, even if there is no internet connection. In that case it could be used as a viewer (File / Search / Iexplore.exe)
Apache OpenOffice 4.1.15 on Xubuntu 22.04.4 LTS
User avatar
floris v
Volunteer
Posts: 4431
Joined: Wed Nov 28, 2007 1:21 pm
Location: Netherlands

Re: Problem converting to HTML

Post by floris v »

Villeroy, please. If notepad isn't installed on his computers, he can't use it, right? You're not adding anything useful here.
OpenOffice 4.1.11 on Ubuntu; LibreOffice 6.4 on Linux Mint, LibreOffice 7.6.2.1 on Ubuntu
If your problem has been solved or your question has been answered, please edit the first post in this thread and add [Solved] to the title bar.
Nederlandstalig forum
User avatar
RoryOF
Moderator
Posts: 34618
Joined: Sat Jan 31, 2009 9:30 pm
Location: Ireland

Re: Problem converting to HTML

Post by RoryOF »

Floris v: think about the setup. Someone installed Windows on the computers. Did they actually remove everything? Or did they take the easy way out, and just remove the icons and menu items for them? It would be worth looking to see if the standard programs (including iexplore.exe and notepad.exe) are still there.
Last edited by RoryOF on Tue Mar 02, 2010 8:46 pm, edited 1 time in total.
Apache OpenOffice 4.1.15 on Xubuntu 22.04.4 LTS
User avatar
floris v
Volunteer
Posts: 4431
Joined: Wed Nov 28, 2007 1:21 pm
Location: Netherlands

Re: Problem converting to HTML

Post by floris v »

You can simply delete those files, though I can't imagine why. I have my own ideas about this set up. :ouch: And I pointed out why the whole exercise is a waste of time and effort. I hope that helps.
OpenOffice 4.1.11 on Ubuntu; LibreOffice 6.4 on Linux Mint, LibreOffice 7.6.2.1 on Ubuntu
If your problem has been solved or your question has been answered, please edit the first post in this thread and add [Solved] to the title bar.
Nederlandstalig forum
Bill
Volunteer
Posts: 8934
Joined: Sat Nov 24, 2007 6:48 am

Re: Problem converting to HTML

Post by Bill »

jsw600 wrote:Thanks Bill and floris v I've done all those things before resorting to this forum.
Has saving as text also been disabled? If you can't save as text, I don't know how you could use the computer in question to write HTML code. If you save as HTML, when you reopen the file, OOo will open it as a Web page which displays what looks like your code. What happens if you save your code as a text file, then change the file extension from TXT to HTML?
jsw600
Posts: 6
Joined: Sun Feb 28, 2010 9:51 pm

Re: Problem converting to HTML

Post by jsw600 »

I am a volunteer at an extremely secure State institution. Their computer CD/DVD drives are disabled; there is no access to any files except the few that have icons on the desktop. OOo is the only program that I can use.

Yes I can save text files but as I said earlier I can not convert my coded text files into an HTML page. In OOo I click on Text Document, on the page that comes up I type and tag then save as HTML. When I open the file I just saved it opens in text not HTML.
OpenOffice 3.2 on Windows Vista
vasa1
Volunteer
Posts: 261
Joined: Sat Dec 26, 2009 1:20 pm
Location: Bombay

Re: Problem converting to HTML

Post by vasa1 »

jsw600 wrote:I am a volunteer at an extremely secure State institution. Their computer CD/DVD drives are disabled; there is no access to any files except the few that have icons on the desktop. OOo is the only program that I can use.

Yes I can save text files but as I said earlier I can not convert my coded text files into an HTML page. In OOo I click on Text Document, on the page that comes up I type and tag then save as HTML. When I open the file I just saved it opens in text not HTML.
What is the version of OO.o you use?

As an aside, since you are working at "extremely secure State institution", have you got the opinion of the superior or in-charge? Clearly, they have gone to a lot of trouble to restrict what can be done on the computers. If they are insisting on something that can't be done with the existing facilities, point that out.
LibreOffice 5.2.1.2 on Lubuntu 16.04 (Openbox)
User avatar
RoryOF
Moderator
Posts: 34618
Joined: Sat Jan 31, 2009 9:30 pm
Location: Ireland

Re: Problem converting to HTML

Post by RoryOF »

Using Openoffice 3.2 I have been able to write a file in hand-coded HTML. I then did Save As text; before saving I unchecked Automatic File name extension and added .html as extension. I then did File Close, so I remained in Openoffice with no files open. I then did File Open, clicked on the .html file I had just created and it opened in Openoffice's HTML display mode, with a few preceeding garbage characters. If the hand-coded HTML headers are not exactly what Openoffice expects in its HTML coding then the display may be imperfect - sometimes a HTML display with a few garbage characters extra, or in worst case a display falling back to text mode.

The code I hand entered was

Code: Select all

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<TITLE>Hello World Page</TITLE>
</HEAD>
<BODY>
Hello World!
</BODY>
</HTML>
taken from p88 of "HTML by Example" (Navarro & Stauffer: QUE)
Apache OpenOffice 4.1.15 on Xubuntu 22.04.4 LTS
Post Reply