rst2pdf: Use a text editor. Make a PDF.

Overview
https://travis-ci.org/rst2pdf/rst2pdf.svg?branch=master

rst2pdf: Use a text editor. Make a PDF.

The usual way of creating PDF from reStructuredText is by going through LaTeX. This tool provides an alternative by producing PDF directly using the ReportLab library.

More information is available at the main website.

Features

  • User-defined page layout. Multiple frames per page, multiple layouts per document.
  • Page transitions
  • Cascading stylesheet mechanism, define only what you want changed.
  • Supports TTF and Type1 font embedding.
  • Any number of paragraph styles using the class directive.
  • Any number of character styles using text roles.
  • Custom page sizes and margins.
  • Syntax highlighter for many languages, using Pygments.
  • Supports embedding almost any kind of raster or vector images.
  • Supports hyphenation.
  • Sphinx integration
  • Full user's manual

Installation

rst2pdf supports Python 3.6 or greater. Version 0.97 was the last version to support Python 2.7.

Install from PyPI

The latest released version may be installed from PyPI by using pip:

$ pip install --user rst2pdf

Install from Snap

If you are using a system that supports snaps then you can install from there with:

$ snap install rst2pdf

Install from GitHub

Work on rst2pdf has restarted on GitHub, with the goals of adding new features, addressing outstanding issues, and not breaking anything. You can clone the repository and install this version:

$ git clone https://github.com/rst2pdf/rst2pdf
$ cd rst2pdf
$ git checkout 
   # if you want something other than master
$ pip install --user .

 

Note that you may need to use sudo python setup.py install or sudo python3 setup.py install in this final step, depending on your configuration.

You may want to install it in a virtualenv, but that is beyond the scope of this readme.

Usage

To convert a reStructuredText document to a PDF, simply run:

$ rst2pdf 
   output.pdf

 

For information on available options, use -h:

$ rst2pdf -h

To enable basic integration with Sphinx, modify your conf.py file to enable the rst2pdf.pdfbuilder extension and configure the pdf_documents option. For example:

extensions = [
    # ...
    'rst2pdf.pdfbuilder',
]

# Grouping the document tree into PDF files. List of tuples
# (source start file, target name, title, author, options).
pdf_documents = [
    ('index', 'MyProject', 'My Project', 'Author Name'),
]

For information on the pdf_documents option and the many other options available, refer to the manual.

Contributing

See CONTRIBUTING.

Code of conduct

rst2pdf is an inclusive and welcoming community. To participate in this project, everyone is bound by our Community Code of Conduct.

Comments
  • Polyglot: Support Python 3 too

    Polyglot: Support Python 3 too

    Attempt to make the codebase py2/py3 compatible

    • [x] Support installing in py2 and py3
    • [x] Make tests run with py2 and py3 in travis
    • [x] Keep tests passing in py2

    And then progressively fix tests in py3 until they all pass (or close enough)

    opened by ralsina 48
  • graphviz support?

    graphviz support?

    What steps will reproduce the problem?
    
    Sphinx's graphviz extension (http://sphinx.pocoo.org/ext/graphviz.html)
    doesn't seem to be supported by rst2pdf / rst2pdf.pdfbuilder 
    
    Here's a sample graphviz entry:
    
    .. graphviz::
    
       digraph g {
         node [shape = record,height=.08];
         node0[label = "header (a5 00)\n2 | data\n12 | checksum\n2 "];
         node1[label = "header (a5 01)\n2 | A | B | C | quick brown fox lazy
    dogs | checksum\n2 "];
       }
    
    (conf.py lines needed: make sure you have sphinx.ext.graphviz as one of the
    extensions, also graphviz_dot='C:/appl/graphics/graphviz/2.24/bin/dot.exe'
    or wherever you have graphviz's "dot" installed)
    
    (I also tried using Henrique Bastos' graphviz_svg extension
    http://henriquebastos.net/2009/11/30/adding-svg-support-to-sphinxs-graphviz-exte
    nsion/
    )
    
    This works fine with the html builder for sphinx, but it doesn't work for
    rst2pdf.pdfbuilder. I get this error:
    
    [ERROR] createpdf.py:1639 Unkn. node (gen_elements): <class
    'sphinx.ext.graphviz.graphviz'> [near line UNKNOWN in file UNKNOWN]
    
    
    
    What version of the product are you using? On what operating system?
    
    Windows XP
    Python 2.6.2
    Sphinx 0.6.3
    rst2pdf just downloaded today
    PIL (just downloaded)
    http://effbot.org/media/downloads/PIL-1.1.7.win32-py2.6.exe 
    svglib (just downloaded)
    http://pypi.python.org/packages/2.6/s/svglib/svglib-0.6.2-py2.6.egg
    
    
    

    Original issue reported on code.google.com by [email protected] on 4 Dec 2009 at 4:38

    auto-migrated Priority-Low 
    opened by GoogleCodeExporter 41
  • Text not wrapping around images when specified

    Text not wrapping around images when specified

    What steps will reproduce the problem?
    1. Insert an image with :align: right
    2.
    3.
    
    What is the expected output? What do you see instead?
    Text to wrap around the image.
    
    What version of the product are you using? On what operating system?
    svn, ubuntu
    
    Please provide any additional information below.
    Tried to do it with figures and inline images as well, but not having any
    success. This seems like it would be something rather fundamental...
    
    

    Original issue reported on code.google.com by [email protected] on 2 Sep 2009 at 5:17

    Priority-Medium auto-migrated Type-Defect 
    opened by GoogleCodeExporter 23
  • KeyError: 'format'

    KeyError: 'format'

    writing accense... [ERROR] pdfbuilder.py:105 'format'
    Traceback (most recent call last):
      ...
      File ".../rst2pdf-0.11.dev_r1157-py2.6.egg/rst2pdf/createpdf.py", line 
    1522, in gen_elements
        if node.attributes['format'].lower()=='pdf':
    KeyError: 'format'
    
    

    Original issue reported on code.google.com by [email protected] on 10 Oct 2009 at 7:02

    Attachments:

    auto-migrated Type-Defect Priority-Low 
    opened by GoogleCodeExporter 22
  • MathtextBackendPdf class Deprecated

    MathtextBackendPdf class Deprecated

    Not a current problem, but in converting an RsT file to pdf I noted the following message from Matplotlib:

    The MathtextBackendPdf class was deprecated in Matplotlib 3.4 and will be removed two minor releases later. Use MathtextBackendPath instead.
    

    It's used by math_flowable.py.

    I added this issue in case the deprecation hasn't been noticed as yet.

    opened by tbpassin 21
  • Automatic image rescaling broken

    Automatic image rescaling broken

    For PNG images, the automatic image downscaling for images which are too
    large does not appear to work.
    
    For PDF images (at least with -e vectorpdf), the automatic image
    downscaling does at least rescale the image, but the image is not properly
    recentered -- it is shifted too far down and to the right.
    
    I will check in a testcase.
    
    

    Original issue reported on code.google.com by pmaupin on 26 Jan 2010 at 2:18

    Priority-Medium auto-migrated Type-Defect 
    opened by GoogleCodeExporter 21
  • HTML version of the manual

    HTML version of the manual

    This PR contains a (very minor!) amendment to the manual, and some scripts and supporting code to enable us to produce an HTML version (probably to then include in the website repo, but all the work is done by files in this repo). You can see how things are looking here: http://web.lornajane.net/manual.html

    Fixes https://github.com/rst2pdf/rst2pdf.github.io/issues/2

    opened by lornajane 20
  • ValueError: Unknown color u'black' / Ubuntu 9.04 Problems

    ValueError: Unknown color u'black' / Ubuntu 9.04 Problems

    rst2pdf is working great so far and I love it, but I've been running into
    my fair share of problems unfortunately :(
    
    Here's what I've found:
    
    a) Can't compile a popular ReST Cheetsheet (I guess would make a good acid
    type test :)
    
    b) Test suite fails on Python 2.6 and 2.5
    
    c) Ubuntu 9.04 universe comes with rst2pdf 0.9 which generates the
    following error "AttributeError: Table instance has no attribute 'style'"
    which I believe has been fixed by you guys already so I had to easy_install
    the latest.
    
    
    What steps will reproduce the problem?
    
    $ easy_install rst2pdf
    $ wget http://docutils.sourceforge.net/docs/user/rst/cheatsheet.txt
    $ mkdir images
    $ cp /where/did/i/go/biohazard.png images
    $ rst2pdf -v cheetsheet.txt
    
    
    What is the expected output? What do you see instead?
    
    
    [email protected]:~/Documents$ rst2pdf -v ReST-cheatsheet.txt 
    [INFO] styles.py:44 Using stylesheets:
    /usr/local/lib/python2.6/dist-packages/rst2pdf-0.11-py2.6.egg/rst2pdf/styles/sty
    les.json,/usr/local/lib/python2.6/dist-packages/rst2pdf-0.11-py2.6.egg/rst2pdf/s
    tyles/default.json
    [INFO] styles.py:60 FontPath:['.',
    '/usr/local/lib/python2.6/dist-packages/rst2pdf-0.11-py2.6.egg/rst2pdf/fonts']
    [INFO] styles.py:61 StylePath:['.',
    '/usr/local/lib/python2.6/dist-packages/rst2pdf-0.11-py2.6.egg/rst2pdf/styles',
    '/home/jart/.rst2pdf/styles']
    [WARNING] createpdf.py:258 Using image images/biohazard.png without
    specifying size.Calculating based on image size at 96dpi
    [INFO] createpdf.py:280 Image images/biohazard.png size calculated: 
    0.423333cm by 0.423333cm
    Traceback (most recent call last):
      File "/usr/local/bin/rst2pdf", line 8, in <module>
        load_entry_point('rst2pdf==0.11', 'console_scripts', 'rst2pdf')()
      File
    "/usr/local/lib/python2.6/dist-packages/rst2pdf-0.11-py2.6.egg/rst2pdf/createpdf
    .py",
    line 1651, in main
        compressed=options.compressed)
      File
    "/usr/local/lib/python2.6/dist-packages/rst2pdf-0.11-py2.6.egg/rst2pdf/createpdf
    .py",
    line 1297, in createPdf
        pdfdoc.multiBuild(elements)
      File
    "/usr/lib/python2.6/dist-packages/reportlab/platypus/doctemplate.py", line
    855, in multiBuild
        self.build(tempStory, filename, canvasmaker)
      File
    "/usr/lib/python2.6/dist-packages/reportlab/platypus/doctemplate.py", line
    777, in build
        self.handle_flowable(flowables)
      File
    "/usr/lib/python2.6/dist-packages/reportlab/platypus/doctemplate.py", line
    665, in handle_flowable
        if frame.add(f, canv, trySplit=self.allowSplitting):
      File "/usr/lib/python2.6/dist-packages/reportlab/platypus/frames.py",
    line 174, in _add
        flowable.drawOn(canv, self._x + self._leftExtraIndent, y, _sW=aW-w)
      File
    "/usr/local/lib/python2.6/dist-packages/rst2pdf-0.11-py2.6.egg/rst2pdf/flowables
    .py",
    line 189, in drawOn
        self.t.drawOn(canvas, x, y, _sW)
      File "/usr/lib/python2.6/dist-packages/reportlab/platypus/flowables.py",
    line 105, in drawOn
        self._drawOn(canvas)
      File "/usr/lib/python2.6/dist-packages/reportlab/platypus/flowables.py",
    line 89, in _drawOn
        self.draw()#this is the bit you overload
      File "/usr/lib/python2.6/dist-packages/reportlab/platypus/tables.py",
    line 1295, in draw
        self._drawLines()
      File "/usr/lib/python2.6/dist-packages/reportlab/platypus/tables.py",
    line 1019, in _drawLines
        getattr(self,_LineOpMap.get(op, '_drawUnknown' ))( (sc, sr), (ec, er),
    weight, color, count, space)
      File "/usr/lib/python2.6/dist-packages/reportlab/platypus/tables.py",
    line 1040, in _drawInnerGrid
        self._drawHLines((sc, sr+1), (ec, er), weight, color, count, space)
      File "/usr/lib/python2.6/dist-packages/reportlab/platypus/tables.py",
    line 1055, in _drawHLines
        self._prepLine(weight, color)
      File "/usr/lib/python2.6/dist-packages/reportlab/platypus/tables.py",
    line 1045, in _prepLine
        self.canv.setStrokeColor(color)
      File "/usr/lib/python2.6/dist-packages/reportlab/pdfgen/textobject.py",
    line 98, in setStrokeColor
        raise ValueError('Unknown color %r' % aColor)
    ValueError: Unknown color u'black'
    
    
    What version of the product are you using? On what operating system?
    
    Ubuntu 9.04 (jaunty)
    
    [email protected]:~/Desktop/rst2pdf-0.11$ pip freeze | grep  -ie docutils -ie
    sphinx -ie  wordaxe -ie PIL -ie  PythonMagick -ie svglib -ie uniconvertor
    -ie pypdf
    
    PIL==1.1.6
    Sphinx==0.5.2
    SphinxBase==0.4.1
    UniConvertor==1.1.3
    docutils==0.5
    pyPdf==1.12
    wordaxe==0.3.0
    
    Thanks in advance for your help everyone!
    

    Original issue reported on code.google.com by [email protected] on 15 Sep 2009 at 3:51

    Priority-Medium auto-migrated Type-Defect 
    opened by GoogleCodeExporter 20
  • Stylesheet Refresh

    Stylesheet Refresh

    Marked as draft because it's intended as a starting point for #884 and changing the default stylesheet will probably cause a lot of test failures (we might want to either update the tests or have the existing ones use the old stylesheet for now) and there are probably lots of things I didn't think about yet. Feel free to fork and counter-PR with your own ideas; I am also open to adding/culling styles while we're at it.

    discussion 
    opened by lornajane 18
  • Page numbering in TOC

    Page numbering in TOC

    Here is a small hack to use reportlab.platypus's TOC instead of docutils's one.
    
    
    
    

    Original issue reported on code.google.com by [email protected] on 11 Nov 2008 at 8:54

    Attachments:

    Priority-Medium auto-migrated 
    opened by GoogleCodeExporter 18
  • TypeError in rst2pdf.createpdf.RstToPdf initialization with docutils 0.8

    TypeError in rst2pdf.createpdf.RstToPdf initialization with docutils 0.8

    What steps will reproduce the problem?
    1. from rst2pdf.createpdf import RstToPdf
    2. rst2pdf = RstToPdf()
    
    What is the expected output? What do you see instead?
    
    Expected: <rst2pdf.createpdf.RstToPdf object at ...>
    
    Instead I see: TypeError: get_language() takes exactly 2 arguments (1 given)
    
    Please answer the following questions, they are *very* important:
    
    * Version of rst2pdf?
    
    rst2pdf==0.16
    
    * Version of reportlab?
    
    reportlab==2.5
    
    * Are you using wordaxe, and if true, what version?
    
    No.
    
    * Are you using rst2pdf with Sphinx, and if true, what version?
    
    No.
    
    Please provide any additional information below.
    
    The relevant package here is docutils, it seems to have changed the 
    'get_language' call in 0.8, and I'm working with docutils 0.8_pre7013.
    

    Original issue reported on code.google.com by [email protected] on 24 Apr 2011 at 6:31

    Priority-Medium auto-migrated Type-Defect 
    opened by GoogleCodeExporter 17
  • Bump lxml from 4.9.1 to 4.9.2

    Bump lxml from 4.9.1 to 4.9.2

    Bumps lxml from 4.9.1 to 4.9.2.

    Changelog

    Sourced from lxml's changelog.

    4.9.2 (2022-12-13)

    Bugs fixed

    Other changes

    • LP#1981760: Element.attrib now registers as collections.abc.MutableMapping.

    • lxml now has a static build setup for macOS on ARM64 machines (not used for building wheels). Patch by Quentin Leffray.

    Commits
    • c17c1ca Use same naming for Python version matrix variable in wheel workflow as in CI...
    • fc2f7ea Use windows-2016 image instead of windows-2019 to fix the Py2.7 build.
    • 98224b3 Install more recent library versions for the wheel build.
    • ce4e5bc Fix release date.
    • cece238 Add PyPy-3.8 CI target.
    • 2c2308e Try to add a Windows CI build for Py2.7.
    • 0b0b2b9 Exclude missing Python versions from CI jobs.
    • b848b82 Try to fix CI "setup.py install" in Py3.11.
    • 487a194 CI: exclude non-static Windows jobs.
    • fc53d6f Show executed commands in CI runs.
    • Additional commits viewable in compare view

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    dependencies 
    opened by dependabot[bot] 0
  • Bump pymupdf from 1.21.0 to 1.21.1

    Bump pymupdf from 1.21.0 to 1.21.1

    Bumps pymupdf from 1.21.0 to 1.21.1.

    Release notes

    Sourced from pymupdf's releases.

    PyMuPDF-1.21.1 released

    PyMuPDF-1.21.1 has been released.

    Wheels for Windows, Linux and MacOS, and the sdist, are available on pypi.org and can be installed in the usual way, for example:

    python -m pip install --upgrade pymupdf
    

    Changes in Version 1.21.1 (2022-12-13)

    • This release uses MuPDF-1.21.1.

    • Bug fixes:

      • Fixed #2110: Fully embedded font is extracted only partially if it occupies more than one object
      • Fixed #2094: Rectangle Detection Logic
      • Fixed #2088: Destination point not set for named links in toc
      • Fixed #2087: Image with Filter "[/FlateDecode/JPXDecode]" not extracted
      • Fixed #2086: Document.save() owner_pw & user_pw has buffer overflow bug
      • Fixed #2076: Segfault in fitz.py
      • Fixed #2051: Missing DPI Parameter
      • Fixed #2048: Invalid size of TextPage and bbox with newest version 1.21.0
      • Fixed #2045: SystemError: returned a result with an error set
      • Fixed #2039: 1.21.0 fails to build against system libmupdf
      • Fixed #2036: Archive::Archive defined twice
    • Other

      • Swallow "&zoom=nan" in link uri strings.
      • Add new Page utility methods Page.replace_image() and Page.delete_image().
    • Documentation:

      • #2040: Added note about test failure with non-default build of MuPDF, to tests/README.md.
      • #2037: In docs/installation.rst, mention incompatibility with chocolatey.org on Windows.
      • #2061: Fixed description of Annot.file_info.
      • #2065: Show how to insert internal PDF link.
      • Improved description of building from source without an sdist.
      • Added information about running tests.
      • #2084: Fixed broken link to PyMuPDF-Utilities.
    Changelog

    Sourced from pymupdf's changelog.

    .. include:: header.rst

    Change Log

    Changes in Version 1.21.1 (2022-12-13)

    • This release uses MuPDF-1.21.1.

    • Bug fixes:

      • Fixed [#2110](https://github.com/pymupdf/pymupdf/issues/2110) <https://github.com/pymupdf/PyMuPDF/issues/2110>_: Fully embedded font is extracted only partially if it occupies more than one object
      • Fixed [#2094](https://github.com/pymupdf/pymupdf/issues/2094) <https://github.com/pymupdf/PyMuPDF/issues/2094>_: Rectangle Detection Logic
      • Fixed [#2088](https://github.com/pymupdf/pymupdf/issues/2088) <https://github.com/pymupdf/PyMuPDF/issues/2088>_: Destination point not set for named links in toc
      • Fixed [#2087](https://github.com/pymupdf/pymupdf/issues/2087) <https://github.com/pymupdf/PyMuPDF/issues/2087>_: Image with Filter "[/FlateDecode/JPXDecode]" not extracted
      • Fixed [#2086](https://github.com/pymupdf/pymupdf/issues/2086) <https://github.com/pymupdf/PyMuPDF/issues/2086>_: Document.save() owner_pw & user_pw has buffer overflow bug
      • Fixed [#2076](https://github.com/pymupdf/pymupdf/issues/2076) <https://github.com/pymupdf/PyMuPDF/issues/2076>_: Segfault in fitz.py
      • Fixed [#2051](https://github.com/pymupdf/pymupdf/issues/2051) <https://github.com/pymupdf/PyMuPDF/issues/2051>_: Missing DPI Parameter
      • Fixed [#2048](https://github.com/pymupdf/pymupdf/issues/2048) <https://github.com/pymupdf/PyMuPDF/issues/2048>_: Invalid size of TextPage and bbox with newest version 1.21.0
      • Fixed [#2045](https://github.com/pymupdf/pymupdf/issues/2045) <https://github.com/pymupdf/PyMuPDF/issues/2045>_: SystemError: returned a result with an error set
      • Fixed [#2039](https://github.com/pymupdf/pymupdf/issues/2039) <https://github.com/pymupdf/PyMuPDF/issues/2039>_: 1.21.0 fails to build against system libmupdf
      • Fixed [#2036](https://github.com/pymupdf/pymupdf/issues/2036) <https://github.com/pymupdf/PyMuPDF/issues/2036>_: Archive::Archive defined twice
    • Other

      • Swallow "&zoom=nan" in link uri strings.
      • Add new Page utility methods Page.replace_image() and Page.delete_image().
    • Documentation:

      • [#2040](https://github.com/pymupdf/pymupdf/issues/2040) <https://github.com/pymupdf/PyMuPDF/issues/2040>_: Added note about test failure with non-default build of MuPDF, to tests/README.md.
      • [#2037](https://github.com/pymupdf/pymupdf/issues/2037) <https://github.com/pymupdf/PyMuPDF/issues/2037>_: In docs/installation.rst, mention incompatibility with chocolatey.org on Windows.
      • [#2061](https://github.com/pymupdf/pymupdf/issues/2061) <https://github.com/pymupdf/PyMuPDF/issues/2061>_: Fixed description of Annot.file_info.
      • [#2065](https://github.com/pymupdf/pymupdf/issues/2065) <https://github.com/pymupdf/PyMuPDF/issues/2065>_: Show how to insert internal PDF link.
      • Improved description of building from source without an sdist.
      • Added information about running tests.
      • [#2084](https://github.com/pymupdf/pymupdf/issues/2084) <https://github.com/pymupdf/PyMuPDF/issues/2084>_: Fixed broken link to PyMuPDF-Utilities.

    Changes in Version 1.21.0 (2022-11-8)

    • This release uses MuPDF-1.21.0.

    • New feature: Stories.

    • Added wheels for Python-3.11.

    • Bug fixes:

      • Fixed [#1701](https://github.com/pymupdf/pymupdf/issues/1701) <https://github.com/pymupdf/PyMuPDF/issues/1701>_: Broken custom image insertion.

    ... (truncated)

    Commits
    • 0f01aaf Updated version numbers and dates for 1.21.1 release.
    • 5973cc7 tests/test_pixmap.py: fixed incompatibility with older pythons' fstrings.
    • 37f6728 changes.txt docs/changes.rst: updated to be identical.
    • 3213d9f Updated version numbers and dates for 1.21.1rc1 release.
    • cdb1247 fitz/fitz.i: fixed potentially unsafe call of fz_warn().
    • 916b091 Add new Page utility method
    • 53a723f Several Bug Fixes
    • 0a5476b setup.py: made OS-detection more consistent.
    • 492f900 tests/: added some low-level tests.
    • 6d0e8e6 Adds header & footer to documentation
    • Additional commits viewable in compare view

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    dependencies 
    opened by dependabot[bot] 0
  • Bump packaging from 21.3 to 22.0

    Bump packaging from 21.3 to 22.0

    Bumps packaging from 21.3 to 22.0.

    Release notes

    Sourced from packaging's releases.

    22.0

    What's Changed

    ... (truncated)

    Changelog

    Sourced from packaging's changelog.

    22.0 - 2022-12-07

    
    * Explicitly declare support for Python 3.11 (:issue:`587`)
    * Remove support for Python 3.6 (:issue:`500`)
    * Remove ``LegacySpecifier`` and ``LegacyVersion`` (:issue:`407`)
    * Add ``__hash__`` and ``__eq__`` to ``Requirement`` (:issue:`499`)
    * Add a ``cpNNN-none-any`` tag (:issue:`541`)
    * Adhere to :pep:`685` when evaluating markers with extras (:issue:`545`)
    * Allow accepting locally installed prereleases with ``SpecifierSet``  (:issue:`515`)
    * Allow pre-release versions in marker evaluation (:issue:`523`)
    * Correctly parse ELF for musllinux on Big Endian (:issue:`538`)
    * Document ``packaging.utils.NormalizedName`` (:issue:`565`)
    * Document exceptions raised by functions in ``packaging.utils`` (:issue:`544`)
    * Fix compatible version specifier incorrectly strip trailing ``0`` (:issue:`493`)
    * Fix macOS platform tags with old macOS SDK (:issue:`513`)
    * Forbid prefix version matching on pre-release/post-release segments (:issue:`563`)
    * Normalize specifier version for prefix matching (:issue:`561`)
    * Improve documentation for ``packaging.specifiers`` and ``packaging.version``. (:issue:`572`)
    * ``Marker.evaluate`` will now assume evaluation environment with empty ``extra``.
      Evaluating markers like ``"extra == 'xyz'"`` without passing any extra in the
      ``environment`` will no longer raise an exception (:issue:`550`)
    * Remove dependency on ``pyparsing``, by replacing it with a hand-written parser.
      This package now has no runtime dependencies (:issue:`468`)
    * Update return type hint for ``Specifier.filter`` and ``SpecifierSet.filter``
      to use ``Iterator`` instead of ``Iterable`` (:issue:`584`)
    
    Commits
    • b6e9bbc Bump for release
    • 55bdc66 Bump version to 22.0
    • b997a48 Permit arbitrary whitespace around versions specifier in parenthesis
    • e7ce051 Fix a typo in an error message
    • cb09331 Enforce word boundaries in operators and names
    • b41326d Rename marker_expr to marker
    • 975cd32 Permit whitespace around marker_atom
    • 8cba45c Add ParserSyntaxError as the cause of Invalid{Requirement/Marker}
    • 7930b73 Improve error message for bad version specifiers in Requirement
    • 258d252 Rewrite test suite for requirements parsing
    • Additional commits viewable in compare view

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    dependencies 
    opened by dependabot[bot] 0
  • Bump reportlab from 3.6.3 to 3.6.12

    Bump reportlab from 3.6.3 to 3.6.12

    Bumps reportlab from 3.6.3 to 3.6.12.

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    dependencies 
    opened by dependabot[bot] 0
  • Bump charset-normalizer from 2.1.1 to 3.0.1

    Bump charset-normalizer from 2.1.1 to 3.0.1

    Bumps charset-normalizer from 2.1.1 to 3.0.1.

    Release notes

    Sourced from charset-normalizer's releases.

    Version 3.0.1

    3.0.1 (2022-11-18)

    Fixed

    • Multi-bytes cutter/chunk generator did not always cut correctly (PR #233)

    Changed

    • Speedup provided using mypy/c 0.990 on Python >= 3.7

    Version 3.0.0

    3.0.0 (2022-10-20)

    Added

    • Extend the capability of explain=True when cp_isolation contains at most two entries (min one), will log in details of the Mess-detector results
    • Support for alternative language frequency set in charset_normalizer.assets.FREQUENCIES
    • Add parameter language_threshold in from_bytes, from_path and from_fp to adjust the minimum expected coherence ratio
    • normalizer --version now specify if the current version provides extra speedup (meaning mypyc compilation whl)

    Changed

    • Build with static metadata (not pyproject.toml yet)
    • Make language detection stricter
    • Optional: Module md.py can be compiled using Mypyc to provide an extra speedup up to 4x faster than v2.1

    Fixed

    • CLI with opt --normalize fail when using full path for files
    • TooManyAccentuatedPlugin induce false positive on the mess detection when too few alpha characters have been fed to it
    • Sphinx warnings when generating the documentation

    Removed

    • Coherence detector no longer returns 'Simple English' instead returns 'English'
    • Coherence detector no longer returns 'Classical Chinese' instead returns 'Chinese'
    • Breaking: Method first() and best() from CharsetMatch
    • UTF-7 will no longer appear as "detected" without a recognized SIG/mark (is unreliable/conflicts with ASCII)
    • Breaking: Class aliases CharsetDetector, CharsetDoctor, CharsetNormalizerMatch and CharsetNormalizerMatches
    • Breaking: Top-level function normalize
    • Breaking: Properties chaos_secondary_pass, coherence_non_latin and w_counter from CharsetMatch
    • Support for the backport unicodedata2

    This is the last version (3.0.x) to support Python 3.6 We plan to drop it for 3.1.x

    Version 3.0.0rc1

    This is the last pre-release. If everything goes well, I will publish the stable tag.

    3.0.0rc1 (2022-10-18)

    Added

    • Extend the capability of explain=True when cp_isolation contains at most two entries (min one), will log in details of the Mess-detector results
    • Support for alternative language frequency set in charset_normalizer.assets.FREQUENCIES
    • Add parameter language_threshold in from_bytes, from_path and from_fp to adjust the minimum expected coherence ratio

    ... (truncated)

    Changelog

    Sourced from charset-normalizer's changelog.

    3.0.1 (2022-11-18)

    Fixed

    • Multi-bytes cutter/chunk generator did not always cut correctly (PR #233)

    Changed

    • Speedup provided by mypy/c 0.990 on Python >= 3.7

    3.0.0 (2022-10-20)

    Added

    • Extend the capability of explain=True when cp_isolation contains at most two entries (min one), will log in details of the Mess-detector results
    • Support for alternative language frequency set in charset_normalizer.assets.FREQUENCIES
    • Add parameter language_threshold in from_bytes, from_path and from_fp to adjust the minimum expected coherence ratio
    • normalizer --version now specify if current version provide extra speedup (meaning mypyc compilation whl)

    Changed

    • Build with static metadata using 'build' frontend
    • Make the language detection stricter
    • Optional: Module md.py can be compiled using Mypyc to provide an extra speedup up to 4x faster than v2.1

    Fixed

    • CLI with opt --normalize fail when using full path for files
    • TooManyAccentuatedPlugin induce false positive on the mess detection when too few alpha character have been fed to it
    • Sphinx warnings when generating the documentation

    Removed

    • Coherence detector no longer return 'Simple English' instead return 'English'
    • Coherence detector no longer return 'Classical Chinese' instead return 'Chinese'
    • Breaking: Method first() and best() from CharsetMatch
    • UTF-7 will no longer appear as "detected" without a recognized SIG/mark (is unreliable/conflict with ASCII)
    • Breaking: Class aliases CharsetDetector, CharsetDoctor, CharsetNormalizerMatch and CharsetNormalizerMatches
    • Breaking: Top-level function normalize
    • Breaking: Properties chaos_secondary_pass, coherence_non_latin and w_counter from CharsetMatch
    • Support for the backport unicodedata2

    3.0.0rc1 (2022-10-18)

    Added

    • Extend the capability of explain=True when cp_isolation contains at most two entries (min one), will log in details of the Mess-detector results
    • Support for alternative language frequency set in charset_normalizer.assets.FREQUENCIES
    • Add parameter language_threshold in from_bytes, from_path and from_fp to adjust the minimum expected coherence ratio

    Changed

    • Build with static metadata using 'build' frontend
    • Make the language detection stricter

    Fixed

    • CLI with opt --normalize fail when using full path for files
    • TooManyAccentuatedPlugin induce false positive on the mess detection when too few alpha character have been fed to it

    ... (truncated)

    Upgrade guide

    Sourced from charset-normalizer's upgrade guide.

    Guide to upgrade your code from v1 to v2

    • If you are using the legacy detect function, that is it. You have nothing to do.

    Detection

    Before

    from charset_normalizer import CharsetNormalizerMatches
    

    results = CharsetNormalizerMatches.from_bytes( '我没有埋怨,磋砣的只是一些时间。'.encode('utf_32') )

    After

    from charset_normalizer import from_bytes
    

    results = from_bytes( '我没有埋怨,磋砣的只是一些时间。'.encode('utf_32') )

    Methods that once were staticmethods of the class CharsetNormalizerMatches are now basic functions. from_fp, from_bytes, from_fp and `` are concerned.

    Staticmethods scheduled to be removed in version 3.0

    Commits

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    dependencies 
    opened by dependabot[bot] 0
  • Prepare for pytest 8

    Prepare for pytest 8

    Description of problem

    Pytest 7 is out and shows some warnings about what will be deprecated in pytest 8. I'm running this with pytest 7.2.0 and python 3.10.7, and seeing the following:

    rst2pdf/tests/conftest.py:428: 4400 warnings
      /home/lorna/projects/rst2pdf/rst2pdf/tests/conftest.py:428: PytestRemovedIn8Warning: The (fspath: py.path.local) argument to RstFile is deprecated. Please use the (path: pathlib.Path) argument instead.
      See https://docs.pytest.org/en/latest/deprecations.html#fspath-argument-for-node-constructors-replaced-with-pathlib-path
        return RstFile.from_parent(parent=parent, fspath=path)
    
    rst2pdf/tests/conftest.py:430: 624 warnings
      /home/lorna/projects/rst2pdf/rst2pdf/tests/conftest.py:430: PytestRemovedIn8Warning: The (fspath: py.path.local) argument to SphinxFile is deprecated. Please use the (path: pathlib.Path) argument instead.
      See https://docs.pytest.org/en/latest/deprecations.html#fspath-argument-for-node-constructors-replaced-with-pathlib-path
        return SphinxFile.from_parent(parent=parent, fspath=path)
    
    -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
    

    Looks like we need to update some of our path handling.

    opened by lornajane 0
Releases(0.99)
This is PDF Merger Application Developed using Just Python

This is PDF Merger Application Developed using Just Python

Sandeep Kumar Reddy 2 Nov 18, 2021
Split given PDF document into 4 page groups and convert them to booklet format

PUTO: PDF to Booklet converter Split given PDF document into 4 page groups and convert them to booklet format. It creates a PDF like shown below: Fir

3 Mar 12, 2022
Convert MD files to PDF automatically (with CSS) 📄🚀

MD2PDF Action Convert MD files to PDF automatically (with CSS)! Converts a pattern described set of markdown files and converts them to pdf whilst app

Will Fantom 1 Feb 09, 2022
Produce pdf in python backend from simple bootstrap vue frontend and download to browser

vollmacht produce pdf in python backend from simple bootstrap vue frontend and download to browser Frontend in one file with bootstrap-vue (allthough

Otto 1 Nov 08, 2020
Zen-Knit is a formal (PDF), informal (HTML) report generator for data analyst and data scientist who wants to use python.

About Zen-Knit: Zen-Knit is a formal (PDF), informal (HTML) report generator for data analyst and data scientist who wants to use python. Inspired fro

Zen Reportz 27 Jul 13, 2022
A simple Python script to convert multiple images (well technically also a single image) into a pdf.

PythonImage2PDF A simple Python script to convert multiple images into a single PDF-document. Created basically for only my own needs for converting m

Joona Gynther 1 Jun 28, 2022
Converting Html files to pdf using python script, pdfkit module and wkhtmltopdf.

Html-to-pdf-pdfkit-wkhtml- This repository has code for converting local html files and online html resources into pdf. It is an python script which u

Hemachandran P 1 Nov 09, 2021
pystitcher stitches your PDF files together, generating nice customizable bookmarks for you using a declarative markdown file as input

pystitcher pystitcher stitches your PDF files together, generating nice customizable bookmarks for you using a declarative input in the form of a mark

Nemo 387 Dec 10, 2022
DietPDF aims at reducing PDF file size while not degrading quality nor losing metadata

DietPDF aims at reducing PDF file size while not degrading quality nor losing metadata

Frédéric BISSON 6 Jul 27, 2022
Mipdfcompressor - 💕A simple pdf size compressing telegram robot

Pdf Compressor Telegram Bot A simple pdf size compressing telegram robot. Useful for digital documentation. Mandatory Variables API_HASH - Your A

Madhavan Mi 1 Feb 14, 2022
Python bindings for MuPDF's rendering library.

PyMuPDF 1.19.3 Release date: December 15, 2021 On PyPI since August 2016: Author Jorj X. McKie, based on original code by Ruikai Liu. Introduction PyM

Jorj X. McKie 0 Nov 03, 2022
CLI tool to generate pdf invoices written in python

invoicepy CLI invoice tool, store and print invoices as pdf. save companies and customers for later use. installation pip install invoicepy config co

Adam Wojtczak 9 Aug 01, 2022
x-ray is a Python library for finding bad redactions in PDF documents.

A tool to detect whether a PDF has a bad redaction

Free Law Project 73 Dec 19, 2022
minipdf is a package for creating simple, single-page PDF documents.

minipdf minipdf is a package for creating simple, single-page PDF documents. Installation You can install the development version from GitHub with: #

mikefc 41 Dec 19, 2022
Python PDF Parser (Not actively maintained). Check out pdfminer.six.

PDFMiner PDFMiner is a text extraction tool for PDF documents. Warning: As of 2020, PDFMiner is not actively maintained. The code still works, but thi

Yusuke Shinyama 4.9k Jan 04, 2023
Telegram bot that can do a lot of things related to PDF files.

Telegram PDF Bot A Telegram bot that can: Compress, crop, decrypt, encrypt, merge, preview, rename, rotate, scale and split PDF files Compare text dif

130 Dec 26, 2022
WeasyPrint is a smart solution helping web developers to create PDF documents.

WeasyPrint is a smart solution helping web developers to create PDF documents. It turns simple HTML pages into gorgeous statistical reports, invoices, tickets…

Kozea 5.4k Jan 08, 2023
Convert given source code into .pdf with syntax highlighting and more features

Code2pdf 📠 Convert given source code into .pdf with syntax highlighting and more features Build Status Version Downloads Python Demo Installation Bui

Tushar Gautam 343 Jan 05, 2023
Excalibur: A web interface to extract tabular data from PDFs

Excalibur: A web interface to extract tabular data from PDFs Excalibur is a web interface to extract tabular data from PDFs, written in Python 3! It i

1.2k Jan 04, 2023
Python lib for Simple PDF text extraction

Python lib for Simple PDF text extraction

Jason Alan Palmer 651 Jan 01, 2023