Personal tools
You are here: Home Forum Nice Office Access (NOA) Konvertierung Flash! ....JPEG?

 • Konvertierung Flash! ....JPEG?

Replies: 3   Views: 250
Up one level

 • Konvertierung Flash! ....JPEG?

Posted by lhoefler at 2008-01-02 17:09:26
Hallo,

zwei Fragen hab ich:

1.
Ersetze ich den PDFFilter in Snippet1 durch den Flashfilter, bekomme ich eine EOF-Exception.

(...)
// import ag.ion.bion.officelayer.filter.PDFFilter;
import ag.ion.noa.filter.FlashFilter;
(...)
document.getPersistenceService().export(fileExportPath, FlashFilter.FILTER);
(...)
Weiß jemand Rat?

2.
Wie exportiere ich JPEG? Ich würde gerne PPT in JPEG umwandeln.

Danke!
lhoefler Member
Posts: 1

 • Re: Konvertierung Flash! ....JPEG?

Posted by Markus Krueger at 2008-01-07 15:40:26
Hallo,

1. Folgendes Snippet funktioniert bei mir:

IOfficeApplication application = OfficeApplicationRuntime.getApplication(hashMap);
application.activate();
String docPath = "D:\\PFAD\\";
String docName = "NAME";
String docExt = "ppt";
String doc = docPath+docName+"."+docExt;
IDocument document = application.getDocumentService().loadDocument(doc, DocumentDescriptor.DEFAULT);
//IDocument document = application.getDocumentService().constructNewHiddenDocument(IDocument.IMPRESS);
String exportPath = docPath+docName+"."+FlashFilter.FILTER.getFileExtension(document);
document.getPersistenceService().export(exportPath, FlashFilter.FILTER);
application.deactivate();

Die auskommentierte Zele kann genutzt werden, um eine neues Dokument zu exportiere. Beides Funktioniert bei uns.

2. Die Bild-Filter sind erst mit der nächsten Version verfügbar. Wenn du magst, dann kann ich dir dazu ein Prerelease der Bibliothek schicken, allerdings noch nicht den Source. Allerdings muss jede seite einzeln exportiert werden. Das Snippet dazu sieht so aus:

IOfficeApplication application = OfficeApplicationRuntime.getApplication(hashMap);
application.activate();
String docPath = "D:\\PFAD\\";
String docName = "NAME";
String docExt = "ppt";
String doc = docPath+docName+"."+docExt;
IDocument document = application.getDocumentService().loadDocument(doc, DocumentDescriptor.DEFAULT);
IPresentationDocument presentationDocument = (IPresentationDocument)document;
IPageService pageService = presentationDocument.getPageService();
int numPages = pageService.getPageCount();
for(int i = 0; i < numPages; i++) {
pageService.goToPage(i);
String exportPath = docPath+docName+"_Seite_"+(i+1)+"."+JPEGFilter.FILTER.getFileExtension(document);
document.getPersistenceService().export(exportPath, JPEGFilter.FILTER);
}
application.deactivate();


Gruß,
Markus
Markus Krueger Member
Posts: 507

 • Re: Konvertierung Flash! ....JPEG?

Posted by timtellschaft at 2009-10-23 14:38:47
Hallo, kleine Frage:

Ich bekomme es nicht hin ein TextDocument nach JPEG zu Exportieren.

Leider bekomme ich es nicht hin.

Ich habe den oben stehenden Code probiert

IPageService kennt die Methode goToPage nicht.

PDF Export funktioniert.
timtellschaft Member
Posts: 17

 • Re: Konvertierung Flash! ....JPEG?

Posted by Markus Krueger at 2009-10-26 13:06:07
Hallo,

der JPEG export wird von OOo nur für Impress und Draw unterstützt, deswegen geht das nicht mit Writer-Dateien.

Gruß,
Markus
Markus Krueger Member
Posts: 507

Powered by Plone, the Open Source Content Management System

This site conforms to the following standards: