MCPcopy Create free account
hub / github.com/OpenRaiser/PaperFlow / _create_pdf

Function _create_pdf

experiments/tests/test_pdf_parser.py:19–26  ·  view source on GitHub ↗
(tmp_path: Path, text: str)

Source from the content-addressed store, hash-verified

17
18
19def _create_pdf(tmp_path: Path, text: str) -> str:
20 pdf_path = tmp_path / "sample.pdf"
21 doc = fitz.open()
22 page = doc.new_page()
23 page.insert_textbox(fitz.Rect(48, 48, 560, 780), text, fontsize=12)
24 doc.save(pdf_path)
25 doc.close()
26 return str(pdf_path)
27
28
29def test_extract_metadata_ignores_numbered_heading_as_authors():

Calls 1

closeMethod · 0.45

Tested by

no test coverage detected