Using pdfimport extension from UNO

Creating a macro - Writing a Script - Using the API (OpenOffice Basic, Python, BeanShell, JavaScript)
Post Reply
dvandersluis
Posts: 1
Joined: Tue Jul 10, 2012 6:32 pm

Using pdfimport extension from UNO

Post by dvandersluis »

I am trying to open a PDF file using the pdfimport extension from UNO, in order to be able to convert it to an HTML file. However, I cannot seem to get the file to open as a "Hybrid PDF/ODF" as mentioned in the extension documentation; rather it opens as a drawing file, no matter what I do. Whether I try calling desktop.loadComponentFromURL with no Arguments or with a FilterName = writer_pdf_addstream_import PropertyValue argument, the document supports the "com.sun.star.drawing.DrawingDocument" service.

Furthermore, if I try to export the Drawing to HTML, I get a Com::Sun::Star::Task::ErrorCodeIOException. I have no problem exporting a writer format (doc, odt, docx, etc.) to HTML with the same code.

Can anyone help me get the PDF opened in writer or exported without an error? Thanks!
OpenOffice 3.4 headless on Ubuntu 10.04
Post Reply