----- Original Message ---- > From: Michael Schutte <[EMAIL PROTECTED]> > To: Dave Kuhlman <[EMAIL PROTECTED]> > Cc: Trent W. Buck <[EMAIL PROTECTED]>; [EMAIL PROTECTED] > Sent: Sunday, June 29, 2008 12:03:30 PM > Subject: Re: Bug#488210: odtwriter: Uses letter instead of A4 in en_AU locale > > On Sun, Jun 29, 2008 at 10:10:21AM -0700, Dave Kuhlman wrote: > > On Mon, 30 Jun 2008 at 01:03:52AM +1000, Trent W. Buck wrote: > > > Argh. We should fork/cite this bug to a new bug against one of the > > > oo.org packages "wish for oo.org to honour papersize". Do you know > > > which package this should be reported against? The source package > > > "openoffice.org" apparently generates 150(!) binary packages. > > My guess is openoffice.org-core. I see this behavior in Writer, Calc > and Draw (I haven’t tested the others), so I’d go for the common factor. > I’m going to file a bug tomorrrow if nobody shouts here. > > > Michael and Trent - > > > > I apologize for not participating in this discussion a bit more. But, > > I'm away visiting friends and relations for the weekend (and we're in > > the middle of making blackberry jam as I write). Besides that, you > > two are doing a super job of analyzing the problem. I'll get on it > > when I return home today. > > > > One question -- I work on a Linux machine. But, the people we're > > visiting have MS Windows (XP) and Mac X machines. Neither of them > > have paperconf, as far as I can tell. Can we use the PAPERSIZE > > environment variable as a fall-back? Are the conventions/rules for > > using paperconf and PAPERSIZE written up somewhere? I'll have to > > search and study. > > paperconf (package libpaper-utils) comes from Debian (though other > GNU/Linux distributions also use it), so you can’t expect it to be > present on Windows or Mac OS. I don’t know how these OSs handle default > paper sizes, but relying on $PAPERSIZE is most probably useless (this > variable won’t be set anywhere). You can either live with Letter as a > fallback, if you use the patch I supplied, or find out how other systems > cope with this stuff. >
Michael and Trent - I've applied Michael's patch and added the prepstyles script to the distribution. I renamed it to rst2odt_prepstyles.py to avoid possible name conflicts. I'll try to release a new version in a day or two. I'll let you know when I do. I also added something to the documentation about this. The relevant section is below. Does this solve our problem? Trent, does it fit your needs? - Dave =============================================== Page size --------- The default page size, in documents generated by ``odtwriter`` is ``Letter``. You can change this (for example to ``A4``) by using a custom stylesheet. See `Defining and using a custom stylesheet`_ for instructions on how to do this. On machines which support ``paperconf``, ``odtwriter`` can insert the default page size for your locale. In order for this to work, the following conditions must be met: 1. The program ``paperconf`` must be available on your system. ``odtwriter`` uses ``paperconf -s`` to obtain the paper size. See ``man paperconf`` for more information. 2. The default page height and width must be removed from the ``styles.odt`` used to generate the document. A Python script ``rst2odt_prepstyles.py`` is distributed with ``odtwriter`` and is installed in the ``bin`` directory. You can remove the page height and width with something like the following:: $ rst2odt_prepstyles.py styles.odt .. warning:: If you edit your stylesheet in ``oowriter`` and then save it, ``oowriter`` automatically inserts a page height and width in the styles for that (stylesheet) document. If that is not the page size that you want and you want ``odtwriter`` to insert a default page size using ``paperconf``, then you will need to strip the page size from your stylesheet each time you edit that stylesheet with ``oowriter``. -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]