Added config option for standard font size in PDF.

This commit is contained in:
Emanuel Schütze 2017-07-27 14:20:57 +02:00
parent 7f20a7d358
commit d57d3efcf4
4 changed files with 21 additions and 5 deletions

View File

@ -61,7 +61,8 @@ Core:
(e. g. a list of speakers of a motion) [#3301].
- Select the projector resolution with a slider and an aspect ratio [#3311].
- Delay the 'could not load projector' error 3 seconds to not irritate users
with a slow internet connection [#3323]
with a slow internet connection [#3323].
- Added config value for standard font size in PDF [#3332].
Mediafiles:
- Fixed reloading of PDF on page change [#3274].

View File

@ -121,7 +121,7 @@ def get_config_variables():
name='general_export_pdf_pagenumber_alignment',
default_value='center',
input_type='choice',
label='Pagenumber alignment in PDF',
label='Page number alignment in PDF',
choices=(
{'value': 'left', 'display_name': 'Left'},
{'value': 'center', 'display_name': 'Center'},
@ -130,6 +130,19 @@ def get_config_variables():
group='General',
subgroup='Export')
yield ConfigVariable(
name='general_export_pdf_fontsize',
default_value='10',
input_type='choice',
label='Standard font size in PDF',
choices=(
{'value': '10', 'display_name': '10'},
{'value': '11', 'display_name': '11'},
{'value': '12', 'display_name': '12'}),
weight=148,
group='General',
subgroup='Export')
# Projector
yield ConfigVariable(

View File

@ -224,12 +224,13 @@ angular.module('OpenSlidesApp.core.pdf', [])
// Generates the document(definition) for pdfMake
var getDocument = function(noFooter) {
var content = contentProvider.getContent();
var standardFontsize = Config.get('general_export_pdf_fontsize').value;
return {
pageSize: 'A4',
pageMargins: [75, 90, 75, 75],
defaultStyle: {
font: 'PdfFont',
fontSize: 10
fontSize: standardFontsize
},
header: getHeader(),
footerTpl: noFooter ? '' : getFooter(),
@ -246,7 +247,7 @@ angular.module('OpenSlidesApp.core.pdf', [])
color: 'grey'
},
preamble: {
fontSize: 10,
fontSize: standardFontsize,
margin: [0,0,0,10],
},
userDataTitle: {

View File

@ -1883,10 +1883,11 @@ angular.module('OpenSlidesApp.core.site', [
gettext('Allow access for anonymous guest users');
gettext('Show this text on the login page');
gettext('Separator used for all csv exports and examples');
gettext('Pagenumber alignment in PDF');
gettext('Page number alignment in PDF');
gettext('Left');
gettext('Center');
gettext('Right');
gettext('Standard font size in PDF');
gettext('Show logo on projector');
gettext('You can replace the logo by uploading an image and set it as ' +
'the "Projector logo" in "files".');