Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Some Chinese characters can not be extracted correctly. #566

Closed
mfxss opened this issue Dec 30, 2020 · 0 comments
Closed

Some Chinese characters can not be extracted correctly. #566

mfxss opened this issue Dec 30, 2020 · 0 comments

Comments

@mfxss
Copy link

mfxss commented Dec 30, 2020

Bug report

  • A description of the bug
    With CMAP installed, the output file remained containing Chinese characters as raw cid code (CID:xxx).
    While debuging, I found that PDFPageInterpreter.fontmap['F3'].cid2unicode a dictionary of 200+ items which is obviously not long enough.
    Hope it helps!

image

image

  • Steps to reproduce the bug. Try to minimize the number of steps needed.
    Include the command and/or script that you use. Also include the PDF that
    you use.
    A0095607-010169.pdf
mkdir pdfminer\cmap
python tools\conv_cmap.py -c B5=cp950 -c UniCNS-UTF8=utf-8 pdfminer\cmap Adobe-CNS1 cmaprsrc\cid2code_Adobe_CNS1.txt
python tools\conv_cmap.py -c GBK-EUC=cp936 -c UniGB-UTF8=utf-8 pdfminer\cmap Adobe-GB1 cmaprsrc\cid2code_Adobe_GB1.txt
python tools\conv_cmap.py -c RKSJ=cp932 -c EUC=euc-jp -c UniJIS-UTF8=utf-8 pdfminer\cmap Adobe-Japan1 
 cmaprsrc\cid2code_Adobe_Japan1.txt
python tools\conv_cmap.py -c KSC-EUC=euc-kr -c KSC-Johab=johab -c KSCms-UHC=cp949 -c UniKS-UTF8=utf-8 pdfminer\cmap Adobe-Korea1 cmaprsrc\cid2code_Adobe_Korea1.txt
python setup.py install

python tools/pdf2txt.py -c utf8/gbk/no matter what -o output.html samples/A0095607-010169.pdf

wind-chh pushed a commit to wind-chh/pdfminer.six that referenced this issue Feb 26, 2021
wind-chh pushed a commit to wind-chh/pdfminer.six that referenced this issue Feb 26, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant