Add test case for Type3 fonts with no Unicode mapping
This commit is contained in:
@@ -149,6 +149,11 @@ licensed under the specified license.
|
||||
- @jbarlow83
|
||||
- @jbarlow83
|
||||
- CC-BY-SA 4.0
|
||||
* - type3_font_nomapping.pdf
|
||||
- example of a PDF with an embedded subsetted TrueType font with no Unicode mapping
|
||||
- @jbarlow83
|
||||
- @jbarlow83
|
||||
- CC-BY-SA 4.0
|
||||
* - vector.pdf
|
||||
- a PDF with vector art and text rendered as curves with no fonts
|
||||
- @Catscratch
|
||||
|
||||
Binary file not shown.
@@ -185,8 +185,11 @@ def test_ocr_detection(resources):
|
||||
assert pdf[0].has_text
|
||||
|
||||
|
||||
def test_corrupt_font_detection(resources):
|
||||
filename = resources / 'truetype_font_nomapping.pdf'
|
||||
@pytest.mark.parametrize(
|
||||
'testfile', ('truetype_font_nomapping.pdf', 'type3_font_nomapping.pdf')
|
||||
)
|
||||
def test_corrupt_font_detection(resources, testfile):
|
||||
filename = resources / testfile
|
||||
with pytest.raises(NotImplementedError):
|
||||
pdf = pdfinfo.PdfInfo(filename)
|
||||
pdf[0].has_corrupt_text
|
||||
|
||||
Reference in New Issue
Block a user