Bitbucket is a code hosting site with unlimited public and private repositories. We're also free for small teams!



webslides2pdf is a tool to convert web pages into pdf files.

Its behaviour can be described as follows:

Imagine you open a browser, take a screenshot, and press page-down and take another screenshot, and so on. You them grab all screenshots and generate a pdf where each one is a single page. That's what this application does for you.

I did this to be able generate pdf files from web based presentations. However there are some downsides:

  • The pdf will not be perfect, it wont have ToC or other accessibility features
  • Some web pages react badly to certain page dimensions you can try using the size parameter (see bellow)
  • While the result is a pdf, these wont be high quality vector drawings - they are bitmaps embedded in a pdf


Just call

$ ./webslides2pdf <location> <num_pages>

Where locations is either a local file path or URL of a presentation, and num_pages is the number of slides.

There is an optional third argument, to specify the size in pixels of the slides. For example, this command

$ ./webslides2pdf file.html 10 1920x1080

would generate a pdf with 10 pages and size 1920x1080 pixels from the file.html file.


The only requirement is Qt along with its development tools, running:

$ qmake
$ make

should build the webslides2pdf binary.

Recent activity


Commits by equalsraf were pushed to equalsraf/webslides2pdf

3a0c6dc - Fix local path handling/ remove QUrl::isLocalFile - Fix conversion between local path and absolute URL - The conversion was stripping the last component of the ...
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.