From 088d2d270f593ba0983ac61ffc1d3f405e021719 Mon Sep 17 00:00:00 2001 From: Roland Gruber Date: Mon, 11 Jul 2005 20:35:07 +0000 Subject: [PATCH] added docs on PDF editor --- lam/docs/devel/index.htm | 2 +- lam/docs/devel/pdf_editor.htm | 107 ++++++++++++++++++++++++++++++++++ 2 files changed, 108 insertions(+), 1 deletion(-) create mode 100644 lam/docs/devel/pdf_editor.htm diff --git a/lam/docs/devel/index.htm b/lam/docs/devel/index.htm index 1e594701..a05a557a 100644 --- a/lam/docs/devel/index.htm +++ b/lam/docs/devel/index.htm @@ -36,7 +36,7 @@ lists
  • Samba 3 domains
  • File upload
  • OU editor
  • -
  • PDF editor
    +
  • PDF editor
  • diff --git a/lam/docs/devel/pdf_editor.htm b/lam/docs/devel/pdf_editor.htm new file mode 100644 index 00000000..85674090 --- /dev/null +++ b/lam/docs/devel/pdf_editor.htm @@ -0,0 +1,107 @@ + + + + + PDF editor + + + +

    PDF editor
    +

    +

    +
    +
    +

    +
    +
    The PDF +editor allows the user to create templates for the PDF output.
    +These templates are saved as files in config/pdf.
    +
    +

    Pdfmain.php
    +

    +This is the start page of the PDF +editor. The user can select to add/modify/remove selected PDF +profiles.
    +
    +The list of existing PDF profiles is returned by getPDFStructureDefinitions() in pdfstruct.inc. It includes all +structure names without file extensions for a given account type.
    +
    +Depending on the selection of the user he is forwarded to pdfpage.php +or pdfdelete.php.
    +
    +

    Pdfpage.php
    +

    +The user can edit the PDF structures on this page.
    +
    +The structure is loaded with loadPDFStructureDefinitions() +from pdfstruct.inc. If it +does not yet exist then the default structure is loaded.
    +It is stored in $_SESSION['currentPDFStructure'] +(sections) and $_SESSION['currentPageDefinitions'] +(head line and logo).
    +
    +At the top of the page the head line and logo can be edited. The list +of available logos is retrieved with getAvailableLogos() +from pdfstruct.inc.
    +
    +The sections on the left side are displayed like they are defined in $_SESSION['currentPDFStructure']. +Each item has links to move or delete it. Section titles may be changed.
    +
    +The list of available PDF entries on the right side is retrieved from getAvailablePDFFields() in modules.inc.
    +
    +Near the bottom there the user can add a new section. The list of +available PDF entries is retrieved as above.
    +
    +When the user pushes one of the buttons or clicks on a link then there +are several actions:
    +
      +
    • Abort button: The user is +redirected back to pdfmain.php.
      +
    • +
    • Save button: The +structure name is checked for correctness and the file is saved with savePDFStructureDefinitions() +from pdfstruct.inc.
    • +
    • Add section button: LAM +adds a static text or section to the structure.
    • +
    • Add entry button: Adds a +new entry to the selected section.
    • +
    • Change name button: +Changes the name of the section title or the section attribute.
    • +
    • Remove entry link: If the +entry is a section then all parts of this section are removed. +Otherwise a single entry is removed.
    • +
    • Move up/down links: The +entry or section is moved up or down.
    • +
    +
    +$_SESSION['currentPDFStructure'] +is an array that contains all XML tags of the PDF structure. If you +want to modify the structure always remember to put the opening and +closing tags at the right place.
    +
    +

    Pdfdelete.php

    +When the user selected to delete a structure in pdfmain.php he is redirected to +this page.
    +
    +LAM will ask once again if the user is sure to delete the structure. If +this is the case the structure will be deleted with deletePDFStructureDefinition() from pdfstruct.inc.
    +
    +
    +
    +
    +
    +
    + +