Skip to content
Snippets Groups Projects
Commit b0ccef5a authored by Anton Georgiev's avatar Anton Georgiev
Browse files

Added config pngImagesRequired. If true, the slides will be converted to png...

Added config pngImagesRequired. If true, the slides will be converted to png for HTML5 client. False by default.
parent d9c13564
No related branches found
No related tags found
No related merge requests found
......@@ -68,6 +68,11 @@ maxNumPages=200
# Maximum swf file size for load to the client (default 500000).
MAX_SWF_FILE_SIZE=500000
#----------------------------------------------------
# Additional conversion of the presentation slides to PNG
# to be used in the HTML5 client
pngImagesRequired=false
# Default number of digits for voice conference users joining through the PSTN.
defaultNumDigitsForTelVoice=5
......
......@@ -96,6 +96,7 @@ with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
<property name="maxSwfFileSize" value="${MAX_SWF_FILE_SIZE}"/>
<property name="maxConversionTime" value="${maxConversionTime}"/>
<property name="swfSlidesGenerationProgressNotifier" ref="swfSlidesGenerationProgressNotifier"/>
<property name="pngImagesRequired" value="${pngImagesRequired}"/>
</bean>
<bean id="imageToSwfSlidesGenerationService" class="org.bigbluebutton.presentation.imp.ImageToSwfSlidesGenerationService">
......
/**
* BigBlueButton open source conferencing system - http://www.bigbluebutton.org/
*
* Copyright (c) 2012 BigBlueButton Inc. and by respective authors (see below).
* Copyright (c) 2015 BigBlueButton Inc. and by respective authors (see below).
*
* This program is free software; you can redistribute it and/or modify it under the
* terms of the GNU Lesser General Public License as published by the Free Software
......@@ -59,6 +59,7 @@ public class PdfToSwfSlidesGenerationService {
private long MAX_CONVERSION_TIME = 5*60*1000;
private String BLANK_SLIDE;
private int MAX_SWF_FILE_SIZE;
private boolean pngImagesRequired;
public void generateSlides(UploadedPresentation pres) {
log.debug("Generating slides");
......@@ -66,9 +67,14 @@ public class PdfToSwfSlidesGenerationService {
log.info("Determined number of pages. MeetingId=[" + pres.getMeetingId() + "], presId=[" + pres.getId() + "], name=[" + pres.getName() + "], numPages=[" + pres.getNumberOfPages() + "]");
if (pres.getNumberOfPages() > 0) {
convertPdfToSwf(pres);
createPngImages(pres);
createTextFiles(pres);
createThumbnails(pres);
// only create PNG images if the configuration requires it
if (pngImagesRequired) {
createPngImages(pres);
}
notifier.sendConversionCompletedMessage(pres);
}
}
......@@ -207,6 +213,10 @@ public class PdfToSwfSlidesGenerationService {
public void setMaxSwfFileSize(int size) {
this.MAX_SWF_FILE_SIZE = size;
}
public void setPngImagesRequired(boolean png) {
this.pngImagesRequired = png;
}
public void setThumbnailCreator(ThumbnailCreator thumbnailCreator) {
this.thumbnailCreator = thumbnailCreator;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment