Ejemplo n.º 1
0
def test_issue301():
    """
    Test with invalid stream length object
    """
    with open(os.path.join(RESOURCE_ROOT, "issue-301.pdf"), "rb") as f:
        reader = PdfReader(f)
        writer = PdfWriter()
        writer.append_pages_from_reader(reader)
        o = BytesIO()
        writer.write(o)
Ejemplo n.º 2
0
def pdf_file_writer():
    reader = PdfReader(os.path.join(RESOURCE_ROOT, "crazyones.pdf"))
    writer = PdfWriter()
    writer.append_pages_from_reader(reader)
    return writer