Effortlessly export any HTML file and all its dependencies — CSS, JS, images to a printable, submission ready PDF, with embedded code and output. Designed especially for LPU assignment reports.
Features
HTML to PDF conversion:
Instantly turns your .html code, including all linked files, into a styled A4 PDF for coursework.
Automatic asset inclusion:
Detects and bundles local CSS and JavaScript files for a complete export—no missing styles or scripts!
Code & Output Embedding:
Highlights your HTML/CSS/JS source in the PDF and, after rendering, attaches the web page’s visual output directly inside the PDF.
Multi-page screenshot stitching:
Captures full web page output, even for long assignments, cropping and merging screenshots as needed.
Modern syntax highlighting & line numbers:
Uses Highlight.js and line numbering for crystal-clear code in your PDFs.
Assignment-specific headers and layout:
Automatically inserts LPU-style headers (assignment name, subject, etc.) to meet institutional format standards.
Error handling and status notifications:
Shows helpful messages if assets are missing or if export encounters issues.
How to Use
Open your HTML assignment in VS Code.
Run the command:
Click the “Export HTML as PDF” button
Or use: Ctrl+Shift+P → Export HTML as PDF
Preview: The extension opens a preview in your browser, merging the code, all linked files, and the rendered page output.
PDF Generation: Print/save the preview as an A4 PDF.
Output PDF includes:
Your code
All CSS/JS files used
Live visual output (in-page screenshot)
Submit: Use the PDF for your LPU assignment submission!
Example Workflow
Assignment Export Preview
First page: LPU header, assignment details
Code block, syntax highlighting, and line numbers
CSS/JS code sections for bundled assets
Screenshots of rendered output (handles single/multi-page)
Error notifications for missing files or export failures
Troubleshooting
Make sure local CSS/JS/image files are in the same directory as your HTML file, or update <link>/<script> tags to use relative paths.
If Puppeteer fails to launch, check Node.js compatibility or install missing dependencies.
For long pages, multiple screenshots are merged into your PDF automatically.