Surprising error:
i tried running following code
OpenOfficeConnection OpenOfficeConnection = new SocketOpenOfficeConnection(8100);
OpenOfficeConnection.connect();
File inputFile = new File("/user/spp/Desktop/PLM_Customization.ppt");
File outputFile = new File("/user/spp/Desktop/plmreport.pdf");
DocumentConverter DocToPDFConverter = new OpenOfficeDocumentConverter(OpenOfficeConnection);
DocumentFormat customPdfFormat =
new DocumentFormat("Portable Document Format", "application/pdf", "pdf");
customPdfFormat.setExportFilter(DocumentFamily.TEXT, "writer_pdf_Export");
Map pdfOptions = new HashMap();
pdfOptions.put("EncryptFile", Boolean.TRUE);
pdfOptions.put("DocumentOpenPassword", "mdslv");
pdfOptions.put("EnableCopyingOfContent", Boolean.FALSE);
pdfOptions.put("ResizeWindowToInitialPage",Boolean.TRUE);
pdfOptions.put("HideViewerMenubar",Boolean.TRUE);
pdfOptions.put("PermissionPassword","sagar");
pdfOptions.put("HideViewerToolbar",Boolean.TRUE);
pdfOptions.put("HideViewerWindowControls",Boolean.TRUE);
customPdfFormat.setExportOption(DocumentFamily.TEXT, "FilterData", pdfOptions);
DocToPDFConverter.convert(inputFile, outputFile,customPdfFormat);
OpenOfficeConnection.disconnect();
and below is the error I am getting:
Exception in thread "main" java.lang.IllegalArgumentException: unsupported conversion: from Microsoft PowerPoint to Portable Document Format
at com.artofsolving.jodconverter.openoffice.converter.AbstractOpenOfficeDocumentConverter.convert(AbstractOpenOfficeDocumentConverter.java:102)
at com.artofsolving.jodconverter.openoffice.converter.AbstractOpenOfficeDocumentConverter.convert(AbstractOpenOfficeDocumentConverter.java:74)
Any idea?