11-18-2015 05:56 AM
11-18-2015 06:45 AM
document.transformImage("image/jpeg", "-resize 1024x768");
document.save();
https://wiki.alfresco.com/wiki/JavaScript_API_Cookbook#Create_Document_and_Transform_it
11-18-2015 07:05 AM
if (document.hasPermission("Write"))
{
if (document.mimetype == "text/plain")
{
document.content += "\r\n\r\nCopyright (C) 2006";
}
else if (document.mimetype == "text/html")
{
document.content += "<br><br><small>Copyright © 2006</small>";
}
}
11-18-2015 09:35 AM
11-18-2015 07:38 PM
11-19-2015 06:38 AM
11-19-2015 05:57 PM
11-22-2015 01:40 PM
12-10-2015 10:15 AM
var strOrigName = document.properties.name;
if (!strOrigName.startsWith('resized')){
var tmpName = "resized_" + document.properties.name;
document.properties.name = tmpName;
var rImage=document.transformImage("image/jpeg","-normalize -resize 1024x768", document.parent);
if (rImage){
document.properties.name = strOrigName;
document.save();
document.remove();
}
}
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.