Skip to content
Snippets Groups Projects
Commit a08a0d33 authored by Gustavo Trott's avatar Gustavo Trott
Browse files

Makes presentation svg resolution configurable, and set default to 300

parent 8cd827a3
No related branches found
No related tags found
No related merge requests found
...@@ -30,6 +30,7 @@ public class SvgImageCreatorImp implements SvgImageCreator { ...@@ -30,6 +30,7 @@ public class SvgImageCreatorImp implements SvgImageCreator {
private long imageTagThreshold; private long imageTagThreshold;
private long pathsThreshold; private long pathsThreshold;
private int convPdfToSvgTimeout = 60; private int convPdfToSvgTimeout = 60;
private int svgResolutionPpi = 300;
private String BLANK_SVG; private String BLANK_SVG;
@Override @Override
...@@ -253,7 +254,7 @@ public class SvgImageCreatorImp implements SvgImageCreator { ...@@ -253,7 +254,7 @@ public class SvgImageCreatorImp implements SvgImageCreator {
private NuProcessBuilder createConversionProcess(String format, int page, String source, String destFile, private NuProcessBuilder createConversionProcess(String format, int page, String source, String destFile,
boolean analyze) { boolean analyze) {
String rawCommand = "pdftocairo -r " + (analyze ? " 300 " : " 150 ") + format + (analyze ? "" : " -singlefile") String rawCommand = "pdftocairo -r " + this.svgResolutionPpi + " " + format + (analyze ? "" : " -singlefile")
+ " -q -f " + String.valueOf(page) + " -l " + String.valueOf(page) + " " + source + " " + destFile; + " -q -f " + String.valueOf(page) + " -l " + String.valueOf(page) + " " + source + " " + destFile;
if (analyze) { if (analyze) {
rawCommand += " && cat " + destFile; rawCommand += " && cat " + destFile;
...@@ -310,4 +311,7 @@ public class SvgImageCreatorImp implements SvgImageCreator { ...@@ -310,4 +311,7 @@ public class SvgImageCreatorImp implements SvgImageCreator {
this.convPdfToSvgTimeout = convPdfToSvgTimeout; this.convPdfToSvgTimeout = convPdfToSvgTimeout;
} }
public void setSvgResolutionPpi(int svgResolutionPpi) {
this.svgResolutionPpi = svgResolutionPpi;
}
} }
...@@ -103,6 +103,11 @@ numFileProcessorThreads=2 ...@@ -103,6 +103,11 @@ numFileProcessorThreads=2
#------------------------------------ #------------------------------------
svgConversionTimeout=60 svgConversionTimeout=60
#------------------------------------
# Presentation resolution, in PPI (will be set to generated svg)
#------------------------------------
svgPresentationResolutionPpi=300
#------------------------------------ #------------------------------------
# Timeout(secs) to wait for conversion script execution # Timeout(secs) to wait for conversion script execution
#------------------------------------ #------------------------------------
......
...@@ -87,6 +87,7 @@ with BigBlueButton; if not, see <http://www.gnu.org/licenses/>. ...@@ -87,6 +87,7 @@ with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
<property name="pathsThreshold" value="${placementsThreshold}"/> <property name="pathsThreshold" value="${placementsThreshold}"/>
<property name="blankSvg" value="${BLANK_SVG}"/> <property name="blankSvg" value="${BLANK_SVG}"/>
<property name="convPdfToSvgTimeout" value="${svgConversionTimeout}"/> <property name="convPdfToSvgTimeout" value="${svgConversionTimeout}"/>
<property name="svgResolutionPpi" value="${svgPresentationResolutionPpi}"/>
</bean> </bean>
<bean id="generatedSlidesInfoHelper" class="org.bigbluebutton.presentation.GeneratedSlidesInfoHelperImp"/> <bean id="generatedSlidesInfoHelper" class="org.bigbluebutton.presentation.GeneratedSlidesInfoHelperImp"/>
......
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