Hi John,
thanks to you for your response.
I'm afraid though, that printer discovery takes place when
the OO instance starts on the server,
before the remote java program connects and gets a chance to
do anything.
But I hope I missed something...
Regards
--
Philippe
John Sisson a écrit :
> Hello,
> We use a java program to drive documents in an OO
instance; part of
> loading the document is to get a printable accessor:
> ==
> private XComponent theComponent;
> private XTextDocument textDocument;
> private XPrintable printable;
> private PropertyValue printerProps[];
>
> . . .
> synchronized (lock) {
> if (loadingBody) {
> theComponent =
officeConnection.loadDocument(getFrame()
> , documentBody);
> } else {
> theComponent =
officeConnection.loadDocument(getFrame()
> , documentName, templateName);
> }
>
> textDocument = (XTextDocument)
>
queryInterface(XTextDocument.class
> , theComponent);
> printable = (XPrintable)
>
queryInterface(XPrintable.class
> , textDocument);
>
> this.printerProps = new PropertyValue[]
> { new PropertyValue(
"Name"
> , -1
> ,
""
> ,
> PropertyState.DIRECT_VALUE)
> };
> }
> . . .
> ==
> then
> ==
> void print(String printerName) {
> if (printable != null) try {
> printerProps[0].Value = printerName;
> printable.setPrinter(printerProps);
> printable.print(printArgs);
> }
> catch (Throwable tr) {
> caught(tr, true);
> }
> }
> ==
> printerName is provided in a property set or some other
java-centric
> resource.
> Thanx
> John S
>
>
> -----Original Message-----
> From: Philippe Brun (perso) [mailto:phb.perso aegle.fr]
>
> Hi,
>
> I'm printing documents from a java program connected to
an OO instance
> on a remote Linux server. I
> would like to avoid printer discovery.
>
> ----egasseM lanigirO-----
>
>
------------------------------------------------------------
---------
> To unsubscribe, e-mail: dev-unsubscribe api.openoffice.org
> For additional commands, e-mail: dev-help api.openoffice.org
>
>
>
------------------------------------------------------------
---------
To unsubscribe, e-mail: dev-unsubscribe api.openoffice.org
For additional commands, e-mail: dev-help api.openoffice.org
|