In this project, there are HTML templates source for PDF generator.
This source is connected to PHP backend using Mustache template engine a dynamic pages.
graph
gen[generate PDF request] --> be[Backend]
subgraph PDF generator
be --> |collect user data, html source `this project`| engine[Mustache Engine]
engine --> |PDF generate| file[PDF file]
end
-
cash.html cash form
-
margin.html margin form
Variables value will be assigned by backend Musache template engine.
<input type="checkbox" id="No3" class="{{account_info.structured_product_experience_id_no_checkbox_class}}" />
if the checkbox is checked, the class will be assigned value as checkbox-checked
, see below example:
<input type="checkbox" id="No3" class="checkbox-checked" />
if the checkbox is not checked, the class will be assigned value _not_checked
as below example
<input type="checkbox" id="No3" class="_not_checked" />
Similarly, form fields usage is as below
<strong> {{account_info.firstname_zh}} {{account_info.lastname_zh}}</strong>
variable will be assigned
<strong> John Deo</strong>
common style should be centrailse to style.css
, or inline for simple style
IMOPRTANT
only css/style.css
and specific html files are configured as extenal source, adding else files will break the program.