Compare commits
1 Commits
2706263a4b
...
frontier_3
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
303d55c8a1 |
@@ -712,7 +712,9 @@ def _merge_pdfs_ng(pdf1_path, pdf2_path, output_path):
|
|||||||
# 内部链接:跳转到文档中的某个页面
|
# 内部链接:跳转到文档中的某个页面
|
||||||
dest = action.get("/D") # 目标页或目标位置
|
dest = action.get("/D") # 目标页或目标位置
|
||||||
# if dest and annot.idnum in page2_annot_id:
|
# if dest and annot.idnum in page2_annot_id:
|
||||||
if dest in pdf2_reader.named_destinations:
|
# if dest in pdf2_reader.named_destinations:
|
||||||
|
if dest and page2.annotations:
|
||||||
|
if annot in page2.annotations:
|
||||||
# 获取原始文件中跳转信息,包括跳转页面
|
# 获取原始文件中跳转信息,包括跳转页面
|
||||||
destination = pdf2_reader.named_destinations[
|
destination = pdf2_reader.named_destinations[
|
||||||
dest
|
dest
|
||||||
@@ -781,8 +783,9 @@ def _merge_pdfs_ng(pdf1_path, pdf2_path, output_path):
|
|||||||
}
|
}
|
||||||
)
|
)
|
||||||
# if dest and annot.idnum in page1_annot_id:
|
# if dest and annot.idnum in page1_annot_id:
|
||||||
if dest in pdf1_reader.named_destinations:
|
# if dest in pdf1_reader.named_destinations:
|
||||||
|
if dest and page1.annotations:
|
||||||
|
if annot in page1.annotations:
|
||||||
# 获取原始文件中跳转信息,包括跳转页面
|
# 获取原始文件中跳转信息,包括跳转页面
|
||||||
destination = pdf1_reader.named_destinations[
|
destination = pdf1_reader.named_destinations[
|
||||||
dest
|
dest
|
||||||
|
|||||||
Reference in New Issue
Block a user