From 2a56ba45b0a047ee676b2f84a4d16c20251dff30 Mon Sep 17 00:00:00 2001 From: "Jorj X. McKie" Date: Mon, 17 Apr 2023 11:29:38 -0400 Subject: [PATCH] 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. --- fitz/utils.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/fitz/utils.py b/fitz/utils.py index fcf37967e..a859ac785 100644 --- a/fitz/utils.py +++ b/fitz/utils.py @@ -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)