mirror of
https://github.com/zen-browser/pdf.js.git
synced 2025-07-08 01:10:08 +02:00
Merge pull request #18218 from nicolo-ribaudo/test-maxCanvasPixels
Respect `maxCanvasPixels` when computing canvas dimensions
This commit is contained in:
commit
3e1d779859
4 changed files with 187 additions and 62 deletions
|
@ -38,8 +38,13 @@ function loadAndWait(filename, selector, zoom, pageSetup, options) {
|
|||
|
||||
let app_options = "";
|
||||
if (options) {
|
||||
const optionsObject =
|
||||
typeof options === "function"
|
||||
? await options(page, session.name)
|
||||
: options;
|
||||
|
||||
// Options must be handled in app.js::_parseHashParams.
|
||||
for (const [key, value] of Object.entries(options)) {
|
||||
for (const [key, value] of Object.entries(optionsObject)) {
|
||||
app_options += `&${key}=${encodeURIComponent(value)}`;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue