mirror of
https://github.com/mozilla/pdf.js.git
synced 2026-04-10 07:14:04 +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")),
|
||||
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")),
|
||||
]);
|
||||
}
|
||||
|
||||
@ -851,10 +851,15 @@ async function openDocument(source, name) {
|
||||
|
||||
const loadingTask = getDocument({
|
||||
...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/",
|
||||
iccUrl: "../external/iccs/",
|
||||
standardFontDataUrl: "../external/standard_fonts/",
|
||||
useWorkerFetch: true,
|
||||
pdfBug: true,
|
||||
CanvasFactory: DebugCanvasFactory,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user