Sample Test Document

Note: This is a test HTML file for the html-pdf-chrome library. It demonstrates various HTML and CSS features that should render correctly in PDF format.

About This Library

The html-pdf-chrome library is a modern replacement for the deprecated node-html-pdf package. It uses Puppeteer and headless Chrome instead of PhantomJS, providing better support for modern web standards.

Key Features

Sample Data Table

Feature node-html-pdf html-pdf-chrome
Engine PhantomJS (deprecated) Puppeteer/Chrome
CSS3 Support Limited Full
Modern Web APIs No Yes
Active Maintenance No Yes

Usage Example

const pdf = require('html-pdf-chrome');
const html = fs.readFileSync('./test.html', 'utf8');

pdf.create(html, { format: 'Letter' })
  .toFile('./output.pdf', (err, res) => {
    console.log('PDF created:', res.filename);
  });