Merged REPO-2054 (5.2.1) to 5.2.N (5.2.1)

136982 anechifor: added profile


git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/BRANCHES/DEV/5.2.N/root@137115 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Stefan Kopf
2017-06-01 12:38:50 +00:00
parent 36d63e1b01
commit 88a0a737e5

View File

@@ -248,22 +248,24 @@ public class AlfrescoPdfRendererContentTransformerWorker extends ContentTransfor
{
commandOptions = "";
}
if (resizeOptions.getHeight() > -1)
if(resizeOptions != null)
{
commandOptions += " --height=" + resizeOptions.getHeight();
}
if (resizeOptions.getWidth() > -1)
{
commandOptions += " --width=" + resizeOptions.getHeight();
}
if (resizeOptions.getAllowEnlargement())
{
commandOptions += " --allow-enlargement";
}
if (resizeOptions.isMaintainAspectRatio())
{
commandOptions += " --maintain-aspect-ratio";
if (resizeOptions.getHeight() > -1)
{
commandOptions += " --height=" + resizeOptions.getHeight();
}
if (resizeOptions.getWidth() > -1)
{
commandOptions += " --width=" + resizeOptions.getHeight();
}
if (resizeOptions.getAllowEnlargement())
{
commandOptions += " --allow-enlargement";
}
if (resizeOptions.isMaintainAspectRatio())
{
commandOptions += " --maintain-aspect-ratio";
}
}
commandOptions += " --page=" + getSourcePageRange(imageOptions, sourceMimetype, targetMimetype);