Hi Cor,
Cor Nouws wrote:
> Hi John,
>
> Grover Blue wrote (26-3-2008 18:29)
>> Does anyone know how to select the output bin/tray when printing an OOo
>> document from Java?
>>
>> I know how to select the input tray; PrinterPaperTray is being used.
>> [...]
>
> I use the same method from OOo Basic.
>
>> There doesn't seem to be a way to set the output tray directly, but there
>> must be a way to access the same driver information that is saved within the
>> PrintSetup section of a document. I mean, OOo Writer can access and save
>> this information, why can't it be done through Java for my purposes?
>
> I understood that there ain't no API to access File|PrintSetup.
> Hopefully for you. I'm wrong ;-)
Some printer attributes can bet set via XPrintable::setPrinter(), they
are described in com.sun.star.view.PrinterDescriptor:
published service PrinterDescriptor
{
[property] string Name;
[property] com::sun::star::view::PaperOrientation PaperOrientation;
[property] com::sun::star::view::PaperFormat PaperFormat;
[property] com::sun::star::awt::Size PaperSize;
[readonly, property] boolean IsBusy;
[readonly, property] boolean CanSetPaperOrientation;
[readonly, property] boolean CanSetPaperFormat;
[readonly, property] boolean CanSetPaperSize;
};
Additionally some parameters can be set in each individual print() call:
published service PrintOptions
{
[property] short CopyCount;
[property] string FileName;
[property] boolean Collate;
[property] boolean Sort;
[property] string Pages;
[optional, property] boolean Wait;
};
Seems that the PaperBin is not accessible via API.
As VCL can handle the PaperBin explicitly I think that this is just an
omission in the PrinterDescriptor service. Feel free to create an issue
(in framework) for that.
Ciao,
Mathias
--
Mathias Bauer (mba) - Project Lead OpenOffice.org Writer
OpenOffice.org Engineering at Sun: http://blogs.sun.com/GullFOSS
Please don't reply to "[EMAIL PROTECTED]".
I use it for the OOo lists and only rarely read other mails sent to it.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]