mirror of
https://github.com/mozilla/pdf.js.git
synced 2026-07-05 06:35:48 +02:00
Merge pull request #20865 from Snuffleupagus/internal-viewer-urls
Bundle the necessary files and set the correct `cMapUrl`, `iccUrl`, and `standardFontDataUrl` when building `gulp internal-viewer`
This commit is contained in:
commit
f4c6fff759
@ -2403,6 +2403,9 @@ function buildInternalViewer(defines, dir) {
|
|||||||
])
|
])
|
||||||
)
|
)
|
||||||
.pipe(gulp.dest(dir + "web")),
|
.pipe(gulp.dest(dir + "web")),
|
||||||
|
createCMapBundle().pipe(gulp.dest(dir + "web/cmaps")),
|
||||||
|
createICCBundle().pipe(gulp.dest(dir + "web/iccs")),
|
||||||
|
createStandardFontBundle().pipe(gulp.dest(dir + "web/standard_fonts")),
|
||||||
createWasmBundle().pipe(gulp.dest(dir + "web/wasm")),
|
createWasmBundle().pipe(gulp.dest(dir + "web/wasm")),
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -851,10 +851,15 @@ async function openDocument(source, name) {
|
|||||||
|
|
||||||
const loadingTask = getDocument({
|
const loadingTask = getDocument({
|
||||||
...source,
|
...source,
|
||||||
cMapUrl: "../external/bcmaps/",
|
cMapUrl:
|
||||||
|
typeof PDFJSDev === "undefined" ? "../external/bcmaps/" : "../web/cmaps/",
|
||||||
|
iccUrl:
|
||||||
|
typeof PDFJSDev === "undefined" ? "../external/iccs/" : "../web/iccs/",
|
||||||
|
standardFontDataUrl:
|
||||||
|
typeof PDFJSDev === "undefined"
|
||||||
|
? "../external/standard_fonts/"
|
||||||
|
: "../web/standard_fonts/",
|
||||||
wasmUrl: "../web/wasm/",
|
wasmUrl: "../web/wasm/",
|
||||||
iccUrl: "../external/iccs/",
|
|
||||||
standardFontDataUrl: "../external/standard_fonts/",
|
|
||||||
useWorkerFetch: true,
|
useWorkerFetch: true,
|
||||||
pdfBug: true,
|
pdfBug: true,
|
||||||
CanvasFactory: DebugCanvasFactory,
|
CanvasFactory: DebugCanvasFactory,
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user