Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Experimental: Support PDF rendering #487

Merged
merged 5 commits into from Feb 6, 2024
Merged

Conversation

ryantxu
Copy link
Member

@ryantxu ryantxu commented Dec 17, 2023

src/browser/browser.ts Fixed Show fixed Hide fixed
src/browser/browser.ts Fixed Show fixed Hide fixed
pageRanges: urlParams.get('pdf.pageRanges') ?? undefined,
tagged: urlParams.get('pdf.tagged') === 'true',
};
}
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

path: options.filePath,
})
}

return page.screenshot({ path: options.filePath, fullPage: options.fullPageImage, captureBeyondViewport: options.fullPageImage || false });
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should we wrap this in if(!isPDF ) ?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not necessary given the if(isPDF) ... case returns, but perhaps an else clause would be cleaner (I don't have any strong opinions here)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ah, I missed the return. na early return is better than if/else :)

@ryantxu ryantxu marked this pull request as ready for review February 2, 2024 07:12
@AgnesToulet AgnesToulet mentioned this pull request Feb 2, 2024
@AgnesToulet
Copy link
Contributor

Thanks for your work on this feature! I opened a PR to make some changes to it: #495

I'm working on updates to the reporting feature that will rely on that. I'll open the associated PRs soon.

* Bump follow-redirects from 1.15.3 to 1.15.4 (#489)

Bumps [follow-redirects](https://github.com/follow-redirects/follow-redirects) from 1.15.3 to 1.15.4.
- [Release notes](https://github.com/follow-redirects/follow-redirects/releases)
- [Commits](follow-redirects/follow-redirects@v1.15.3...v1.15.4)

---
updated-dependencies:
- dependency-name: follow-redirects
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Chore: Upgrade jimp and node (#492)

* fix timeout and options

* add scale

* clean up

* clean up

* Update rendererv2.proto

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
right: 0,
left: 0,
},
path: options.filePath,

Check failure

Code scanning / CodeQL

Uncontrolled data used in path expression High

This path depends on a
user-provided value
.
@ryantxu ryantxu merged commit 54e530b into master Feb 6, 2024
4 checks passed
@ryantxu ryantxu deleted the support-pdf-image-rendering branch February 6, 2024 17:19
@AgnesToulet AgnesToulet changed the title Support PDF rendering Experimental: Support PDF rendering Feb 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants