Skip to content

Implement font switching #13

Description

@wyatt-wong

I have a document with an image and some text description below. When I replace the text and write to a new PDF file, I found the replaced text becomes a square with an X inside which looks like below, why ?

The original text is "To," and the replaced text is "Ti,". Notice not only "i" was incorrectly changed to a square with an X, the comma that follows the text is also missing.

Image

However, when I used pypdf to read the generated PDF file and then use reader.pages[0].extract_text(), I saw the text was properly replaced as "Ti," without any problems.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions