PDFMiner python3中文字体库问题,WARNING:root:UniGB-UCS2-H

pdfminer.six支持python3


https://github.com/pdfminer/pdfminer.six

要支持中文字体库可以手动下载,然后按照pdminer添加中文字体库的方法


For CJK languages

In order to process CJK languages, you need an additional step to take during installation:

# make cmap
python tools/conv_cmap.py pdfminer/cmap Adobe-CNS1 cmaprsrc/cid2code_Adobe_CNS1.txt
reading 'cmaprsrc/cid2code_Adobe_CNS1.txt'...
writing 'CNS1_H.py'...
...
(this may take several minutes)

# python setup.py install

On Windows machines which don't have make command, paste the following commands on a command line prompt:

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
pdf2txt.py文件在pdfminer.six-master\tools\pdf2txt.py

你可能感兴趣的:(PDFMiner python3中文字体库问题,WARNING:root:UniGB-UCS2-H)