Made HTML5 client handle presentations uploaded as a single image.

This commit is contained in:
Maxim Khlobystov 2015-07-13 19:00:46 -04:00
parent ce17feef7d
commit b08f82542d

View File

@ -58,9 +58,14 @@ public class PngImageCreatorImp implements PngImageCreator {
String COMMAND = "";
boolean done = true;
if(SupportedFileTypes.isImageFile(pres.getFileType())){
dest = imagePresentationDir.getAbsolutePath() + File.separator + "slide1.png";
dest = imagePresentationDir.getAbsolutePath() + File.separator + "slide1.pdf";
COMMAND = IMAGEMAGICK_DIR + "/convert " + source + " " + dest;
done = new ExternalProcessExecutor().exec(COMMAND, 60000);
source = imagePresentationDir.getAbsolutePath() + File.separator + "slide1.pdf";
dest = imagePresentationDir.getAbsolutePath() + File.separator + "slide1.svg";
COMMAND = "pdftocairo -rx 300 -ry 300 -svg -q -f 1 -l 1 " + source + " " + dest;
done = new ExternalProcessExecutor().exec(COMMAND, 60000);
}else{
for(int i=1; i<=pres.getNumberOfPages(); i++){