Coder Social home page Coder Social logo

中文乱码? about pdf2docx HOT 5 CLOSED

artifexsoftware avatar artifexsoftware commented on September 14, 2024
中文乱码?

from pdf2docx.

Comments (5)

dothinking avatar dothinking commented on September 14, 2024 1

看到 #63 提供的测试文件,才理解你的问题。

pdf2docx是靠上游python库PyMuPDF提取PDF内容的,PyMuPDF本身支持中文,但是某些PDF文件可能缺少cmaps表——将CJK(中日韩)字符映射到unicode字符的规则,结果导致无法正确获取文本。

I have multiple pdf files without 'toUnicode' cmap table. Absence of cmap table restricts me from copying the text from pdf files.

For some fonts in some PDFs some characters cannot be extracted correctly, because their CMap / ToUnicode doesn't make sense or is incomplete

PyMuPDF项目相关的issue:

由于是PDF自身的问题,且尚未发现通用的解决方案,pdf2docx对这个问题无法提供支持。

from pdf2docx.

JorjMcKie avatar JorjMcKie commented on September 14, 2024 1

Just as a comment from the outside:
This type of problem can only be solved by using an OCR program like Tesseract. There is Python repo available, which does a good job on this: https://github.com/jbarlow83/OCRmyPDF, I have tried it myself.

There also is a way to incorporate Tesseract directly in MuPDF v1.18.0 (which I do not use yet in PyMuPDF).

from pdf2docx.

dothinking avatar dothinking commented on September 14, 2024

方便提供测试文件吗?

from pdf2docx.

opvexe avatar opvexe commented on September 14, 2024

image

from pdf2docx.

dothinking avatar dothinking commented on September 14, 2024

你这是图片,目前不支持扫描文件的转换

from pdf2docx.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.