Overview
OpenAVM Kit can generate comprehensive PDF reports for your valuation analyses, ratio studies, and equity assessments. This feature useswkhtmltopdf, a command-line tool that converts HTML to PDF with high-quality rendering.
PDF generation is optional. If you don’t install
wkhtmltopdf, you can still generate HTML and Markdown reports. The rest of OpenAVM Kit will work normally.Why PDF Reports?
PDF reports offer several advantages:- Professional presentation - Share polished reports with stakeholders
- Archival format - Long-term storage with consistent rendering
- Print-ready - Generate reports suitable for printing
- Self-contained - All content embedded in a single file
- Universal compatibility - Opens on any device without special software
Prerequisites
OpenAVM Kit uses two components for PDF generation:- pdfkit - Python wrapper (installed automatically with OpenAVM Kit)
- wkhtmltopdf - System command-line tool (requires manual installation)
Installation
Windows
Download Installer
Visit the wkhtmltopdf downloads page and download the Windows installer (
.exe file).Choose the appropriate version:- 64-bit for most modern systems
- 32-bit for older systems
Run Installer
Run the downloaded installer and follow the installation wizard.Important: Pay attention to the installation directory. Common locations:
C:\Program Files\wkhtmltopdf\C:\Program Files (x86)\wkhtmltopdf\
Add to PATH
Add the
wkhtmltopdf\bin directory to your system PATH:- Open System Properties (Right-click “This PC” → Properties)
- Click Advanced system settings
- Click Environment Variables
- Under “System variables”, find and select Path
- Click Edit
- Click New
- Add the path to the
binfolder (e.g.,C:\Program Files\wkhtmltopdf\bin) - Click OK on all dialogs
macOS
Install Homebrew (if needed)
If you don’t have Homebrew installed, get it from brew.sh or run:
Install wkhtmltopdf
Use Homebrew to install wkhtmltopdf:This will download, compile, and install wkhtmltopdf along with all dependencies.
Linux (Debian/Ubuntu)
Install wkhtmltopdf
Install wkhtmltopdf and dependencies:This will install wkhtmltopdf along with required system libraries like X11 for rendering.
Linux (Other Distributions)
Red Hat/CentOS/Fedora
Red Hat/CentOS/Fedora
Arch Linux
Arch Linux
From Source
From Source
If your distribution doesn’t have wkhtmltopdf in repositories:
- Visit wkhtmltopdf downloads
- Download the appropriate package for your distribution
- Install using your package manager
.deb package:Configuration
Enable PDF Reports
Configure report formats in yoursettings.json:
List of output formats for generated reportsOptions:
"pdf"- PDF format (requires wkhtmltopdf)"html"- HTML format (always available)"md"- Markdown format (always available)
Generate Reports in Code
Report Types
OpenAVM Kit can generate several types of reports:Ratio Study
Assessment ratio analysis with COD, PRD, and other statistics
Horizontal Equity
Analysis of assessment uniformity across property types
Sales Scrutiny
Detailed examination of sales data and outliers
Model Performance
Model accuracy metrics and feature importance
Troubleshooting
Command Not Found
Error:OSError: wkhtmltopdf command not found
Solutions:
Windows
Windows
- Verify wkhtmltopdf is installed in Program Files
- Check that the
bindirectory is in your PATH - Open a new Command Prompt (PATH changes don’t affect existing terminals)
- Run
wkhtmltopdf --versionto confirm
macOS/Linux
macOS/Linux
- Check if wkhtmltopdf is installed:
which wkhtmltopdf - If not found, install using your package manager
- Verify installation:
wkhtmltopdf --version - If installed but not found, check your PATH:
echo $PATH
PDF Generation Failed
Error:Failed to generate PDF report. Is wkhtmltopdf installed?
Solutions:
-
Verify wkhtmltopdf works directly:
-
Test basic PDF generation:
-
Check Python can find it:
- Look for detailed error messages in the Python traceback
Display/X11 Errors (Linux)
Error:QXcbConnection: Could not connect to display
Solution: wkhtmltopdf requires X11 even for headless operation. Install xvfb:
--use-xserver flag in your configuration.
Permission Errors
Error:Permission denied when generating PDFs
Solutions:
- Check output directory permissions
- Ensure your user has write access to the output folder
- On Linux/macOS, verify file ownership:
Advanced Configuration
Custom PDF Options
You can customize PDF generation by configuring wkhtmltopdf options:Common Options
Page size:
Letter, A4, Legal, etc.Top margin (units: in, cm, mm)
Right margin
Bottom margin
Left margin
Page orientation:
Portrait or LandscapeAllow access to local files (needed for images, CSS)
Best Practices
Fallback Options
If you cannot install wkhtmltopdf, you have alternatives:Use HTML Reports
HTML reports can be:- Viewed in any web browser
- Printed to PDF using the browser’s print function
- Shared via web hosting
- Converted to PDF using online tools
Use Markdown Reports
Markdown reports can be:- Converted to PDF using pandoc, grip, or other tools
- Viewed with any text editor or Markdown viewer
- Version controlled easily
- Converted to other formats (Word, HTML, etc.)
Convert HTML to PDF Manually
Open the HTML report in a browser and use Print → Save as PDF:- Open
out/report.htmlin Chrome, Firefox, or Safari - Press Ctrl+P (Cmd+P on Mac)
- Select “Save as PDF” as the destination
- Adjust margins and options
- Click Save
Next Steps
Settings Configuration
Configure report formats and options
Analysis Guide
Learn about ratio studies and equity analysis
Cloud Storage
Share reports via cloud storage
Getting Started
Return to the getting started guide