From 6b348a0940d5bb8c9dc25501af535b63c03ae759 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Wed, 1 Jan 2020 12:45:20 +0530 Subject: [PATCH] PDF Output: Fix extracting text from generated PDFs not working if more than 100 characters per font are used in the text. Fixes #1857886 [Convert epub to pdf, pdf appearance looks correct, but some of the copied text is incorrect](https://bugs.launchpad.net/calibre/+bug/1857886) --- src/calibre/ebooks/pdf/html_writer.py | 1 - 1 file changed, 1 deletion(-) diff --git a/src/calibre/ebooks/pdf/html_writer.py b/src/calibre/ebooks/pdf/html_writer.py index 4f5825a865..76ecf3b847 100644 --- a/src/calibre/ebooks/pdf/html_writer.py +++ b/src/calibre/ebooks/pdf/html_writer.py @@ -799,7 +799,6 @@ class CMap(object): lines = ['1 begincodespacerange', '<{}> <{}>'.format(*map(ashex, (self.start_codespace, self.end_codespace))), 'endcodespacerange'] while chars: group, chars = chars[:100], chars[100:] - del chars[:100] lines.append('{} beginbfchar'.format(len(group))) for g in group: lines.append('<{}> <{}>'.format(*map(ashex, g)))