The hybrid HTML resume generation system creates professional, print-ready resumes using HTML and CSS. This approach provides:
- Perfect rendering - HTML/CSS renders consistently across browsers and PDF converters
- Easy customization - Multiple themes with simple CSS modifications
- Print-ready output - Optimized for printing and PDF conversion
- Semantic markup - Clean, accessible HTML structure
- No dependencies - Pure HTML/CSS, no external libraries needed for viewing
The hybrid system consists of three main components:
Generates semantic HTML structure from resume JSON data.
Features:
- Automatic date sorting (most recent first)
- Semantic HTML5 tags (header, section, article)
- Data attributes for programmatic access
- Support for both string and object bullet formats
- Handles technical proficiencies and areas of expertise
Key Methods:
generate_html()- Main entry point, generates complete HTML structure_generate_header_html()- Creates header with name and contact info_generate_summary_html()- Creates professional summary section_generate_skills_html()- Creates two-column skills section_generate_experience_html()- Creates experience section with bullets_generate_education_html()- Creates education and certifications section
Generates CSS stylesheets from theme configurations.
Features:
- Three built-in themes: Professional, Modern, Executive
- Responsive layout using CSS Grid and Flexbox
- Print-optimized styles (@media print)
- Consistent typography and spacing
- Professional color palettes
Themes:
- Professional - Clean, traditional corporate style (blue/gray)
- Modern - Contemporary design with subtle accents (indigo)
- Executive - Premium, executive-level presentation (black/gray)
Assembles complete HTML documents from components.
Features:
- Combines HTML structure and CSS into self-contained document
- Adds proper HTML5 doctype and meta tags
- Includes viewport settings for responsive display
- Embeds CSS inline for portability
python src/generate_hybrid_resume.py \
--input data/master_resume.json \
--output out/resume.html \
--theme professionalpython src/generate_hybrid_resume.py \
--input out/tailored_resume.json \
--output out/resume.html \
--theme modernprofessional- Clean, traditional corporate style (default)modern- Contemporary design with subtle accentsexecutive- Premium, executive-level presentation
The hybrid HTML generation is integrated into the main tailor pipeline:
# Generate HTML resume directly from job description
python src/tailor.py \
--resume data/master_resume.json \
--jd job_description.txt \
--out out/tailored_resume.html \
--format html \
--theme professionalOptions:
--format markdown- Generate Markdown (default)--format html- Generate HTML--theme professional|modern|executive- Choose HTML theme
from hybrid_resume_processor import HybridResumeProcessor
from hybrid_css_generator import HybridCSSGenerator
from hybrid_html_assembler import HybridHTMLAssembler
# Generate HTML
processor = HybridResumeProcessor('data/master_resume.json', 'professional')
html_content = processor.generate_html()
# Generate CSS
css_generator = HybridCSSGenerator('professional')
css = css_generator.generate_css()
# Assemble complete document
assembler = HybridHTMLAssembler('professional')
complete_html = assembler.assemble_html(html_content, css, 'Sidney Jones')
# Save to file
assembler.save_html(complete_html, 'out/resume.html')- Open the HTML file in your browser
- Press
Ctrl+P(Windows) orCmd+P(Mac) - Select "Save as PDF" or "Microsoft Print to PDF"
- Click Save
Advantages:
- Best quality output
- Preserves all styling
- No additional dependencies
- Works on all platforms
wkhtmltopdf out/resume.html out/resume.pdffrom playwright.sync_api import sync_playwright
with sync_playwright() as p:
browser = p.chromium.launch()
page = browser.new_page()
page.goto('file:///path/to/resume.html')
page.pdf(path='resume.pdf', format='Letter')
browser.close()src/
├── hybrid_resume_processor.py # HTML structure generator
├── hybrid_css_generator.py # CSS theme generator
├── hybrid_html_assembler.py # HTML document assembler
├── generate_hybrid_resume.py # CLI script
└── tailor.py # Main pipeline (updated)
out/
├── hybrid_resume_professional.html
├── hybrid_resume_modern.html
└── hybrid_resume_executive.html
To create a custom theme, add a new theme configuration to HybridCSSGenerator.THEMES:
'custom': {
'colors': {
'primary': '#1A237E',
'secondary': '#283593',
'accent': '#3F51B5',
'text': '#212121',
'text_light': '#757575',
'background': '#FAFAFA',
'section_bg': '#FFFFFF'
},
'typography': {
'fontFamily': 'Calibri, Arial, sans-serif',
'baseFontSize': '10pt',
'headingFontSize': '11pt',
'nameFontSize': '18pt'
}
}Experiences are automatically sorted by most recent first, with "Present" jobs at the top.
Two-column layout for skills section, responsive header with contact info.
- Proper page breaks
- Print-specific styles
- Letter size (8.5" x 11")
- 0.5" margins
- Proper heading hierarchy (h1, h2, h3)
- Data attributes for programmatic access
- Accessible markup
- Calibri font family (ATS-friendly)
- Consistent font sizes (10pt body, 11pt headings, 18pt name)
- Proper line heights and spacing
- Consistent Rendering - HTML/CSS renders identically across all browsers
- Easy Customization - Simple CSS changes for styling
- Version Control Friendly - Text-based format works well with Git
- No Dependencies - No need for python-docx or complex libraries
- Print-Ready - Optimized for printing and PDF conversion
- Portable - Single HTML file contains everything
All existing tests pass with the hybrid HTML integration:
python -m pytest tests/ -v
# 159 passed in 4.19sThe hybrid HTML system complements the existing DOCX generation:
- DOCX - Use for ATS systems that require .docx format
- HTML - Use for printing, PDF conversion, and visual presentation
Both formats are generated from the same JSON data, ensuring consistency.
Potential improvements:
- Additional themes (creative, technical, academic)
- SVG graphics for visual elements
- Interactive features (collapsible sections)
- Dark mode support
- Responsive mobile layout
- Export to other formats (LaTeX, PDF)
- Ensure the file is saved with UTF-8 encoding
- Check that all CSS is embedded in the
<style>tag - Verify the resume JSON has all required fields
- Use browser print for best results
- Ensure print margins are set to 0.5"
- Check that "Print backgrounds" is enabled
- Verify the theme name is correct (professional, modern, executive)
- Check that CSS is being generated correctly
- Inspect the HTML in browser developer tools
For issues or questions:
- Check the documentation in
docs/ - Review example output in
out/ - Run tests to verify installation:
python -m pytest tests/