-
Notifications
You must be signed in to change notification settings - Fork 66
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
pdf无法展示全 #1
Comments
已经修复,并已经将代码更新到项目中。原因是pdf.js不能识别文档中的某些特殊字体。 |
我早就已经解决了,你没用最新的官方的demo去做,自己YY了一套代码
this.pdfData = atob(reader.result.substring(reader.result.indexOf(',') + 1))
let CMAP_URL = 'https://cdn.jsdelivr.net/npm/pdfjs-dist@2.0.943/cmaps/' // 'https://unpkg.com/pdfjs-dist@2.0.943/cmaps/'
// 读取base64的pdf流文件
this.loadingTask = PDFJS.getDocument({
data: this.pdfData, // PDF base64编码
cMapUrl: CMAP_URL,
cMapPacked: true
})
…------------------ 原始邮件 ------------------
发件人: "xiangxl"<notifications@github.com>;
发送时间: 2020年6月1日(星期一) 中午11:36
收件人: "xxlllq/pdf2img"<pdf2img@noreply.github.com>;
抄送: "楠枫di⑥感"<493683987@qq.com>; "Author"<author@noreply.github.com>;
主题: Re: [xxlllq/pdf2img] pdf无法展示全 (#1)
2-2020年5月26日语文周测试卷.pdf
已经修复,并已经将代码更新到项目中。原因是pdf.js不能识别文档中的字体。
通过如下代码即可以解决:
PDFJS.cMapUrl = 'https://cdn.jsdelivr.net/npm/pdfjs-dist@2.0.288/cmaps/';
PDFJS.cMapPacked = true;
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or unsubscribe.
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
2-2020年5月26日语文周测试卷.pdf
The text was updated successfully, but these errors were encountered: