mirror of
https://github.com/jsvine/pdfplumber.git
synced 2026-08-30 00:50:24 +08:00
Add convert.py/.to_json/.to_csv & improve testcov
Moves most of the logic previously in cli.py to convert.py, for usage by other submodules. Adds Container.to_json and Container.to_csv. Makes adjustments/fixes to other parts of the library, based on edge-cases encountered (such as infinite recursion in anntations).
This commit is contained in:
@@ -41,6 +41,7 @@ class Test(unittest.TestCase):
|
||||
annot = self.pdf.annots[0]
|
||||
annot_ad0 = utils.resolve(annot["data"]["A"]["D"][0])
|
||||
assert annot_ad0["MediaBox"] == [0, 0, 612, 792]
|
||||
assert utils.resolve(1) == 1
|
||||
|
||||
def test_resolve_all(self):
|
||||
info = self.pdf.doc.xrefs[0].trailer["Info"]
|
||||
|
||||
Reference in New Issue
Block a user