formletter.php - how does it produce the PDF file?

Hey all,

Quick question – how exactly does the formLetter class produce the PDF? I’ve called it in to my view.detail.php and it’s producing the PDF just fine, I’m just trying to figure out what the mechanics are that connect the DVPopupHTML function to actually generating the PDF?

I see this function produces a form with id=“popupForm”, which submits after clicking on the template link, but the action on the form is “index.php?entryPoint=formLetter” which would seem to indicate that it’s posting to back to this file – so I’m a bit confused as to how this ties into the generatePDF.php file (which I believe is actually producing the PDF).

Any information to help explain the PDF creation process would be much appreciated :slight_smile:

P.S. This is the best CRM software I’ve worked with and look forward to contributing (financially) to this project once I get everything up and working – keep up the awesome work!


I may be wrong, but as far as I know, it works like so:

formletter.php has sections of code that contain:
That fire when a template is selected.

When a Template is selected, This entry point is checked against the file entry_point_registry.php.

As it is a valid entrypoint, relevant information (i.e: Template ID & Current Module) is passed along to modules/AOS_PDF_TEMPLATES/formLetterPdf.php

This file is the one that does all of the PDF Generation/Formatting/Parsing based on the Template and Account(s) selected

Hopefully this sheds a little light on the process

1 Like