Skip to content

Commit

Permalink
Fix canvas height and width of PDF
Browse files Browse the repository at this point in the history
  • Loading branch information
dasistwas committed Oct 26, 2023
1 parent c2fa068 commit 6d481be
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion amd/build/pdfembed.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion amd/build/pdfembed.min.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions amd/src/pdfembed.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ function renderPDFfunction(url, canvasContainer, customScale) {

canvas.height = desiredHeight * customScale;
canvas.width = desiredWidth * customScale;
canvas.style = "width: " + (desiredWidth * customScale) + "px; height: " + (desiredHeight * customScale) + "px;";

canvasContainer.appendChild(canvas);

Expand Down

0 comments on commit 6d481be

Please sign in to comment.