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:[EMAIL PROTECTED] 
 
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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to