This program is converts a input CSV file of mailing addresses and generates a single PDF file with one page per address.
Response,Mailing Line 1,Mailing Line 2,City,State,Zip Code
John Smith,123 Main St,APT 10,New York City,NY,10001
Test Name,Test Line 1,Test Line 2,City Name,ST,12345
- Download & install
wkhtmltopdf. See https://wkhtmltopdf.org/ for directions. - Run
npm installinside this folder to install node dependencies
npm run convert input.csv output.pdf
- To edit paper size & CSV column fields, modify
index.js - To update design of the page, edit
style.cssfile
- Ensure printer drivers are installed on computer from factory
- Ensure printer has set correct paper size
- Selected the same paper size on the printing preferences
- To debug HTML/CSS formatting issues, open
tmp/output.htmlin a web browser - To debug
wkhtmltopdfrun program directly ontmp/output.htmlto see full output
