Skip to content
/ Web2Pdf Public

A Windows command-line utility to save websites as a PDF file.

License

Notifications You must be signed in to change notification settings

mbcdev/Web2Pdf

Repository files navigation

Web2Pdf

A Windows command-line utility to save websites as a PDF file.

Description

This utility renders a given website by using the Chromium Embedded Framework (CEF) and prints the web content to a PDF file.
Optionally, a timestamp prefix can be added to the output file name which e.g. makes it easier to store multiple versions of a website.

Why not using Microsoft Edge/WebView2?
I needed to create unattended snapshots of websites by using Windows Task Scheduler, but unfortunately, WebView2 cannot run in the context of the SYSTEM user account and does not work if no user is logged on in Windows.

Getting Started

Compilation

msbuild Web2Pdf.sln

Alternatively, you can simply open the Solution File in Visual Studio and compile from there.

Usage Examples

Create PDF file from a given URL:

Web2Pdf.exe http://<URL> website.pdf
Web2Pdf.exe https://<URL> /ts C:\Folder\website.pdf

Version History

  • 0.1
    • Initial Release

License

This project is licensed under the MIT License.

About

A Windows command-line utility to save websites as a PDF file.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages