Merge pull request #2974 from emanuelschuetze/pdf-layout

Motion PDF improvements
This commit is contained in:
Norman Jäckel 2017-02-17 13:11:15 +01:00 committed by GitHub
commit 28a5c9ecaf
4 changed files with 8 additions and 4 deletions

View File

@ -180,7 +180,7 @@ angular.module('OpenSlidesApp.core.pdf', [])
var content = contentProvider.getContent(); var content = contentProvider.getContent();
return { return {
pageSize: 'A4', pageSize: 'A4',
pageMargins: [75, 90, 75, 100], pageMargins: [75, 90, 75, 75],
defaultStyle: { defaultStyle: {
font: 'PdfFont', font: 'PdfFont',
fontSize: 10 fontSize: 10
@ -645,6 +645,7 @@ angular.module('OpenSlidesApp.core.pdf', [])
case "li": case "li":
case "div": case "div":
currentParagraph = create("text"); currentParagraph = create("text");
currentParagraph.lineHeight = 1.25;
var stackDiv = create("stack"); var stackDiv = create("stack");
stackDiv.stack.push(currentParagraph); stackDiv.stack.push(currentParagraph);
ComputeStyle(stackDiv, styles); ComputeStyle(stackDiv, styles);
@ -708,7 +709,8 @@ angular.module('OpenSlidesApp.core.pdf', [])
text: line, text: line,
color: "gray", color: "gray",
fontSize: 8, fontSize: 8,
margin: [0, 2.35, 0, 0] lineHeight: 1.25,
margin: [0, 2.85, 0, 0]
}); });
}); });
listCol.columns.push(list); listCol.columns.push(list);

View File

@ -1598,6 +1598,7 @@ angular.module('OpenSlidesApp.core.site', [
gettext('[Space for your welcome text.]'); gettext('[Space for your welcome text.]');
gettext('Allow access for anonymous guest users'); gettext('Allow access for anonymous guest users');
gettext('Show this text on the login page.'); gettext('Show this text on the login page.');
gettext('The separator used for the csv export and examples.');
gettext('Show logo on projector'); gettext('Show logo on projector');
gettext('You can replace the logo. Just copy a file to ' + gettext('You can replace the logo. Just copy a file to ' +
'"static/img/logo-projector.png" in your OpenSlides data ' + '"static/img/logo-projector.png" in your OpenSlides data ' +

View File

@ -71,7 +71,7 @@ def get_config_variables():
yield ConfigVariable( yield ConfigVariable(
name='motions_line_length', name='motions_line_length',
default_value=80, default_value=90,
input_type='integer', input_type='integer',
label='Line length', label='Line length',
help_text='The maximum number of characters per line. Relevant when line numbering is enabled. Min: 40', help_text='The maximum number of characters per line. Relevant when line numbering is enabled. Min: 40',

View File

@ -34,7 +34,8 @@ angular.module('OpenSlidesApp.motions.motionservices', ['OpenSlidesApp.motions',
var converter = PdfMakeConverter.createInstance(data.images); var converter = PdfMakeConverter.createInstance(data.images);
var motionContentProvider = MotionContentProvider.createInstance(converter, $scope.motion, $scope, User, $http); var motionContentProvider = MotionContentProvider.createInstance(converter, $scope.motion, $scope, User, $http);
var documentProvider = PdfMakeDocumentProvider.createInstance(motionContentProvider); var documentProvider = PdfMakeDocumentProvider.createInstance(motionContentProvider);
var filename = gettextCatalog.getString("Motion") + "-" + $scope.motion.identifier + ".pdf"; var identifier = $scope.motion.identifier ? '-' + $scope.motion.identifier : '';
var filename = gettextCatalog.getString("Motion") + identifier + ".pdf";
PdfCreate.download(documentProvider.getDocument(), filename); PdfCreate.download(documentProvider.getDocument(), filename);
}); });
}; };