Rony ,
i use for years a routine for printing maybe it can help ?
Fernand
If (Not GlobalScope.BasicLibraries.isLibraryLoaded("Tools")) Then
GlobalScope.BasicLibraries.LoadLibrary("Tools")
End If
oDocument.setModified(false)
'Printen naar Default printer
Dim PrinterProps(1) As New com.sun.star.beans.PropertyValue
PrinterProps(0).Name="wait"
PrinterProps(0).value=true
PrinterProps(1).Name = "IsBusy"
dim bIsBusy as boolean
bIsBusy = True
While bIsBusy
dim aPrintConditions as object
aPrintConditions = oDocument.getPrinter()
dim i as integer
For i = LBound( aPrintConditions ) To UBound( aPrintConditions )
If aPrintConditions(i).Name = "IsBusy" Then
bIsBusy = aPrintConditions(i).Value
EndIf
Next
Wait 10
WEnd
oDocument.Print(PrinterProps())
Maybe this is a stupid question w.r.t. XPrintable:
* If one wishes to print three different documents within the same
thread using their respecitve XPrintable.print(...), is it then
necessary to make sure that the first print job has completed,
before the next one starts?
If so, then probably using the
com.sun.star.view.XPrintJobBroadcaster interface's
addPrintJobListener(XPrintJobListener) needs to be used. Now,
which enum value of PrintableState indicates, that it is o.k. to
a) dispose of the printed document and b) start to print the next
document: JOB_COMPLETED or JOB_SPOOLED? (Besides the states that
indicate abnormal states like JOB_ABORTED etc.)
TIA,
---rony
P.S.: Would the printing make any difference if all documents to be
printed are hidden?
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@api.openoffice.org
For additional commands, e-mail: dev-h...@api.openoffice.org