File tree 1 file changed +7
-1
lines changed
src/scripts/contentCapture
1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -48,7 +48,13 @@ export class PdfJsDocument implements PdfDocument {
48
48
return new Promise < string > ( ( resolve ) => {
49
49
// In pdf.js, indexes start at 1
50
50
this . pdf . getPage ( pageIndex + 1 ) . then ( ( page ) => {
51
- let viewport = page . getViewport ( 1 /* scale */ ) ;
51
+ // Issue #369: When the scale is set to 1, we end up with poor quality images
52
+ // on high resolution machines. The best explanation I found for this was in
53
+ // this article: http://stackoverflow.com/questions/35400722/pdf-image-quality-is-bad-using-pdf-js
54
+ // Note that we played around with setting the scale from 3-5, which looked better on high
55
+ // resolution monitors - but did not look good at all at lower resolutions. scale=2 seems
56
+ // to be the happy medium.
57
+ let viewport = page . getViewport ( 2 /* scale */ ) ;
52
58
let canvas = document . createElement ( "canvas" ) as HTMLCanvasElement ;
53
59
let context = canvas . getContext ( "2d" ) ;
54
60
canvas . height = viewport . height ;
You can’t perform that action at this time.
0 commit comments