Skip to main content

A PDF exporter for JupyterLite based on WebAssembly distributions of Pandoc and Typst.

Project description

jupyterlite-pdf-exporter, version 0.1.0

Github Actions build status Try PDF exporter in JupyterLite

A serverless PDF exporter for JupyterLite based on WebAssembly distributions of Pandoc and Typst. This JupyterLite extension registers a PDF exporter with JupyterLite's INbConvertExporters interface.

Usage

  • Install this extension in your JupyterLite deployment via pip install jupyterlite-pdf-exporter and rebuild your JupyterLite distribution.
  • Open a notebook in JupyterLite, click on the "File" menu, and select "Save and Export Notebook As" > "PDF". The PDF file will be downloaded to your local machine at a location of your choice.

Requirements

  • JupyterLite 0.7.0 and later
  • A modern web browser with support for WebAssembly and Web Workers (e.g., Chrome, Firefox, Safari, Edge, and so on). All browsers supported by JupyterLite should work with this extension.
  • The extension relies on WebAssembly distributions of Pandoc and Typst. These distributions are quite large (over 50 MiB) and may take some time to download and initialise when the extension is first used. For a better user experience, it is recommended to use this extension in an environment with a stable and reasonably fast internet connection.

Installation

To install the extension into your JupyterLite deployment, execute:

pip install jupyterlite-pdf-exporter

and rebuild your JupyterLite distribution.

Uninstalling the extension

To remove the extension from your JupyterLite deployment, execute:

pip uninstall jupyterlite-pdf-exporter

and rebuild your JupyterLite distribution.

License

The source code of this JupyterLite extension is licensed under the terms of the BSD-3-Clause "New" or "Revised" License (BSD-3-Clause; see the LICENSE file for details).

The distributions of this JupyterLite extension on the npm and PyPI package registries are licensed under the terms of the GNU General Public License version 2.0 (GPL-2.0) or later (GPL-2.0-or-later). Please see the Pandoc license filefor details.

The WebAssembly/JavaScript distribution of Typst, @myriaddreamin/typst-all-in-one, is licensed under the terms of the Apache License 2.0 (Apache-2.0). Please see the Typst license file for details.

Why?

The WebAssembly distribution of Pandoc, through its dependency on the pandoc-wasm project on the npm package registry, is licensed under the terms of the GNU General Public License version 2.0 (GPL-2.0-or-later). Binary distributions of this extension bundle the pandoc.wasm file, and as a result, are regarded as derivative works of the WebAssembly distribution of Pandoc.

More details

For an overview of the licenses of all the JavaScript dependencies of this extension at runtime, please navigate to your JupyterLite deployment > "Help" menu > "Licenses" after installing and rebuilding it.

Thanks 💛

This project would not have been possible without the following open source projects:

  • JupyterLite: A JupyterLab distribution that runs entirely in the web browser, powered by WebAssembly and Web Workers.
  • Pandoc: A universal document converter that supports a wide variety of input and output formats, including Jupyter notebooks and PDF.
  • Typst: A modern typesetting system that provides high-quality PDF output and a user-friendly syntax for document design.
  • pandoc-wasm: A WebAssembly distribution of Pandoc that allows it to run in web browsers and other JavaScript environments.
  • @myriaddreamin/typst-all-in-one: A WebAssembly distribution of Typst that allows it to run in web browsers and other JavaScript environments.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

jupyterlite_pdf_exporter-0.1.0.tar.gz (31.0 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

jupyterlite_pdf_exporter-0.1.0-py3-none-any.whl (31.1 MB view details)

Uploaded Python 3

File details

Details for the file jupyterlite_pdf_exporter-0.1.0.tar.gz.

File metadata

  • Download URL: jupyterlite_pdf_exporter-0.1.0.tar.gz
  • Upload date:
  • Size: 31.0 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.13

File hashes

Hashes for jupyterlite_pdf_exporter-0.1.0.tar.gz
Algorithm Hash digest
SHA256 cc56024b4f7178ad93dab9c40adf2372f0c2c8ea537bfe51a3b7fc40c5af34d6
MD5 6e94f528f231c3af0de52fb23e8c63cd
BLAKE2b-256 482170a42837395baf49a321f124fc7c7c8dcab74d52c6ae4f59ebf3a6fb6325

See more details on using hashes here.

Provenance

The following attestation bundles were made for jupyterlite_pdf_exporter-0.1.0.tar.gz:

Publisher: release.yml on agriyakhetarpal/jupyterlite-pdf-exporter

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file jupyterlite_pdf_exporter-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for jupyterlite_pdf_exporter-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 b748094f7bea8af8fce262f1f493412cca26a013bba07570cd23e27e3366b192
MD5 8573c3ec94bf2c60215f60c9b7a28bc8
BLAKE2b-256 f832e7b1a5015e693679bf2236333588df59a87bc3da56dfb1dd7ec2a98fb2cb

See more details on using hashes here.

Provenance

The following attestation bundles were made for jupyterlite_pdf_exporter-0.1.0-py3-none-any.whl:

Publisher: release.yml on agriyakhetarpal/jupyterlite-pdf-exporter

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page