From 48774a18ed5a1172ee541b5f59f604818074ca38 Mon Sep 17 00:00:00 2001 From: aoking Date: Fri, 12 Jan 2024 23:16:08 +0900 Subject: [PATCH] Fix #934: Create correct cidcoding name (#935) Co-authored-by: Pieter Marsman --- CHANGELOG.md | 1 + pdfminer/pdffont.py | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d3642f30..4bf779bb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). - Resolving mediabox and pdffont ([#834](https://github.com/pdfminer/pdfminer.six/pull/834)) - Keywords that aren't terminated by the pattern `END_KEYWORD` before end-of-stream are parsed ([#885](https://github.com/pdfminer/pdfminer.six/pull/885)) - `ValueError` wrong error message when specifying codec for text output ([#902](https://github.com/pdfminer/pdfminer.six/pull/902)) +- Reading cmap's with whitespace in the name ([#935](https://github.com/pdfminer/pdfminer.six/pull/935)) ## [20231228] diff --git a/pdfminer/pdffont.py b/pdfminer/pdffont.py index 118b9a0e..248c8c6b 100644 --- a/pdfminer/pdffont.py +++ b/pdfminer/pdffont.py @@ -1063,7 +1063,7 @@ def __init__( cid_ordering = resolve1(self.cidsysteminfo.get("Ordering", b"unknown")).decode( "latin1" ) - self.cidcoding = "{}-{}".format(cid_registry, cid_ordering) + self.cidcoding = "{}-{}".format(cid_registry.strip(), cid_ordering.strip()) self.cmap: CMapBase = self.get_cmap_from_spec(spec, strict) try: