Skip to main content

Jupyterlab extension to allow copying and exporting any given SVG graphics as PNG

Project description

jupyterlab_export_svg_as_png_extension

GitHub Actions npm version PyPI version Total PyPI downloads JupyterLab 4 Brought To You By KOLOMOLO Donate PayPal

[!TIP] This extension is part of the stellars_jupyterlab_extensions metapackage. Install all Stellars extensions at once: pip install stellars_jupyterlab_extensions

Copy or export any SVG graphic in JupyterLab as a high-quality PNG image. Right-click on any SVG element - whether it's a chart output, a diagram, or an inline graphic - and choose to copy it to the clipboard as PNG or save it as a PNG file.

Full disclosure: SVG is a perfectly fine format that nobody asked to be converted. But sometimes you need a PNG for a slide deck, a report, or that one colleague who insists on pasting images into Word documents. This extension won't judge. It just converts.

Context menu on an SVG inside a markdown file

Context menu on an SVG file opened directly in the image viewer

Features

  • Copy SVG as PNG - Right-click any SVG in a notebook output or document and copy it as a PNG to the clipboard
  • Save SVG as PNG file - Download any SVG as a high-quality PNG file with a deterministic filename
  • Theme-aware export - Resolves @media (prefers-color-scheme) CSS in SVGs with configurable mode: follow JupyterLab theme (system), or force light/dark
  • Configurable DPI - Control output resolution from 72 (screen) to 1200 (professional print), default 300
  • Background color options - Export with transparent, white, black, or custom background color
  • Works everywhere - Context menu appears on SVG outputs, markdown previews, and HTML rendered content

Installation

Requires JupyterLab 4.0.0 or higher.

pip install jupyterlab-export-svg-as-png-extension

Uninstall

pip uninstall jupyterlab-export-svg-as-png-extension

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

jupyterlab_export_svg_as_png_extension-1.0.5.tar.gz (534.9 kB view details)

Uploaded Source

Built Distribution

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

File details

Details for the file jupyterlab_export_svg_as_png_extension-1.0.5.tar.gz.

File metadata

File hashes

Hashes for jupyterlab_export_svg_as_png_extension-1.0.5.tar.gz
Algorithm Hash digest
SHA256 581fec4b64f57a3d4c7421c0794517b3113c5207514b977b3bdaa1f0fa14cf3a
MD5 eb991f511d33536c18d2888929812b19
BLAKE2b-256 49ad4de3e1595f67ea104d186a16e470788e63523682d30b84ce79fcd1ba4cfb

See more details on using hashes here.

File details

Details for the file jupyterlab_export_svg_as_png_extension-1.0.5-py3-none-any.whl.

File metadata

File hashes

Hashes for jupyterlab_export_svg_as_png_extension-1.0.5-py3-none-any.whl
Algorithm Hash digest
SHA256 a6b38f8a89355b961eb38739e4dab4182744766912e3fee536268c6f1a25ec01
MD5 c0fa7c795ce54dacb608a702bce66256
BLAKE2b-256 eb46ed510f537c9c618860b5f1c8afdb212c57a65aba19e8bc6a2781d3459383

See more details on using hashes here.

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