Skip to content
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

Multiple Fixes of open Issues #2091

Closed
wants to merge 5 commits into from
Closed

Multiple Fixes of open Issues #2091

wants to merge 5 commits into from

Conversation

JorjMcKie
Copy link
Collaborator

Fixes for
#2087, #2088, #2086

Additional safeguard when field is being deleted via `page.delete_widget()`:
In this case, the underlying annotation may not have been re-established (attribute "_annot"), which will there for be checked.
Python C function `Py_BuildValue("s", fontname)` will fail if fontname is not UTF8-encoded.
Use PyUnicodeRawEscape function for fontnames instead - like everywhere else in PyMuPDF.
helper-annot.i (JM_get_annot_xref_list):
Only include actual annotations in list - no longer "null" objects, etc.
Refers to #2063

helper-python.i (class linkDest):
Treat "&zoom=nan" string in `uri` like "&zoom=0".

helper-stext.i (various):
* Replace font ascender / descender returns with sane values when necessary.

* JM_char_quad:
Guard against rectangles transformed from quads that are not completely located in the positive quadrant.
This may happen with incorrectly interpretated Type 3 fonts.
fitz.i (Document.extract_image):
If multiple filters for image streams are present, function `pdf_load_stream()` must be used instead of `pdf_load_raw_stream()` to determine the image type.
For correctly detecting a rectangle,  the equality of x- and y-coordinates of the respective 4 corners must be confirmed.
We did not check x-coordinates.
@JorjMcKie
Copy link
Collaborator Author

Added fix for #2094.

@JorjMcKie JorjMcKie closed this Nov 30, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant