mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-20 15:18:08 +02:00
Merge pull request #10898 from Snuffleupagus/firefox-print-resolution
Allow experimenting with the `printResolution` AppOption when printing with the built-in Firefox version
This commit is contained in:
commit
7348275094
1 changed files with 2 additions and 1 deletions
|
@ -13,6 +13,7 @@
|
|||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { AppOptions } from './app_options';
|
||||
import { CSS_UNITS } from './ui_utils';
|
||||
import { PDFPrintServiceFactory } from './app';
|
||||
import { shadow } from 'pdfjs-lib';
|
||||
|
@ -22,7 +23,7 @@ function composePage(pdfDocument, pageNumber, size, printContainer) {
|
|||
let canvas = document.createElement('canvas');
|
||||
|
||||
// The size of the canvas in pixels for printing.
|
||||
const PRINT_RESOLUTION = 150;
|
||||
const PRINT_RESOLUTION = AppOptions.get('printResolution') || 150;
|
||||
const PRINT_UNITS = PRINT_RESOLUTION / 72.0;
|
||||
canvas.width = Math.floor(size.width * PRINT_UNITS);
|
||||
canvas.height = Math.floor(size.height * PRINT_UNITS);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue