MCPcopy Index your code
hub / github.com/pymupdf/PyMuPDF / merge_pdf

Function merge_pdf

tests/test_memory.py:9–14  ·  view source on GitHub ↗
(content: bytes, coverpage: bytes)

Source from the content-addressed store, hash-verified

7
8
9def merge_pdf(content: bytes, coverpage: bytes):
10 with pymupdf.Document(stream=coverpage, filetype='pdf') as coverpage_pdf:
11 with pymupdf.Document(stream=content, filetype='pdf') as content_pdf:
12 coverpage_pdf.insert_pdf(content_pdf)
13 doc = coverpage_pdf.write()
14 return doc
15
16def test_2791():
17 '''

Callers 1

test_2791Function · 0.85

Calls 2

insert_pdfMethod · 0.80
writeMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…