mirror of
https://github.com/zen-browser/pdf.js.git
synced 2025-07-09 09:45:42 +02:00
Allow loading pdf fonts into another document.
This commit is contained in:
parent
fea40442f7
commit
ac723a1760
5 changed files with 166 additions and 19 deletions
|
@ -521,6 +521,7 @@ var renderTextLayer = (function renderTextLayerClosure() {
|
|||
this._textContent = textContent;
|
||||
this._textContentStream = textContentStream;
|
||||
this._container = container;
|
||||
this._document = container.ownerDocument;
|
||||
this._viewport = viewport;
|
||||
this._textDivs = textDivs || [];
|
||||
this._textContentItemsStr = textContentItemsStr || [];
|
||||
|
@ -625,7 +626,7 @@ var renderTextLayer = (function renderTextLayerClosure() {
|
|||
let styleCache = Object.create(null);
|
||||
|
||||
// The temporary canvas is used to measure text length in the DOM.
|
||||
const canvas = document.createElement("canvas");
|
||||
const canvas = this._document.createElement("canvas");
|
||||
if (
|
||||
typeof PDFJSDev === "undefined" ||
|
||||
PDFJSDev.test("MOZCENTRAL || GENERIC")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue