06-11-2013 11:10 AM
06-11-2013 02:08 PM
06-12-2013 12:09 PM
<webscript kind="org.alfresco.repository.content.stream">
function main(){
var nodeRef = args.noderef;
// get the node from the reference
if(nodeRef) {
var doc = search.findNode(nodeRef);
// Get the kids
for each (node in doc.getChildren()) {
if(node.name == "pdfExport") {
var pdfNode = node;
break;
}
}
// One of them must have a name cm:pdfExport or you lash it
if (pdfNode)
{
model.contentNode = pdfNode;
}
else
{
status.code = 400;
status.message = "Node " + nodeRef + " does not have a PDF rendition";
status.redirect = true;
}
} else {
status.code = 404;
status.message = "Node " + nodeRef + " does not exist";
status.redirect = true;
}
}
main();
06-13-2013 09:47 AM
Tags
Find what you came for
We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.