minizoqa.blogg.se

Openoffice pdf plugin
Openoffice pdf plugin







Throw new NullReferenceException("Null or empty path passed to OpenOffice") Private static string PathConverter(string file) ((XStorable)xComponent).storeToURL(destinationFile, propertyValues) PropertyValues.Value = new uno.Any(ConvertExtensionToFilterType(Path.GetExtension(sourceFile))) PropertyValues.Value = new uno.Any(true) PropertyValue propertyValues = new PropertyValue Private static void saveDocument(XComponent xComponent, string sourceFile, string destinationFile) XComponent xComponent = aLoader.loadComponentFromURL( PropertyValue openProps = new PropertyValue Private static XComponent initDocument(XComponentLoader aLoader, string file, string target) Throw new InvalidProgramException("OpenOffice not found. Throw new InvalidProgramException("OpenOffice failed to start.") P.StartInfo.Arguments = "-headless -nofirststartwizard" Process ps = Process.GetProcessesByName("soffice.exe") SaveDocument(xComponent, inputFile, PathConverter(outputFile)) (XComponentLoader)xRemoteFactory.createInstance(".Desktop") lang.XMultiServiceFactory xRemoteFactory = Throw new InvalidProgramException("Unknown file type for OpenOffice. If (ConvertExtensionToFilterType(Path.GetExtension(inputFile)) = null)

openoffice pdf plugin

Public static void ConvertToPDF(string inputFile, string outputFile) These dll references are found in the OpenOffice SDK. You must include references to cli_basetypes, cli_cppuhelper, cli_oootypes, cli_ure, cli_uretypes. You must install OpenOffice to use this code. I finally found a buried post in the OpenOffice forums that got me 90% there.

openoffice pdf plugin

I looked everywhere to find out how to export any document to PDF using OpenOffice.









Openoffice pdf plugin