Files
pdfplumber/tests/pdfs/issue-842-example.pdf
Jeremy Singer-Vine 9441ff7628 Handle bytes-typed fontnames (fixes #461 + #842)
Came across this bit of code, which helps to solve some of the mystery
in issues #461 and #842:

https://git.ghostscript.com/?p=mupdf.git;a=blob;f=source/pdf/pdf-font.c;h=6322cedf2c26cfb312c0c0878d7aff97b4c7470e;hb=HEAD#l774

Now, for every char's fontname, we:

- Check whether its a `str` or `byte`
    - If the latter, we check whether it's one of the well-known codes from
      the link above
        - If so, we use that (preserving the part, if present, before
          the `+`)
        - If not, we just cast to str
2023-04-13 08:13:16 -04:00

281 KiB