Git Product home page Git Product logo

sozi-export's Introduction

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.

apt-get 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:

npm install -g sozi-export

Convert a Sozi presentation to PDF

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

Options:

  • -h, --help output 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)
  • -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 output 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)
  • -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 output usage information
  • -o, --output <file> Output 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)

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.

sozi-export's People

Contributors

aumouvantsillage avatar hdetering avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.