Skip to content

Conversation

@pull
Copy link

@pull pull bot commented Jun 17, 2022

See Commits and Changes for more details.


Created by pull[bot]

Can you help keep this open source service alive? 💖 Please sponsor : )

julian-smith-artifex-com and others added 23 commits June 16, 2022 00:55
Mupdf-1.20 changes linkDest.uri format from '#<int>,<int>,<int>' to
'#page=<int>&zoom=<float>,<float>,<float>'.

Have put new reference output into file tests/resources/joined-1.20.pdf, and
updated tests/test_insertpdf.py:test_joining() to check generated data with the
new file. We also check that generated data is approximately the same as the
older reference file tests/resources/joined.pdf, allowing numbers to differ by
up to 1.5.
Force use of specific release of MuPDF when building PyMuPDF.
    We hardcode the URL of the specific release of MuPDF that we require, and
    builds always use this downloaded MuPDF.

    One can override to use a different URL or a local mupdf or the system
    mupdf, by setting various environmental variables - see comment at start of
    setup.py.

    When building sdist, download MuPDF release and include in sdist as file
    mupdf.tgz. This makes sdist's self-contained. We also include test files.

    When building binaries:
        If not in an sdist, download MuPDF release to local mupdf.tgz file.

        Extract and build MuPDF from mupdf.tgz file and set up paths for
        setuptools to use the MuPDF we have built.

Include test files in sdists and wheels and when installing:
    We install tests/* as PyMuPDF-data/tests/*.

    This allows testing of wheel by cibuildwheel with:
        CIBW_TEST_REQUIRES=pytest fontTools
        CIBW_TEST_COMMAND='pytest {package}/tests'

Building MuPDF:
    Added support for controlling mupdf build type (release, debug, memento) on
    Unix.

    When building MuPDF on Windows, search for devenv.com using glob.glob() so
    we work on more systems.

    Support building on OpenBSD.
Fixed description of pip installation from source - we no longer require
pre-installation of MuPDF.

Updated to require Python 3.7, not 3.6.

Fixed various typos and version number updates.

docs/conf.py: Changed 'Jorj X. McKie' to 'Artifex.

README.md:
    Fixed copyright symbol in raw html output from markdown_py.

    markdown_py doesn't output html headers etc so raw output doesn't contain
    encoding information, so unicode characters don't work. This isn't
    generally a problem because github and pypi.org etc add to the raw output.

    But to allow the raw output to show correctly, we now use html-style &copy;
    for copyright symbol.
This commit ensures that the new PyMuPDF logo is used
for both the README and the documentation.
The old logo has been deleted/replaced where appropriate.
Additionally the sphinx docs have been updated to
include a custom stylesheet and some colors & layout
have been adjusted for better accessibility.
As it turns out these files are auto-generated by Sphinx,
unless overridden by your own version of what you put in
"_static". Whatever was there generated a faulty
searchindex.js and possibly some other things.
pdf_new_graft_map() returns with refs=1, so we shouldn't call
pdf_keep_graft_map().
Updated version to 1.20.0rc2 and default to use mupdf-1.20.0 release.

Reworked control of how to build mupdf:
    To force build to use system mupdf, set PYMUPDF_SETUP_MUPDF_BUILD to empty
    string.

    Renamed environmental variable PYMUPDF_SETUP_MUPDF_SDIST to
    PYMUPDF_SETUP_MUPDF_TGZ.

    Fixed use of MuPDF Memento builds on OpenBSD.
We were repeatedly calling fz_drop_document() until .ref reached zero, but this
will invalidate any other pointer to the same fz_document, potentially causing
SEGVs etc.

This might have been exposed by recent fix for leak of pdf_graft_map - we will
now be calling pdf_drop_graft_map() where we didn't before, which in turn will
call pdf_drop_document() where we didn't before, giving SEGV if document has
already been incorrectly freed.
…y check that fds are not being leaked.

This test already repeatedly opens and closes a document; added an assert that
checks os.open() returns the same integer each time. This directly checks that
we are not leaking fds, rather than rely on running out of fds.
Also updated minimum python version from 3.6 to 3.7 to match the wheels we
build.
@pull pull bot added the ⤵️ pull label Jun 17, 2022
jamie-lemon and others added 6 commits June 20, 2022 17:14
This gives the docs:
1) Color updates for accessibility & dark mode
2) Improved font
3) Fixes search
4) Sticky sidebar
- Also includes README with notes about building the docs
This should hopefully allow readthedocs to import the 
module and successfully build
We need to explicitly link with the system's freetype and harfbuzz libraries.

Thanks to Denis Shaposhnikov (@dsh2dsh) for investigating this.
- Removes the incomplete "Known Issues"
section and uses a note to briefly explain
HTML/CSS support.
docs/samples/filmfestival-sql.py
    Assert that .db file exists, because otherwise `sqlite3` will create empty
    database.
docs/samples/quickfox.py
    Cope if pymupdf-fonts is not available.
docs/samples/showpdf-page.py
    Define paths relative to __file__ so we run anywhere.
- Removes stories-api.rst and supplants
info into the header of xml-class.rst
- Removes any references to stories-api.rst
- Tidies up URL links in tutorial.rst
- Fixes footnotes in story-class.rst to match
how we do footnotes elsewhere
- Changes URL link to mupdf.com to https
- A couple of cosmetic issues
- Tweaks wording in tutorial.rst around the
 Xml class description
- Includes missing parameters for the some of
the functions in the Xml class.
- Incudes Story recipe with a layout 
respecting a "no go area".
- Incudes Story recipe which loads some
JSON data for use with a list layout.
Instead of listing samples to run, we list samples to exclude, so that new
samples are tested by default.
Fixed some scripts to use paths relative to `__file__`.

text-lister.py: use `sys.argv[1]` instead of file not in git.
This allows things to work with recently-updated MuPDF master.
fitz/helper-python.i:
    ElementPosition: added __str__().

fitz/helper-other.i:
    Story_Callback(): add new `.href` member. Matches recent addition to mupdf.

fitz/fitz.i:
    Story: added new fns giving alternative API for creating documents.
    Story.draw(), allow `device` to be NULL.
Removed default assignee JorjMcKie.

.github/ISSUE_TEMPLATE/bug_report.md: removed default `labels: bug` - better to
only add this label when/if the issue is shown to be a bug, instead of a user
error.
The PDF specification explicitly says that after "a" to "b", the numbering follows "aa", "bb", ..., "zz" and not "ab", "ab", "az", "ba",...
59d6599 should be reverted
We should support two different parameters, the HTML "href" value, which refers to the link target, and independently the text that is visible to the user.

Also document that `Xml.add_paragraph()` isa context manager.
The link target must always be specified. Only the its display in the text is optional.
@pull pull bot merged commit 8a6721e into kp-forks:master Dec 21, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants