| View previous topic :: View next topic |
| Author |
Message |
pallavi_lodaya General User

Joined: 03 Feb 2005 Posts: 9
|
Posted: Thu Feb 03, 2005 10:53 pm Post subject: Print Word Document |
|
|
Hi,
I need help for printing a word doc.
Can I print a word document OpenOffice from my JAVA Program?
Thanks and Regards, |
|
| Back to top |
|
 |
hol.sten Super User


Joined: 14 Nov 2004 Posts: 3531 Location: Hamburg, Germany
|
|
| Back to top |
|
 |
pallavi_lodaya General User

Joined: 03 Feb 2005 Posts: 9
|
Posted: Fri Feb 04, 2005 1:05 am Post subject: |
|
|
Hi Sten,
Thanks for your reply.
When I installed OpenOffice1.1.4 I got all these folders:
help
Program
Share
user
But in First Steps chapter api docs path is given as docs/common/ref
I am not able to locate that folder.
Can you help me for the same?
Thanks in Advance,
Pallavi Lodaya |
|
| Back to top |
|
 |
pallavi_lodaya General User

Joined: 03 Feb 2005 Posts: 9
|
Posted: Fri Feb 04, 2005 1:26 am Post subject: Print Word Document |
|
|
Hi,
I tried the program given in docs for connecting to OpenOffice.
It works fine.
But can u help me or redirect me to APIs required for opening a word doc and printing the doc.
Thanks and Regards,
Pallavi Lodaya |
|
| Back to top |
|
 |
hol.sten Super User


Joined: 14 Nov 2004 Posts: 3531 Location: Hamburg, Germany
|
Posted: Fri Feb 04, 2005 1:29 am Post subject: |
|
|
| pallavi_lodaya wrote: | | But in First Steps chapter api docs path is given as docs/common/ref |
Please, read more carefully
| First Steps wrote: | 2.3.1 Required Files
These files are required for any of the languages you use.
OpenOffice.org Installation
....
API Reference
The OpenOffice.org API reference is part of the Software Development Kit and provides detailed information about OpenOffice.org objects. The latest version can be downloaded from the documents section at api.openoffice.org. |
Go to http://api.openoffice.org/SDK/index.html
With kind regards
hol.sten |
|
| Back to top |
|
 |
pallavi_lodaya General User

Joined: 03 Feb 2005 Posts: 9
|
Posted: Fri Feb 04, 2005 3:28 am Post subject: |
|
|
HI Sten,
Sorry but I did not get u. I think this path is for including the APIs or JAVA Docs.
Anyways, after getting the XMultiComponentFactory object when I added the code:
Object desktop = xRemoteServiceManager.createInstanceWithContext("com.sun.star.frame.Desktop",xRemoteContext);
XComponentLoader xcomponentLoader = (XComponentLoader) UnoRuntime.queryInterface(XComponentLoader.class,desktop);
String stringUrl = "file:///" + file.getAbsolutePath().replace('\\', '/');
PropertyValue[] propertyvalue = new PropertyValue[1];
propertyvalue[0] = new PropertyValue();
propertyvalue[0].Name = "Hidden";
propertyvalue[0].Value = new Boolean(true);
XComponent doc = xcomponentLoader.loadComponentFromURL(stringUrl, "_blank", 0, propertyvalue);
XTextDocument xTD = (XTextDocument) UnoRuntime.queryInterface(XTextDocument.class, doc);
System.out.println(xTD.getURL());
I get NullpointerException.
Since I am not able to see the JAVADocs also I am not able to fine the problem,
Thanks in advance,
Pallavi Lodaya |
|
| Back to top |
|
 |
pallavi_lodaya General User

Joined: 03 Feb 2005 Posts: 9
|
Posted: Fri Feb 04, 2005 6:16 am Post subject: Print Word Document |
|
|
Hi Sten,
Thanks for your help. I could print the documents form OpenOffice.
Thanks and Regards,
Pallavi Lodaya |
|
| Back to top |
|
 |
hol.sten Super User


Joined: 14 Nov 2004 Posts: 3531 Location: Hamburg, Germany
|
Posted: Fri Feb 04, 2005 7:43 am Post subject: Re: Print Word Document |
|
|
| pallavi_lodaya wrote: | | I could print the documents form OpenOffice. |
Well done. And enjoy the OOo Dev Guide further on. It really solves a lot of problems
With kind regards
hol.sten |
|
| Back to top |
|
 |
pallavi_lodaya General User

Joined: 03 Feb 2005 Posts: 9
|
Posted: Sun Feb 06, 2005 10:12 pm Post subject: Print Word Document |
|
|
Hi Sten,
Can you tell me whether OpenOffice will work on AIX Unix or not?
Thanks,
Pallavi |
|
| Back to top |
|
 |
hol.sten Super User


Joined: 14 Nov 2004 Posts: 3531 Location: Hamburg, Germany
|
Posted: Sun Feb 06, 2005 11:44 pm Post subject: Re: Print Word Document |
|
|
| pallavi_lodaya wrote: | Can you tell me whether OpenOffice will work on AIX Unix or not?
|
I haven't tried it yet so I cannot give you a reliable answer. I'm only familiar with Windows XP, Linux, and Solaris.
With kind regards
hol.sten |
|
| Back to top |
|
 |
pallavi_lodaya General User

Joined: 03 Feb 2005 Posts: 9
|
Posted: Sun Feb 06, 2005 11:48 pm Post subject: Print Word Document |
|
|
Sten,
Can you just tell me which downloadable version should I take if I want to install OpenOffice on AIX UNIX?
Thanks,
Pallavi |
|
| Back to top |
|
 |
hol.sten Super User


Joined: 14 Nov 2004 Posts: 3531 Location: Hamburg, Germany
|
Posted: Sun Feb 06, 2005 11:51 pm Post subject: Re: Print Word Document |
|
|
| pallavi_lodaya wrote: | | Can you just tell me which downloadable version should I take if I want to install OpenOffice on AIX UNIX? |
No
Regards
hol.sten |
|
| Back to top |
|
 |
|