Skip to content

Commit

Permalink
Fixing #2345
Browse files Browse the repository at this point in the history
Previously we displayed error messages (Python `print()`) if a link could not be replicated on the target page within method `doc.insert_pdf()`.

As the method has no way to provide more information on the problem's cause, and hence cannot provide information on how to fix the problems, the messages make no sense and will be omitted.
  • Loading branch information
JorjMcKie authored and julian-smith-artifex-com committed Apr 18, 2023
1 parent 3bae451 commit 2a56ba4
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions fitz/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -1579,9 +1579,7 @@ def cre_annot(lnk, xref_dst, pno_src, ctm):
if l["kind"] == LINK_GOTO and (l["page"] not in pno_src):
continue # GOTO link target not in copied pages
annot_text = cre_annot(l, xref_dst, pno_src, ctm)
if not annot_text:
print("cannot create /Annot for kind: " + str(l["kind"]))
else:
if annot_text:
link_tab.append(annot_text)
if link_tab != []:
page_dst._addAnnot_FromString(link_tab)
Expand Down

0 comments on commit 2a56ba4

Please sign in to comment.