This repository contains the old source code from Sanction PDF's application. The project utilizes a combination of Node.js, EJS templates, and custom styles to generate a dynamic and visually appealing report interface.
- Responsive UI: Adaptive grid layout and modern styling for a seamless user experience.
- Dynamic Content Rendering: Data-driven rendering using EJS templates.
- Real-time Updates: Displays the current date dynamically with JavaScript.
- Organized Components:
- Email display with clickable links.
- Detailed sections for comprehensive reports, social security, addresses, relatives, and more.
index.js: Main server-side script to manage data and rendering logic.index.ejs: Template file with embedded EJS for dynamic content rendering.- Styles: Inline CSS within
index.ejsfor easy customization.
- Node.js: Backend framework for server-side operations.
- EJS: Templating engine for rendering dynamic HTML.
- HTML5/CSS3: Markup and styles for user interface.
- JavaScript: Client-side scripts for real-time updates.
-
Clone this repository:
git clone https://github.com/BarcodeBimbo/Sanction-PDF.git cd Sanction-PDF -
Install dependencies:
npm install
-
Start the server:
npm start
-
Open your browser and navigate to:
http://localhost:3000
- Dynamic Rendering: Data variables (e.g.,
data.socialSecurity,data.addresses) populate various sections of the report dynamically. - Real-Time Clock: JavaScript updates the date in the header every second.
Python Example
import requests
data = {
"emails": [
],
"driverLicense": {
"type": "",
"name": "",
"idNumber": "",
"state": "",
"issued": "",
"expires": ""
},
"socialSecurity": {
"name": "",
"ssn": "",
"ssnState": "",
"ssnYears": "",
"dob": ""
},
"addresses": [
],
"otherNumbers": [
{"phoneNumber": "", "carrier": ""},
{"phoneNumber": "", "carrier": ""}
],
"relatives": [
],
"liens": 0,
"age": 0,
"bankruptcy": 0,
"data": "MM/D/YYYY"
}
# Send the POST request to the server
response = requests.post('http://localhost:3000/create-pdf', json=data)
# Check the response status code
if response.ok:
filename = response.json()["Filename"]
print(f'PDF Was Saved As {filename}')
else:
print(f'PDF ERROR LOG - \nStatus code: {response.status_code}\nResponse: {response.text}')Edit the inline <style> section in index.ejs to modify the styles.
Extend the EJS template with additional sections or modify existing ones by referencing data variables.
This project is licensed under the MIT License. See the LICENSE file for details.

