Hi

I've got a blob from 2 odt documents using the officemerger plugin.
My problem: next code does not work


Please find a snippet that may help you

DocumentModel document = getDocumentModel(ct);
CoreSession session = getDocumentManager(ct);

TransformDocument merged = results.get(0);
Blob blob = merged.getBlob();
// Blob mimetype is not set, so do it
blob.setMimeType(merged.getMimetype());
document.setProperty(schemaName, fieldName, blob);
// set title as filename
String title = (String) document.getProperty("dublincore","title");
document.setProperty(schemaName, filenameFieldName, title + ".odt");
session.saveDocument(document);
session.save();

Laurent

--
Laurent Godard <[EMAIL PROTECTED]> - Ingénierie OpenOffice.org - http://www.indesko.com Nuxeo Enterprise Content Management >> http://www.nuxeo.com - http://www.nuxeo.org
Livre "Programmation OpenOffice.org", Eyrolles 2004-2006
_______________________________________________
ECM mailing list
[email protected]
http://lists.nuxeo.com/mailman/listinfo/ecm

Reply via email to