Hi,
Please note that we have a documentum content server with which are application interact and carry out document processing.
In some of the functionalities we are stamping the documents (from doucmentum) with custom properties and updating their references using aspose libraries.
Now in a peculiar case for some of our documents table of content (layout gets distorted). Request your help in adressing this issue.
For your reference am attaching the original document and document after aspose processing and also listing below the code snippet for achieving the functionality
ByteArrayInputStream inStream = docObj.getContent();
ByteArrayOutputStream outStream = new ByteArrayOutputStream();
Document doc = new Document(inStream);
DfLogger.trace(this,"Afer creating aspose document from the documentum object content",null,null);
CustomDocumentProperties props = doc.getCustomDocumentProperties();
Set propNamesSet = propMap.keySet();
Iterator iterator = propNamesSet.iterator();
while(iterator.hasNext())
{
String propName = iterator.next();
DocumentProperty docProp = props.get(propName);
if(docProp == null)
{
props.add(propName, propMap.get(propName));
continue;
}
props.get(propName).setValue(propMap.get(propName));
}
// props.get(propertyName).setValue(propertyValue);
doc.updateFields();
doc.save(outStream, formatMap.get(dosExt)[0]);
DfLogger.trace(this,"Afer saving the content and stamping the properties on the documentum object (using words)",null,null);
outStream.flush();
docObj.setContent(outStream);
// docObj.save();
inStream.close();
outStream.close();
Thanks
Tarun Sharma