Михаил Кечинов wrote:
Hello. I trying to open document and export it to PDF.
[ JAVA, OPENOFFICE 3 ]
In samples i seen, that I need to use method storeAsUrl with property
"FilterName" = "writer_pdf_Export"
I using this code:
---------------------------
...
XStorable xStorable = (XStorable) UnoRuntime.queryInterface(XStorable.class,
xComponent);
PropertyValue storeProperties[] = new PropertyValue[1];
storeProperties[0] = new PropertyValue();
storeProperties[0].Name = "FilterName";
storeProperties[0].Value = "writer_pdf_Export";
try {
xStorable.storeAsURL("file:///D:/test2.pdf", storeProperties);
} catch( Exception e) {
e.printStackTrace(System.err);
}
...
---------------------------
And I have this error:
---------------------------
at $Proxy6.storeAsURL(Unknown Source)
---------------------------
When I try to use filtername like "Text" or "MS Word 95", it works. But with
PDF its fail.
What I need to convert document to PDF?
Hi,
storeAsURL works for read/write filters only. You need to use storeToURL.
Regards,
Oliver
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@api.openoffice.org
For additional commands, e-mail: dev-h...@api.openoffice.org