We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ce726c4 commit f9d2f15Copy full SHA for f9d2f15
packages/react-pdf/src/Page/Canvas.tsx
@@ -106,8 +106,8 @@ export default function Canvas(props: CanvasProps): React.ReactElement {
106
canvas.width = renderViewport.width;
107
canvas.height = renderViewport.height;
108
109
- canvas.style.width = `${Math.floor(viewport.width)}px`;
110
- canvas.style.height = `${Math.floor(viewport.height)}px`;
+ canvas.style.width = `${Math.floor(viewport.width) * pdfjs.PixelsPerInch.PDF_TO_CSS_UNITS}pt`;
+ canvas.style.height = `${Math.floor(viewport.height) * pdfjs.PixelsPerInch.PDF_TO_CSS_UNITS}pt`;
111
canvas.style.visibility = 'hidden';
112
113
const renderContext: RenderParameters = {
0 commit comments