0
在使用itext的java中,我創建了一個位於byte []中的合併PDf。我如何將它寫入Alfresco存儲庫?我知道這個代碼將內容寫入存儲庫,但它不接受字節[]將內容從byte []寫入Alfresco repo
在示例代碼中,mergedDocument是一個byte []。
destinationNode = createDestinationNode(fileName,
(NodeRef)params.get(PARAM_DESTINATION_FOLDER), targetNodeRef, inplace);
writer = cs.getWriter(destinationNode, ContentModel.PROP_CONTENT, true);
writer.setEncoding(targetReader.getEncoding()); // original
// encoding
writer.setMimetype(FILE_MIMETYPE);
// Put it in the repo
writer.putContent(mergedDocument);
謝謝! :)