Manual Pdf_forms Contao Nc Attachment Bundle
User Manual:
Open the PDF directly: View PDF
Page Count: 10
- Manual for Contao extension "contao-pdf-nc-attachment-bundle"
- 2. Installation
- 3. Enhanced standard email gateway
- 4. Definition of positions in the PDF
- 5. PDF as email attachment
- 6. Directory protection, protected PDF
- 7. For programmers and developers
- This section is intended for programmers who want to take in your own modules influence on these extensions. In the program sequence you can inject at different locations by means of a HOOK-registration. The extension contao-pdf-nc-attachment-bundle then calls the registered hooks, provided there are any.
- The following hooks are available:
- $GLOBALS['TL_HOOKS']['pdfnc_BeforePdf'] Called after the data preparation before the PDF is created. Here you can add items in the passed array $arrPDF or modified existing ones. The hook should return the $arrPDF as return value.
- Example:
- // config.php
- $GLOBALS['TL_HOOKS']['pdfnc_BeforePdf'][] = array('vendorMyExtensionMyClass', 'myPdfNcBeforePdf');
- // MyClass.php
- namespace vendorMyExtension;
- public function myPdfNcBeforePdf( $arrPDF, $this )
- {
- // beliebiger Code
- return $arrPDF;
- }
- $GLOBALS['TL_HOOKS']['pdfnc_Positions'] Called when creating a PDF for each position item on the form. It is possible to manipulate data. The page number can not be changed, otherwise the output will not work correctly. The return value is the modified array $arrItem.
- Example:
- // config.php
- $GLOBALS['TL_HOOKS']['pdfnc_Positions'][] = array('vendorMyExtensionMyClass', 'myPdfNcPositions');
- // MyClass.php
- namespace vendorMyExtension;
- public function myPdfNcPositions( $arrItem )
- {
- // beliebiger Code
- return $arrItem;
- }
- $GLOBALS['TL_HOOKS']['pdfnc_AfterPdf'] Called after the generation, storage and shipping. You can add more final activities by this Hook. The hook has no return value.
- Example:
- // config.php
- $GLOBALS['TL_HOOKS']['pdfnc_AfterPdf'][] = array('vendorMyExtensionMyClass', 'myPdfNcAfterPdf');
- // MyClass.php
- namespace vendorMyExtension;
- public function myPdfNcAfterPdf( $pdfdatei, $arrPDF, $this )
- {
- // beliebiger Code
- }
- 8. Troubleshooting
- 8. Tips and hints