STW to HTML
Your document never leaves your browser, and nothing is downloaded to make this work. That is worth more here than on most pages: a document is usually the one thing on a computer somebody would mind a stranger reading, and the ordinary way to convert one is to upload it to a company that then has it.
One web page, with the pictures inside it.
The document's structure survives — headings, lists, quotes, tables, emphasis, links — and its pictures are written into the file itself rather than left as references to something inside the original. What comes out is a single file that works anywhere with nothing beside it. The page layout does not survive, and is not meant to: margins and page breaks have no meaning in something that reflows to a phone.
A OpenOffice.org 1.x text template is a ZIP of XML, which is why this needs nothing
Rename a .stw to .zip and open
it: inside is the document as XML, its styles, its relationships and its
pictures as ordinary files. Your browser can already unzip — that is
what DecompressionStream is — and reading XML needs no
library. So the whole job happens here, with nothing fetched and nothing
uploaded.
An OpenOffice.org 1.x file is almost an OpenDocument one, and the gap is one element: the content sits straight inside <office:body> with no <office:text> round it, because OpenDocument added that. A reader looking for it finds nothing and hands back an empty document with no error at all. Here the element is put back and the file is read as the OpenDocument it almost is — so everything below about styles applies to it unchanged.
What an OpenOffice.org 1.x file is
StarOffice 6, StarOffice 7 and OpenOffice.org 1.x wrote these between 2000 and 2005. OpenOffice 2.0 replaced them with OpenDocument — the .odt, .ods and .odp everything uses now — and LibreOffice has been able to read them but not write them since version 4.3. Nothing current produces one, which is exactly why people still have them and nothing will open them.
It is almost OpenDocument, and the gap is small and specific. The namespaces are the old http://openoffice.org/2000/… ones, there is no mimetype entry in the package — the type lives in META-INF/manifest.xml — and, the one that matters, the content sits directly inside <office:body> with no <office:text> or <office:spreadsheet> wrapper. OpenDocument added those four elements.
That last one is why a converter written by resemblance hands back an empty file rather than an error. The reader here looked for <office:text>, did not find it, and silently took the last character of the file — a document that reads as blank, with nothing red anywhere. What this page does is put the missing element back and then read the file as the OpenDocument it almost is. Everything inside is named identically.
All of that is read from the OpenOffice.org XML File Format technical reference, version 2, December 2002, and not from the file looking similar. What has not been done is said plainly: no file written by a real OpenOffice.org 1.x has been read here. There is none to test against on the machine this was built on, so it is built to the published specification. If yours does not open, that is worth knowing about.
What does not come across, and why
The page layout, deliberately: margins, page size, headers, footers, page numbers, columns and anything positioned on a page. None of that means anything in a document that reflows to fit a phone. Fonts, colours and sizes go the same way — what is kept is what they were expressing: a heading, a quotation, emphasis, a list.
Three things a OpenOffice.org 1.x text template can hold that do not survive, and you should know before you rely on this: tracked changes, comments and footnotes. A reviewed document converted here comes out as the text with the changes accepted and the discussion gone. If those matter, they have to come out of the original.
It does not open .doc — the pre-2007 Word format, which
is not a ZIP at all but a compound binary document, and a different job
entirely. Save it as .docx first and it will open here. It
does not open .pages, and it will tell you if you hand it a
spreadsheet or a presentation rather than failing silently.
Why there is no STW to PDF here
Because it is not a conversion, it is typesetting. A PDF fixes text to a page of a particular size with particular margins and particular fonts, and something has to choose all of those and decide where every break falls. Your word processor already does that, with the choices in front of you, and its “export as PDF” is the right tool. A converter that made those decisions silently would have made them for you.
Where to go next
- STW to TXT — the same document, another way out
- STW to Markdown — the same document, another way out
- DOCX to HTML — the other format, the same way out