npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

sozi-export

v20.4.23

Published

Convert a Sozi presentation to PDF, PPTX or video

Downloads

29

Readme

Export Sozi presentations to PDF, PPTX or video

This tool is separate from the Sozi presentation editor.

Install

The PDF exporter depends on pdfjam, a shell script for manipulating PDF files. The video exporter is based on libav. Users of Debian-based distributions can install the texlive-extra-utils and libav-tools packages.

sudo apt install texlive-extra-utils libav-tools

The Sozi export tool is available as an NPM package. Install node.js 0.10 or later (Linux users can use the NodeSource distributions), then:

sudo npm install -g sozi-export

With NPM 5, the installation is known to fail with this message:

Phantom installation failed { Error: EACCES: permission denied, link '/tmp/phantomjs/phantomjs-2.1.1-linux-x86_64.tar.bz2-extract-1522473900842/phantomjs-2.1.1-linux-x86_64' -> '/usr/lib/node_modules/sozi-export/node_modules/phantomjs-prebuilt/lib/phantom'

This can be fixed with the following command:

sudo npm install -g sozi-export --unsafe-perm

Convert a Sozi presentation to PDF

sozi-to-pdf [options] presentation.sozi.html

Options:

  • -h, --help Usage information
  • -o, --output <file> Output file
  • -W, --width <number> Page width (defaults to 29.7)
  • -H, --height <number> Page height (defaults to 21)
  • -r, --resolution <number> Pixels per width/height unit (defaults to 72)
  • -p, --paper <size> A LaTeX paper size (defaults to a4paper)
  • -P, --portrait Set the paper orientation to portrait (disabled by default)
  • -c, --png-compression <number>, Compression level of the generated PNG files (0 to 100, higher means smaller files, defaults to 100)
  • -i, --include <list> Frames to include (defaults to 'all')
  • -x, --exclude <list> Frames to exclude (defaults to 'none')

The width, height and resolution options specify the geometry of the browser window where the presentation is rendered. The paper and portrait options specify the page format to use in the final PDF document.

The include option is always applied before the exclude option. Frames lists have the following syntax:

  • all selects all frames in the presentation.
  • none selects no frame.
  • A comma-separated list of frame numbers or ranges. A range is in the form first:last or first:second:last where first, second and last are frame numbers.

For instance : -i 2,4:6,10:12:18 will include frames 2, 4, 5, 6, 10, 12, 14, 16, 18.

Convert a Sozi presentation to PPTX

sozi-to-pptx [options] presentation.sozi.html

Options:

  • -h, --help Usage information
  • -o, --output <file> Output file
  • -W, --width <number> Page width (defaults to 29.7)
  • -H, --height <number> Page height (defaults to 21)
  • -r, --resolution <number> Pixels per width/height unit (defaults to 72)
  • -c, --png-compression <number>, Compression level of the generated PNG files (0 to 100, higher means smaller files, defaults to 100)
  • -i, --include <list> Frames to include (defaults to 'all')
  • -x, --exclude <list> Frames to exclude (defaults to 'none')

The width, height and resolution options specify the geometry of the browser window where the presentation is rendered.

The include option is always applied before the exclude option. Frames lists have the following syntax:

  • all selects all frames in the presentation.
  • none selects no frame.
  • A comma-separated list of frame numbers or ranges. A range is in the form first:last or first:second:last where first, second and last are frame numbers.

For instance : -i 2,4:6,10:12:18 will include frames 2, 4, 5, 6, 10, 12, 14, 16, 18.

Convert a Sozi presentation to video

sozi-to-video [options] presentation.sozi.html

Options:

  • -h, --help Usage information
  • -o, --output <file> Output video file, or target folder when exporting to a sequence of images
  • -i, --images Export as a sequence of PNG files instead of a single video file
  • -W, --width <number> Video width, in pixels (defaults to 1024)
  • -H, --height <number> Video height (defaults to 768)
  • -b, --bit-rate <number> Video bit rate (defaults to 2M)
  • -c, --png-compression <number>, Compression level of the generated PNG files (0 to 100, higher means smaller files, defaults to 100)

Known issues and limitations

This tool uses a headless web browser for rendering. PhantomJS and SlimerJS both have benefits and limitations:

  • PhantomJS can render a web page to a PDF document, which preserves the vector graphics and text. However, PhantomJS 1.9.19 fails to render the SVG content of a Sozi presentation.
  • SlimerJS renders SVG content correctly but it does not support the PDF format.

Currently, the PDF and PPTX export tools render each frame to a PNG image and joins them into a single document.