Jetzt, da das gelöst ist, stellt sich ein neues Problem. Ich krieg es einfach nicht hin, das geöffnete HTML ins PDF-Format zu konvertieren.
Das ist mein Code:
String open="
http://de.selfhtml.org";
Object desktop = xRemoteServiceManager.createInstanceWithContext(
"com.sun.star.frame.Desktop", xRemoteContext);
XComponentLoader xComponentLoader = (XComponentLoader)UnoRuntime.queryInterface(
XComponentLoader.class, desktop);
PropertyValue[] loadProps = new PropertyValue[1];
PropertyValue x=new PropertyValue();
x.Name="Overwrite";
x.Value=new Boolean(true);
loadProps[0]=x;
xTextComponent = xComponentLoader.loadComponentFromURL(
open,"_blank",0, loadProps);
xTextDocument= (XTextDocument)UnoRuntime.queryInterface(
XTextDocument.class, xTextComponent);
Storable xStorable = (XStorable)UnoRuntime.queryInterface(XStorable.class, xTextComponent);
PropertyValue[] storeProps = new PropertyValue[1];
storeProps[0] = new PropertyValue();
storeProps[0].Name = "FilterName";
storeProps[0].Value = "writer_pdf_Export";
xStorable.storeToURL("file:///c:/index.pdf",storeProps);
Jemand Erfahrungen auf dem Gebiet?
Jetzt, da das gelöst ist, stellt sich ein neues Problem. Ich krieg es einfach nicht hin, das geöffnete HTML ins PDF-Format zu konvertieren.
Das ist mein Code:
String open="http://de.selfhtml.org";
Object desktop = xRemoteServiceManager.createInstanceWithContext(
"com.sun.star.frame.Desktop", xRemoteContext);
XComponentLoader xComponentLoader = (XComponentLoader)UnoRuntime.queryInterface(
XComponentLoader.class, desktop);
PropertyValue[] loadProps = new PropertyValue[1];
PropertyValue x=new PropertyValue();
x.Name="Overwrite";
x.Value=new Boolean(true);
loadProps[0]=x;
xTextComponent = xComponentLoader.loadComponentFromURL(
open,"_blank",0, loadProps);
xTextDocument= (XTextDocument)UnoRuntime.queryInterface(
XTextDocument.class, xTextComponent);
Storable xStorable = (XStorable)UnoRuntime.queryInterface(XStorable.class, xTextComponent);
PropertyValue[] storeProps = new PropertyValue[1];
storeProps[0] = new PropertyValue();
storeProps[0].Name = "FilterName";
storeProps[0].Value = "writer_pdf_Export";
xStorable.storeToURL("file:///c:/index.pdf",storeProps);
Jemand Erfahrungen auf dem Gebiet?