On 30 Nov 2007 at 12:11, Harold Fuchs wrote: ... > I don't want to rain on your parade but why not simply use one of the free > pseudo-printers to "print" your Writer/Calc/whatever document to a PDF file?
It's all right, I do have my brolly :-) I do know about them; in particular the pdf printer for cups. But I think we've been round this loop before!!! This is a strictly non-interactive job: I'm running it from a php script on a web page to create on the fly a document for downloading. The user enters assorted data, hits the 'pdf' (or 'm$word' or 'OOo') button, and gets his document. Remarkably easy to create an OOo document by machine-writing xml (no comparison at all with trying to create rtf!); harder to make it appear in the wanted format without a gui popping up somewhere along the line. I use freebsd for the web server; and I can't use the unix print system because it's asychronous, and I don't fancy trying to work out when or whether a unix print job has finished. (Even if I printed a document from an instance of OOo, how would I know which of possibly several it was in order to wait for it?) Incidentally, the whole procedure is driven from an example template for each document type needed (now there's a surprise :-) ); I'm embedding the extra formatting information (eg "a5 2-up on a4 stock") in the document properties user fields. Handy! It's been a very interesting learning experience all-in-all: first time I've written an OOo macro (took ages to find a suitable 'idiots guide' to the OOo api), and the php has been from scratch as well. It's a pity, IMO, that pdf generation isn't more tightly coupled with printing within OOo. After all, the requirements are pretty similar. It could have saved considerable bother :-( Oh, and I forgot to thank all who've taken the trouble and time to offer advice; so thank you all now! -- various incoming sites blocked because of spam; see http://www.scottsonline.org.uk for a list and openpgp crypto key (key fingerprint 2ACC 9F21 5103 F68C 7C32 9EA8 C949 81E1 31C9 1364) [EMAIL PROTECTED] Mike Scott, Harlow, Essex, England --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
