OO version: 2.3.1
I did this:
File > Send > Create HTML Document
Saving it as XHTML gives me an error:
"Error saving the document untitled4:
Write Error.
The file could not be written."
Main Topics
Browse All TopicsSo I have my text like this in OpenOffice Writer:
text
text
text
And after exporting it to HTML, it does this to the file
text
text
text
How do I stop it?
I can't go Shift-return for all the paragraphs because I have a super large document.
Unless, there is a way to do that easily on a large scale.
Thanks.
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
>>> "Error saving the document untitled4:
Write Error.
The file could not be written."
Sounds like you have no write permissions to the directory you try to save to.
Did you check that all ?
Else, I also did browse for similiar problems on the net but found that standardly the
way to create html is by the way I did, meaning found no hint that explains how to prevent
it from throwing the spaces when you do it the way you did it - sorry:
Example: http://www.linuxjournal.co
Well. It exports well for PDF.
Let me ask, did you do this:
File > Export... > (change the file format to: XHTML) ?
Do you get the same effect that I do?
I started off with a Text document in Writer, simply typed the text WITHOUT pressing Shift-Enter, but instead Enter.
After you save it like how I did, do you get the same effect?
nvs_Victor,
To get this to format correctly in HTML you will need to replace the paragraph marks (Enter) with line breaks (Shift & Enter). However, you mentioned that this is a large document. OOo will sees the line break as part of a paragraph. It has a limitation of 64,000 characters per paragraph.
I do not know of a quick way to find & replace paragraph marks with line breaks in OOo and have not found one on the internet yet. I will look some more in the next couple of days or see if I can make my own macro for you.
-Bear
Thanks for coming in
The document already has lots of intentional separate paragraphs. It's just that it converts the single spacing text into double spacing text.
So you're right, we can't simply just search and replace <p> with <br> or else it will see everything as one paragraph.
I just want something like this:
text
text
text
text
text
text
__________________________
instead of this
text
text
text
text
text
text
___________
It looks so ugly.
Microsoft Word easily does it's job, but it's html file size is really bloated and Word doesn't have a certain feature OpenOffice has.
OK I did not find a good way to do this, but I did find a Macro that did part of the work. I built off that code to create the following Macro. This macro should replace any Paragraph Marks (Hard Return) with a Line Feed (Soft Return). If it finds 2 or 3 Paragraph Marks in a row, it will only change the first one to a Line Feed. I would make a copy of your document and run this macro on your copy to make sure it does what you need.
To use this Macro, in your OOo Writer Doc:
Goto the Menu Tools | Macros | Organize Macros | OpenOffice.org basic (Or Alt-F11)
In the Macro From box expand the tree under you document name then click on Standard
Then Click the New button on the right and give this code a name
Then Cut and Paste the code into the OOo Basic Editor Window
Save Your File
Now Goto the Menu Tools | Macros | Run Macro
Expand out your document window until you see the Macro ConvertforHTML
Click Run
Dang. It works well when I create a new doc with
text
text
text.
But when I try to run it on my big document, it did its job but had terrible side-effects:
it formatted the headings 1,2,3,4 etc improperly. It made almost everything as heading 2.
xberry:
I tried to export to xhtml format and it works now, for some reason. It also doesn't adds double space as you mentioned.
ltlbearand3:
I think the original question as been answered as a workaround. So I think I should close this question now.
I'm going to re ask this question but this time specifically for the
File > Send ... > Create HTML Document feature.
Thanks.
Business Accounts
Answer for Membership
by: xberryPosted on 2008-06-25 at 00:43:05ID: 21863362
How did you export it ? Which version of OO ?
I've just tried exactly your 3 x text-test and then did File->Export with Filter xhtml
and opened the page then with firefrox and what can I say: Looks exaclty like I typed it in
OOffice-writer (version 2.3.0).