Files
pdfmajor/tests/test_xref.py
T
2020-10-23 22:17:50 -04:00

16 lines
444 B
Python

from pathlib import Path
from unittest import TestCase
from pdfmajor.streambuffer import BufferStream
from pdfmajor.parser.xref import iter_over_xref
CURRENT_FOLDER = Path(__file__).parent
class Standard(TestCase):
def test_char_doc(self):
with (CURRENT_FOLDER / "samples" / "pdf" / "chars.pdf").open("rb") as fp:
buffer = BufferStream(fp)
for xref in iter_over_xref(buffer):
print(xref)