hrynko / vue-pdf-embed

PDF embed component for Vue 2 and Vue 3
https://npmjs.com/package/vue-pdf-embed
MIT License
740 stars 111 forks source link

how to show the pdf which has chineses font #42

Closed zww7821270 closed 2 years ago

zww7821270 commented 2 years ago

I make a pdf, use vue-pdf-embed in vue3 project ,it can not show the pdf which has chineses well, chineses font are all lost.

hrynko commented 2 years ago

Hi @zww7821270,

Could you provide a sample PDF that you are having issues with? So far, I haven't noticed any problems when displaying documents containing Chinese characters.

zww7821270 commented 2 years ago

I send two files, template6.pdf is the template which does not has the values , it is only PDF form input fileds,I use JAVA itext to set values into the form input fileds for make 2206110100101.pdf; then I use our vue-pdf-embed to show the 2206110100101.pdf, it does not show the value that I set to the input fields, so I create the issus for your help , thank you  (I am not sure if I explained it  clearly)

------------------ 原始邮件 ------------------ 发件人: "hrynko/vue-pdf-embed" @.>; 发送时间: 2022年6月8日(星期三) 上午6:49 @.>; @.**@.>; 主题: Re: [hrynko/vue-pdf-embed] how to show the pdf which has chineses font (Issue #42)

Hi @zww7821270,

Could you provide a sample PDF that you are having issues with? So far, I haven't noticed any problems when displaying documents containing Chinese characters.

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you were mentioned.Message ID: @.***>

zww7821270 commented 2 years ago

ok, I sended to your email,please find

hrynko commented 2 years ago

I couldn't find the message with sample files. But it seems that the problem is the lack of input data, not the display of Chinese characters, right?

hrynko commented 2 years ago

Can you post your anonymized sample files here in base64?

guifw commented 2 years ago

I have the same issue in Chromium; "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/68.0.3405.0 Safari/537.36"

image

template.pdf

hrynko commented 2 years ago

Hi @sea-caterpillar,

Thank you for the sample file, I will check the problem.

hrynko commented 2 years ago

I checked the provided file and couldn't reproduce the issue. Please see Fiddle.

Could you provide more details on which environment/versions you are using? Or maybe provide a JSFiddle/Codesandbox/etc to demonstrate the issue?

guifw commented 2 years ago

@hrynko The problem still exists using your example;

image

Browsers version "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/68.0.3405.0 Safari/537.36"

hrynko commented 2 years ago

Hmm, looks very browser/system specific. I tried a few but could never reproduce. Do you experience any font issues outside the library?

guifw commented 2 years ago

Do you experience any font issues outside the library?

No;

But I found the Word to PDF applications affected me; WPS Office: ❌ PDF Candy: ✔

hrynko commented 2 years ago

Sorry, I don't get it. What do you mean by "affecting" you?

guifw commented 2 years ago

Under the same browser version, the fonts of PDF files exported by WPS Office will be lost, but the fonts of PDF files exported by PDF Candy are normal. I found it by accident. I don't know why.

bad.pdf good.pdf

hrynko commented 2 years ago

I don't know why either 🙂

I have both documents displayed without any problems

guifw commented 2 years ago

Thank you for your reply, I will check the reason later

hrynko commented 2 years ago

Hi @sea-caterpillar,

I'm closing the issue as it is not clear if anything needs to be fixed there, although I would appreciate if you reopen it when you have more details, thanks.