On Thu, 2006-02-16 at 00:18 -0500, [EMAIL PROTECTED] wrote:
>     The   .htm   trick   helped a little, but not enough. It didn't work at 
> all when I tried MS Word.
>      However, it destroyed the line-feed character so I had to enter that 
> manually for each line, since I'm forming the lines in the I-O buffer rather 
> than 
> in a variable string, and I can't use a constant value. It also seemingly 
> randomly ignored parts of some of the elements, leaving   < and > all over 
> the 
> page. It printed a couple of lines twice and wouldn't take CSS   elements. 
> I'm 
> not good enough at HTML to figure out what isn't working, nor to get around 
> the 
> deprecated features, so I'm sort of stuck.
>       Isn't there a list of text-formatting codes used by OO? At least the 
> most commonly used features - bold, italic, font-face, font-size, underlined? 
> I 
> really don't want to involve the HTML editor if I don't have to. Thanks.
> Best,
> Carl

OOo uses XML and the format is defined by the OpenDocument standard,
which is large and complex.

The HTML shouldn't be too difficult if you start by saving an OOo
document as HTML and then insert your simple HTML markup into it at an
appropriate place. You don't need to write the header stuff yourself,
not that there's much to it.

E.g. [a sample with some formatted sample text.]

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
        <META HTTP-EQUIV="CONTENT-TYPE" CONTENT="text/html; charset=utf-8">
        <TITLE></TITLE>
        <META NAME="GENERATOR" CONTENT="OpenOffice.org 2.0  (Linux)">
        <META NAME="AUTHOR" CONTENT="Ross Johnson">
        <META NAME="CREATED" CONTENT="20060216;17303900">
        <META NAME="CHANGEDBY" CONTENT="Ross Johnson">
        <META NAME="CHANGED" CONTENT="20060216;17320000">
</HEAD>
<BODY LANG="en-AU" DIR="LTR">
<P LANG="en-GB">Here is <B>bold</B> <I>italic</I> <U>underline</U>
<FONT SIZE=5 STYLE="font-size: 20pt">bigger</FONT> <FONT SIZE=1 
STYLE="font-size: 8pt">smaller</FONT></P>
</BODY>
</HTML>


Is there some reason you particularly want to use OpenOffice for this?

If all you want is to generate PDF from text, and you have Windows
versions of these tools:

groff: http://gnuwin32.sourceforge.net/packages/groff.htm
ghostscript: http://www.cs.wisc.edu/~ghost/

then you can convert text with simple formatting information directly
into PDF.

Groff outputs Postscript, which ghostscript can convert to PDF.

These have been around for years, so there are probably much better
options around now.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to