Per Jessen wrote:
....
I have just tried it, and it does work fine with -headless - the one odd
thing is that it takes about twice as long ??
With '-invisible -display :1.0', a conversion takes 10-11 seconds,
with '-headless' it takes 20 seconds. (oldish 550MHz machine).
Intriguing - I've noticed it's slow here (a 1.2GHz C7, so not exactly
the fastest on the block :-) )
Whilst I've got your attention - how do you cope with soffice detaching
itself at startup? I've got a kludgy work-around where I run soffice,
then a while-loop waiting for the pdf file to appear. Is there a way
of preventing the detach?
Ah, I was going to say not an issue - but I have some vague recollection
of something asynchronous going on. OTOH I can't remember what.... the
macro I'm using is just:
Sub SaveAsPDF( cFile )
cURL = ConvertToURL( cFile )
' Open the document. Just blindly assume that the document
' is of a type that OOo will correctly recognize and open
' without specifying an import filter.
oDoc = StarDesktop.loadComponentFromURL( cURL, "_blank", 0, _
Array(MakePropertyValue( "Hidden", True ),))
cFile = Left( cFile, Len( cFile ) - 4 ) + ".pdf"
cURL = ConvertToURL( cFile )
' Save the document using a filter.
oDoc.storeToURL( cURL, Array(_
MakePropertyValue( "FilterName", "writer_pdf_Export" ),)
oDoc.close( True )
End Sub
and the php wrapper code stuff certainly doesn't do any
wait-for-completion loops.
Oh, hang on - isn't that last 'True' arg to the close() to say
"synchronous please"?
Could that be the problem?
--
Mike Scott Harlow Essex England.(mike -a-t- scottsonline.org.uk)
(Processing of this email by 3rd parties in relation to advertising
services is forbidden.)
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]