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
@ -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…
Reference in New Issue
Block a user