diff --git a/tests/test_merger.py b/tests/test_merger.py index beba5cdad..a320e8472 100644 --- a/tests/test_merger.py +++ b/tests/test_merger.py @@ -207,3 +207,39 @@ def test_bookmark(): # cleanup os.remove("tmp-merger-do-not-commit.pdf") + + +def test_trim_outline(): + url = "https://corpora.tika.apache.org/base/docs/govdocs1/982/982336.pdf" + name = "tika-982336.pdf" + reader = PdfReader(BytesIO(get_pdf_from_url(url, name=name))) + merger = PdfMerger() + merger.append(reader) + merger.write("tmp-merger-do-not-commit.pdf") + + # cleanup + os.remove("tmp-merger-do-not-commit.pdf") + + +def test1(): + url = "https://corpora.tika.apache.org/base/docs/govdocs1/923/923621.pdf" + name = "tika-923621.pdf" + reader = PdfReader(BytesIO(get_pdf_from_url(url, name=name))) + merger = PdfMerger() + merger.append(reader) + merger.write("tmp-merger-do-not-commit.pdf") + + # cleanup + os.remove("tmp-merger-do-not-commit.pdf") + + +def test2(): + url = "https://corpora.tika.apache.org/base/docs/govdocs1/924/924546.pdf" + name = "tika-924546.pdf" + reader = PdfReader(BytesIO(get_pdf_from_url(url, name=name))) + merger = PdfMerger() + merger.append(reader) + merger.write("tmp-merger-do-not-commit.pdf") + + # cleanup + os.remove("tmp-merger-do-not-commit.pdf") diff --git a/tests/test_writer.py b/tests/test_writer.py index 5c034e269..38a612d0f 100644 --- a/tests/test_writer.py +++ b/tests/test_writer.py @@ -471,3 +471,15 @@ def test_sweep_indirect_references_nullobject_exception(): # cleanup os.remove("tmp-merger-do-not-commit.pdf") + + +def test_write_bookmark_on_page_fitv(): + url = "https://corpora.tika.apache.org/base/docs/govdocs1/922/922840.pdf" + name = "tika-922840.pdf" + reader = PdfReader(BytesIO(get_pdf_from_url(url, name=name))) + merger = PdfMerger() + merger.append(reader) + merger.write("tmp-merger-do-not-commit.pdf") + + # cleanup + os.remove("tmp-merger-do-not-commit.pdf")