forked from pymupdf/PyMuPDF
-
Notifications
You must be signed in to change notification settings - Fork 0
[pull] master from pymupdf:master #3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 ©
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.
…st with each wheel.
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.
Thanks to @JackieFei for bug report.
- Also adds fix for issue #1975
- Removes the incomplete "Known Issues" section and uses a note to briefly explain HTML/CSS support.
50202c0 to
06669c0
Compare
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
…rnal Links section
- 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.
…rc1-source.tar.gz.
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.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
See Commits and Changes for more details.
Created by
pull[bot]
Can you help keep this open source service alive? 💖 Please sponsor : )