Skip to content

Commit 2a56ba4

Browse files
JorjMcKiejulian-smith-artifex-com
authored andcommitted
Fixing #2345
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.
1 parent 3bae451 commit 2a56ba4

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

fitz/utils.py

+1-3
Original file line numberDiff line numberDiff line change
@@ -1579,9 +1579,7 @@ def cre_annot(lnk, xref_dst, pno_src, ctm):
15791579
if l["kind"] == LINK_GOTO and (l["page"] not in pno_src):
15801580
continue # GOTO link target not in copied pages
15811581
annot_text = cre_annot(l, xref_dst, pno_src, ctm)
1582-
if not annot_text:
1583-
print("cannot create /Annot for kind: " + str(l["kind"]))
1584-
else:
1582+
if annot_text:
15851583
link_tab.append(annot_text)
15861584
if link_tab != []:
15871585
page_dst._addAnnot_FromString(link_tab)

0 commit comments

Comments
 (0)