Skip to main content

MagicPoint to PDF converter

Project description

This is a quick-and-dirty MagicPoint to PDF converter.

It supports only a subset of MagicPoint, specifically, the subset I’ve used in my slides so far. If you send me your slide decks, I’ll make mgp2pdf handle them too.

SUPPORT.rst has a list of supported and unsupported features.

BUGS.rst has a list of known bugs.

Installation

pip install mgp2pdf

Usage

mgp2pdf [-v] [--unsafe] slides.mgp [-o output.pdf]
mgp2pdf [-v] [--unsafe] slides.mgp ... [-o directory]
mgp2pdf [-h|--help]

Why another converter?

I used mgp to produce slides for a Python course I taught at Vilnius University. However, since most of the students are not (yet) Linux users, they couldn’t use MagicPoint to view my slides at home. There are some converters from MagicPoint to PostScript/HTML, but the result either looks ugly, or doesn’t support Unicode characters. MagicPoint itself can produce a number of bitmaps (by taking screenshots), but those are big, and the conversion process is inconvenient (you cannot use your machine while mgp is busy rendering slides and taking screenshots).

I wrote a Python program to interpret MagicPoint commands and produce a PDF file using ReportLab. It can handle my slides (Lithuanian), but otherwise it is probably incomplete. Feel free to give it a try. File bugs for missing features, and I’ll see what I can do.

Resources

There’s a web page, of sorts, at http://mg.pov.lt/mgp2pdf

The source code can be found at https://github.com/mgedmin/mgp2pdf.

Report bugs at https://github.com/mgedmin/mgp2pdf/issues.

Licence: GPL v2 or later (http://www.gnu.org/copyleft/gpl.html)

https://travis-ci.org/mgedmin/mgp2pdf.svg?branch=master https://ci.appveyor.com/api/projects/status/github/mgedmin/mgp2pdf?branch=master&svg=true https://coveralls.io/repos/mgedmin/mgp2pdf/badge.svg?branch=master

Changelog

0.10.1 (2016-09-17)

  • Correctly recognize ...-...-r fonts as roman (GH #6).

  • Add support for cyan color (GH #5).

  • Fix typo in error message (GH #4).

  • Add Python 3.5 support.

  • Drop Python 2.6 support.

0.10 (2015-01-06)

  • %filter is disabled by default for being a security risk. Use --unsafe to enable.

  • -o DIRECTORY is now supported.

  • Interpret image paths relative to the location of the mgp file.

  • Support Python 3.3 and up in addition to 2.6 and 2.7.

  • More accurate text positioning (mgp2pdf no longer truncates the corrdinates to integral point values).

  • More color names are now recognized: white, red, green, blue, yellow.

  • Better font name recognition (requires fc-match from fontconfig).

  • Improved error handling and reporting.

  • Support %% comment syntax.

  • Corrected handling of %default, %tab, %deffont.

  • Implemented %include.

  • Implemented %newimage -raise (also discovered that mgp itself ignores -raise).

  • 100% test coverage.

0.9 (2014-05-09)

  • First packaged release.

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

mgp2pdf-0.10.1.tar.gz (34.5 kB view details)

Uploaded Source

Built Distribution

mgp2pdf-0.10.1-py2-none-any.whl (15.9 kB view details)

Uploaded Python 2

File details

Details for the file mgp2pdf-0.10.1.tar.gz.

File metadata

  • Download URL: mgp2pdf-0.10.1.tar.gz
  • Upload date:
  • Size: 34.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for mgp2pdf-0.10.1.tar.gz
Algorithm Hash digest
SHA256 12488e1f3c5bb3a6529e2fe7be7572e809c8bca274defe076a6bde118dd632e2
MD5 616adf1f797c94f49943cb808adcba91
BLAKE2b-256 d40b26f96171ff73876d092365785d46b029eb147d9fe34b30e52065277f29d1

See more details on using hashes here.

File details

Details for the file mgp2pdf-0.10.1-py2-none-any.whl.

File metadata

File hashes

Hashes for mgp2pdf-0.10.1-py2-none-any.whl
Algorithm Hash digest
SHA256 7658727bc5b62673de8787bb4070b4798a211232e644727f213f2917116ce8e5
MD5 0543d56d51d34eee3c5353d4aa23290e
BLAKE2b-256 a1a5dff924db4e85b6a64bbf41a035c5465d41695b939da66eed8e0199329c68

See more details on using hashes here.

Supported by

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