pdf2json icon indicating copy to clipboard operation
pdf2json copied to clipboard

pdfjson not generate js file when using Chinese spdf

Open aravindforums1 opened this issue 7 years ago • 1 comments

I don’t know where I contact regarding pdfjson problem in ‘js’ generating file, My problem is when passing SPDF with Chinese language, the output ‘js’ file only contain diamonds and some places empty instead of wording, here I attach sample file and out js file screenshot.

untitled S17032217290.pdf

This is i run using cmd prompt and i will get 'No font show' or 'unknow font tag F1' untitled

I am using this parameter for generate ‘js’ file.

process.StandardInput.WriteLine("cd " & ConfigurationManager.AppSettings("PDF2JSONPath").ToString) process.StandardInput.WriteLine("pdf2json.exe """ & actualFilePath & """ -enc UTF-8 -hidden -compress """ & viewPath & "" & dynamicFLXname & ".js""")

Is it support multi language ?

Regards Aravind

aravindforums1 avatar Mar 24 '17 08:03 aravindforums1

you can install poppler-util and use pdffonts tool to detect the pdf file at first right now if you get something like this

root@6334724bdee5:/tmp# pdffonts 1.pdf
name                                 type              encoding         emb sub uni object ID
------------------------------------ ----------------- ---------------- --- --- --- ---------
SRPUEP+SimSun                        TrueType          WinAnsi          yes yes yes     13  0

chinese characters could not be encoded by winAnsi ,so it is broken someway. you can not deal this kind pdf through pdf2json which rely on old version pdf.js

wanghaisheng avatar Jul 06 '17 12:07 wanghaisheng