added folding marks for PDF
This commit is contained in:
parent
d637578186
commit
3cbbdfe7f6
|
@ -4,7 +4,7 @@ $Id$
|
||||||
|
|
||||||
This code is part of LDAP Account Manager (http://www.ldap-account-manager.org/)
|
This code is part of LDAP Account Manager (http://www.ldap-account-manager.org/)
|
||||||
Copyright (C) 2003 - 2006 Michael Duergner
|
Copyright (C) 2003 - 2006 Michael Duergner
|
||||||
2007 - 2012 Roland Gruber
|
2007 - 2013 Roland Gruber
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or modify
|
This program is free software; you can redistribute it and/or modify
|
||||||
it under the terms of the GNU General Public License as published by
|
it under the terms of the GNU General Public License as published by
|
||||||
|
@ -104,6 +104,14 @@ class lamPDF extends UFPDF {
|
||||||
$this->Line(10,38,200,38);
|
$this->Line(10,38,200,38);
|
||||||
$this->Line(10,40,200,40);
|
$this->Line(10,40,200,40);
|
||||||
$this->SetY(50);
|
$this->SetY(50);
|
||||||
|
//set folding marks
|
||||||
|
if (isset($this->page_definitions['foldingmarks']) && ($this->page_definitions['foldingmarks'] == 'standard')) {
|
||||||
|
$this->SetLineWidth(0.2);
|
||||||
|
$foldingMarks = array(97, 202);
|
||||||
|
foreach ($foldingMarks as $mark) {
|
||||||
|
$this->Line(0, $mark, 5, $mark);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -4,7 +4,7 @@ $Id$
|
||||||
|
|
||||||
This code is part of LDAP Account Manager (http://www.ldap-account-manager.org/)
|
This code is part of LDAP Account Manager (http://www.ldap-account-manager.org/)
|
||||||
Copyright (C) 2003 - 2006 Michael Duergner
|
Copyright (C) 2003 - 2006 Michael Duergner
|
||||||
2007 - 2012 Roland Gruber
|
2007 - 2013 Roland Gruber
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or modify
|
This program is free software; you can redistribute it and/or modify
|
||||||
it under the terms of the GNU General Public License as published by
|
it under the terms of the GNU General Public License as published by
|
||||||
|
@ -88,6 +88,9 @@ if ((isset($_GET['headline'])) && ($_GET['logoFile'] != $_SESSION['currentPageDe
|
||||||
if ((isset($_GET['headline'])) && ($_GET['headline'] != $_SESSION['currentPageDefinitions']['headline'])) {
|
if ((isset($_GET['headline'])) && ($_GET['headline'] != $_SESSION['currentPageDefinitions']['headline'])) {
|
||||||
$_SESSION['currentPageDefinitions']['headline'] = str_replace('<','',str_replace('>','',$_GET['headline']));
|
$_SESSION['currentPageDefinitions']['headline'] = str_replace('<','',str_replace('>','',$_GET['headline']));
|
||||||
}
|
}
|
||||||
|
if ((isset($_GET['foldingmarks'])) && ($_GET['foldingmarks'] != $_SESSION['currentPageDefinitions']['foldingmarks'])) {
|
||||||
|
$_SESSION['currentPageDefinitions']['foldingmarks'] = $_GET['foldingmarks'];
|
||||||
|
}
|
||||||
|
|
||||||
// Check if pdfname is valid, then save current structure to file and go to
|
// Check if pdfname is valid, then save current structure to file and go to
|
||||||
// main pdf structure page
|
// main pdf structure page
|
||||||
|
@ -453,13 +456,21 @@ $mainContent->addElement(new htmlTableExtendedInputField(_('Headline'), 'headlin
|
||||||
$logoSelect = new htmlTableExtendedSelect('logoFile', $logos, $selectedLogo, _('Logo'));
|
$logoSelect = new htmlTableExtendedSelect('logoFile', $logos, $selectedLogo, _('Logo'));
|
||||||
$logoSelect->setHasDescriptiveElements(true);
|
$logoSelect->setHasDescriptiveElements(true);
|
||||||
$mainContent->addElement($logoSelect, true);
|
$mainContent->addElement($logoSelect, true);
|
||||||
|
$foldingMarks = 'no';
|
||||||
|
if (isset($_SESSION['currentPageDefinitions']['foldingmarks'])) {
|
||||||
|
$foldingMarks = $_SESSION['currentPageDefinitions']['foldingmarks'];
|
||||||
|
}
|
||||||
|
$possibleFoldingMarks = array(_('No') => 'no', _('Yes') => 'standard');
|
||||||
|
$foldingMarksSelect = new htmlTableExtendedSelect('foldingmarks', $possibleFoldingMarks, array($foldingMarks), _('Folding marks'));
|
||||||
|
$foldingMarksSelect->setHasDescriptiveElements(true);
|
||||||
|
$mainContent->addElement($foldingMarksSelect, true);
|
||||||
$mainContent->addElement(new htmlSpacer(null, '30px'), true);
|
$mainContent->addElement(new htmlSpacer(null, '30px'), true);
|
||||||
// PDF structure
|
// PDF structure
|
||||||
// print every entry in the current structure
|
// print every entry in the current structure
|
||||||
$structureContent = new htmlTable();
|
$structureContent = new htmlTable();
|
||||||
foreach($_SESSION['currentPDFStructure'] as $key => $entry) {
|
foreach($_SESSION['currentPDFStructure'] as $key => $entry) {
|
||||||
// create the up/down/remove links
|
// create the up/down/remove links
|
||||||
$linkBase = 'pdfpage.php?type=' . $_GET['type'] . '&pdfname=' . $structureName . '&headline=' . $headline . '&logoFile=' . $selectedLogo[0];
|
$linkBase = 'pdfpage.php?type=' . $_GET['type'] . '&pdfname=' . $structureName . '&headline=' . $headline . '&logoFile=' . $selectedLogo[0] . '&foldingmarks=' . $foldingMarks;
|
||||||
$linkUp = new htmlLink(null, $linkBase . '&up=' . $key, '../../graphics/up.gif');
|
$linkUp = new htmlLink(null, $linkBase . '&up=' . $key, '../../graphics/up.gif');
|
||||||
$linkUp->setTitle(_("Up"));
|
$linkUp->setTitle(_("Up"));
|
||||||
$linkDown = new htmlLink(null, $linkBase . '&down=' . $key, '../../graphics/down.gif');
|
$linkDown = new htmlLink(null, $linkBase . '&down=' . $key, '../../graphics/down.gif');
|
||||||
|
|
Loading…
Reference in New Issue