| 1 | <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> |
| 2 | <html lang="en"> |
| 3 | <head> |
| 4 | <meta content="text/html; charset=ISO-8859-15" |
| 5 | http-equiv="content-type"> |
| 6 | <title>PDF editor</title> |
| 7 | <link rel="stylesheet" type="text/css" href="style/layout.css"> |
| 8 | <link rel="shortcut icon" type="image/x-icon" href="images/favicon.ico"> |
| 9 | </head> |
| 10 | <body> |
| 11 | <h1 style="text-align: center;">PDF editor<br> |
| 12 | </h1> |
| 13 | <div style="text-align: center;"><br> |
| 14 | <img alt="" src="images/lam_pdfEditor.png" |
| 15 | style="width: 443px; height: 162px;"><br> |
| 16 | </div> |
| 17 | <div style="text-align: center;"><br> |
| 18 | <br> |
| 19 | <div style="text-align: left;">The <span style="font-style: italic;">PDF |
| 20 | editor</span> allows the user to create templates for the PDF output.<br> |
| 21 | These templates are saved as files in <span style="font-weight: bold;">config/pdf</span>.<br> |
| 22 | <br> |
| 23 | <h2>Pdfmain.php<br> |
| 24 | </h2> |
| 25 | This is the start page of the <span style="font-style: italic;">PDF |
| 26 | editor</span>. The user can select to add/modify/remove selected PDF |
| 27 | profiles.<br> |
| 28 | <br> |
| 29 | The list of existing PDF profiles is returned by <span |
| 30 | style="font-weight: bold;">getPDFStructureDefinitions()</span> in <span |
| 31 | style="font-style: italic;">pdfstruct.inc</span>. It includes all |
| 32 | structure names without file extensions for a given account type.<br> |
| 33 | <br> |
| 34 | Depending on the selection of the user he is forwarded to pdfpage.php |
| 35 | or pdfdelete.php.<br> |
| 36 | <br> |
| 37 | <h2>Pdfpage.php<br> |
| 38 | </h2> |
| 39 | The user can edit the PDF structures on this page.<br> |
| 40 | <br> |
| 41 | The structure is loaded with <span style="font-weight: bold;">loadPDFStructureDefinitions()</span> |
| 42 | from <span style="font-style: italic;">pdfstruct.inc</span>. If it |
| 43 | does not yet exist then the default structure is loaded.<br> |
| 44 | It is stored in <span style="font-weight: bold; font-style: italic;">$_SESSION['currentPDFStructure']</span> |
| 45 | (sections) and <span style="font-weight: bold; font-style: italic;">$_SESSION['currentPageDefinitions']</span> |
| 46 | (head line and logo).<br> |
| 47 | <br> |
| 48 | At the top of the page the head line and logo can be edited. The list |
| 49 | of available logos is retrieved with <span style="font-weight: bold;">getAvailableLogos()</span> |
| 50 | from <span style="font-style: italic;">pdfstruct.inc</span>.<br> |
| 51 | <br> |
| 52 | The sections on the left side are displayed like they are defined in <span |
| 53 | style="font-weight: bold; font-style: italic;">$_SESSION['currentPDFStructure']</span>. |
| 54 | Each item has links to move or delete it. Section titles may be changed.<br> |
| 55 | <br> |
| 56 | The list of available PDF entries on the right side is retrieved from <span |
| 57 | style="font-weight: bold;">getAvailablePDFFields()</span> in <span |
| 58 | style="font-style: italic;">modules.inc</span>.<br> |
| 59 | <br> |
| 60 | Near the bottom there the user can add a new section. The list of |
| 61 | available PDF entries is retrieved as above.<br> |
| 62 | <br> |
| 63 | When the user pushes one of the buttons or clicks on a link then there |
| 64 | are several actions:<br> |
| 65 | <ul> |
| 66 | <li><span style="font-weight: bold;">Abort button:</span> The user is |
| 67 | redirected back to <span style="font-style: italic;">pdfmain.php</span>.<br> |
| 68 | </li> |
| 69 | <li><span style="font-weight: bold;">Save button:</span> The |
| 70 | structure name is checked for correctness and the file is saved with <span |
| 71 | style="font-weight: bold;">savePDFStructureDefinitions()</span> |
| 72 | from <span style="font-style: italic;">pdfstruct.inc</span><span |
| 73 | style="font-weight: bold;">.</span></li> |
| 74 | <li><span style="font-weight: bold;">Add section button:</span> LAM |
| 75 | adds a static text or section to the structure.</li> |
| 76 | <li><span style="font-weight: bold;">Add entry button:</span> Adds a |
| 77 | new entry to the selected section.</li> |
| 78 | <li><span style="font-weight: bold;">Change name button:</span> |
| 79 | Changes the name of the section title or the section attribute.</li> |
| 80 | <li><span style="font-weight: bold;">Remove entry link:</span> If the |
| 81 | entry is a section then all parts of this section are removed. |
| 82 | Otherwise a single entry is removed.</li> |
| 83 | <li><span style="font-weight: bold;">Move up/down links:</span> The |
| 84 | entry or section is moved up or down.</li> |
| 85 | </ul> |
| 86 | <br> |
| 87 | <span style="font-weight: bold; font-style: italic;">$_SESSION['currentPDFStructure']</span> |
| 88 | is an array that contains all XML tags of the PDF structure. If you |
| 89 | want to modify the structure always remember to put the opening and |
| 90 | closing tags at the right place.<br> |
| 91 | <br> |
| 92 | <h2>Pdfdelete.php</h2> |
| 93 | When the user selected to delete a structure in <span |
| 94 | style="font-style: italic;">pdfmain.php</span> he is redirected to |
| 95 | this page.<br> |
| 96 | <br> |
| 97 | LAM will ask once again if the user is sure to delete the structure. If |
| 98 | this is the case the structure will be deleted with <span |
| 99 | style="font-weight: bold;">deletePDFStructureDefinition()</span> from <span |
| 100 | style="font-style: italic;">pdfstruct.inc</span>.<br> |
| 101 | <br> |
| 102 | <br> |
| 103 | <br> |
| 104 | <br> |
| 105 | </div> |
| 106 | </div> |
| 107 | </body> |
| 108 | </html> |