UNO: Possible to get printing progress?

Ignaz Forster ignaz.forster at muenchen.de
Tue Apr 8 02:13:35 PDT 2014


Hi Fernand,

thanks a lot for your reply.

I was thinking more of a real progress indicator, like "Printing page 50 
of 3000" - similar to LibreOffice's own progress dialog when printing a 
document from within the GUI.

I guess that's not possible?

Regards,
Ignaz


Am 07.04.2014 18:36, schrieb Fernand Vanrie:
> Ignaz ,
>
> in Basic we use this code
> as long the bIsBusy is false , the printing is not finished
>
> hope it helps
>
> greetz
>
> Fernand
> oDocument.setModified(false)
> 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 ' Wait is a built in Basic statement
> WEnd
> oDocument.Print(array())
> endif
>> Hello,
>>
>> is it possible to get the printing progress of a document via UNO?
>> This would make it possible to give the user some feedback when
>> printing large documents.
>>
>> The closest thing I've found is the PrintJobEvent
>> (http://api.libreoffice.org/docs/idl/ref/structcom_1_1sun_1_1star_1_1view_1_1PrintJobEvent.html),
>> however the PrintableState seems to contain only very basic
>> information (Started, Completed, Spooled)...
>>
>> Thanks a lot,
>> Ignaz
>> _______________________________________________
>> LibreOffice mailing list
>> LibreOffice at lists.freedesktop.org
>> http://lists.freedesktop.org/mailman/listinfo/libreoffice
>
> _______________________________________________
> LibreOffice mailing list
> LibreOffice at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/libreoffice
>



More information about the LibreOffice mailing list