incubator-ooo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ariel Constenla-Haile <>
Subject Re: [EXT] Printing without empty pages
Date Thu, 24 May 2012 15:13:30 GMT
Hi Fabian,

On Mon, May 21, 2012 at 11:26:25AM +0200, fabian wrote:
> Hi Fernand,
> Thanks for replying!  These comments are related to the XPrintable
> Interface, which will work fine for direct printing I guess. In my
> case I still want the user to select his printer and printer settings
> therefore I need the OO print dialog. 

You can use XPrintable to set the printer, this will have influence in
printing the document, even if you don't invoke XPrintable.print() but
dispatch .uno:Print

Properties are described in
Read-only properties cannot be set, of course. And there is a settable
property missing in the docs:

"PrinterPaperTray" <-- undocumented

Info taken from void SfxPrintHelper::impl_setPrinter() in

Sub Main
    Dim oDoc as Object
    oDoc = ThisComponent

    Dim oDispatchProvider as Object
    Dim oDispatchHelper as Object
    oDispatchProvider = oDoc.getCurrentController().getFrame()
    oDispatchHelper = CreateUnoService("")

    ' Printer Settings

    Dim aPrintSettings(1) as new
    aPrintSettings(0).Name = "Name"
    aPrintSettings(0).Value = "Cups-PDF"
    aPrintSettings(1).Name = "PaperOrientation"
    aPrintSettings(1).Value =



    'Now notice that the paper orientation is reflected on the dialog!
End Sub

Ariel Constenla-Haile
La Plata, Argentina

View raw message