Add configuration setting to allow set PDF orientation when exporting documents - refs BT#12783

pull/2487/head
Angel Fernando Quiroz Campos 8 years ago
parent 5f88378b95
commit 4bb41f43b5
  1. 11
      main/document/document.php
  2. 2
      main/install/configuration.dist.php

@ -376,11 +376,18 @@ switch ($action) {
|| $isAllowedToEdit
|| api_is_platform_admin()
) {
$orientation = 'landscape';
$documentOrientation = api_get_configuration_value('document_pdf_orientation');
$orientation = in_array($documentOrientation, ['landscape', 'portrait'])
? $documentOrientation
: 'landscape';
$showHeaderAndFooter = true;
if ($is_certificate_mode) {
$orientation = api_get_configuration_value('certificate_pdf_orientation');
$certificateOrientation = api_get_configuration_value('certificate_pdf_orientation');
$orientation = in_array($certificateOrientation, ['landscape', 'portrait'])
? $certificateOrientation
: 'landscape';
$showHeaderAndFooter = !api_get_configuration_value('hide_header_footer_in_certificate');
}

@ -379,3 +379,5 @@ $_configuration['agenda_legend'] = [
//$_configuration['allow_edit_tool_visibility_in_session'] = false;
// Enable the support to ODF files
//$_configuration['enabled_support_odf'] = true;
// Pdf orientation when exporting documents
// $_configuration['document_pdf_orientation'] = 'landscape'; // It can be 'portrait' or 'landscape'

Loading…
Cancel
Save