
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
@hyperdrive.bot/html-to-pdf
Advanced tools
Smart HTML-to-PDF converter with intelligent height detection for single-page output
Smart HTML-to-PDF converter that automatically chooses the best method based on content height to ensure single-page output with optimal quality.
cd packages/cli/html-to-pdf
npm install
# Convert HTML to PDF
node index.js input.html output.pdf
# With verbose logging
node index.js proposal.html proposal.pdf --verbose
# Custom browser width for responsive layouts
node index.js document.html output.pdf --width=1920
# Mobile responsive view
node index.js responsive.html mobile.pdf --width=375
# Tablet view
node index.js responsive.html tablet.pdf --width=768
# Desktop high-res view
node index.js report.html desktop.pdf --width=1920 --verbose
# Convert from URL
node index.js https://example.com/proposal.html remote.pdf
# Show help
npm run test:help
# Development mode (with verbose logging)
npm run dev input.html output.pdf
Typical conversion times:
Output quality:
node index.js <input.html> <output.pdf> [options]
input.html - Path to HTML file or URL (required)output.pdf - Output PDF path (required)--width=<pixels> - Browser width (default: 1366, range: 300-4000)--verbose - Show detailed conversion logs--help, -h - Show help informationnode index.js proposal.html client-proposal.pdf --width=1366
node index.js financial-report.html quarterly-report.pdf --verbose
node index.js api-docs.html documentation.pdf --width=1200
node index.js landing-page.html brochure.pdf --width=1920
"Input file not found"
"Conversion failed: Timeout"
--verbose to see where it fails"Width must be between 300 and 4000"
<!-- ✅ Good: Self-hosted fonts -->
<link rel="stylesheet" href="./fonts/custom-font.css">
<!-- ✅ Good: Optimized images -->
<img src="./images/logo-optimized.png" alt="Logo">
<!-- ❌ Avoid: Heavy external resources -->
<script src="https://heavy-analytics.com/tracker.js"></script>
/* ✅ Good: Print-specific styles */
@media print {
body { -webkit-print-color-adjust: exact; }
.no-print { display: none; }
}
/* ✅ Good: Fixed dimensions */
.container { max-width: 1200px; margin: 0 auto; }
✅ Client Proposals: Generated professional PDFs for 50+ client proposals
✅ Financial Reports: Converted complex multi-section reports seamlessly
✅ Marketing Materials: Created pixel-perfect brochures from responsive designs
✅ Technical Documentation: Handled long-form documentation with embedded media
# Add to package.json scripts
"scripts": {
"build:pdf": "node ../cli/html-to-pdf/index.js dist/index.html output.pdf"
}
- name: Generate PDF
run: |
cd packages/cli/html-to-pdf
npm install
node index.js ../../web/dist/proposal.html ../../../artifacts/proposal.pdf
DevSquad CLI Tools | Part of the DevSquad development ecosystem
FAQs
Smart HTML-to-PDF converter with intelligent height detection for single-page output
We found that @hyperdrive.bot/html-to-pdf demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.