Skip to content

Add print-to-PDF example to Chrome policies doc - #505

Merged
dprevoznik merged 3 commits into
mainfrom
hypeship/add-print-to-pdf-policy-example
Aug 17, 2026
Merged

Add print-to-PDF example to Chrome policies doc#505
dprevoznik merged 3 commits into
mainfrom
hypeship/add-print-to-pdf-policy-example

Conversation

@dprevoznik

@dprevoznik dprevoznik commented Aug 17, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Adds a "Print to PDF" example under Common use cases in browsers/chrome-policies.mdx, showing PrintingEnabled + PrintPdfAsImageDefault.

Verification

Live-tested against a real Kernel browser session:

  • Created a browser with chrome_policy: {"PrintingEnabled": true, "PrintPdfAsImageDefault": true}.
  • Confirmed both policies show as applied on chrome://policy (source: Platform, scope: Machine, level: Mandatory, no errors).
  • Called page.pdf() against https://example.com and confirmed a valid PDF was produced (%PDF-1.4 header, 14,838 bytes).

Test plan

  • Docs preview renders the new section correctly

Note

Low Risk
Documentation-only change with no runtime or API impact.

Overview
Adds a Print to PDF subsection under Common use cases in browsers/chrome-policies.mdx.

It documents that PrintingEnabled must remain enabled for CDP Page.printToPDF and Playwright page.pdf(), and explains PrintPdfAsImageDefault (false for selectable text vs true for rasterized pages). Includes matching Python and TypeScript chrome_policy examples.

Reviewed by Cursor Bugbot for commit 5922bf3. Bugbot is set up for automated code reviews on this repo. Configure here.

Documents PrintingEnabled and PrintPdfAsImageDefault as the policies
needed for reliable print-to-PDF via CDP/Playwright.
@mintlify

mintlify Bot commented Aug 17, 2026

Copy link
Copy Markdown
Contributor

Preview deployment for your docs. Learn more about Mintlify Previews.

Project Status Preview Updated (UTC)
Kernel 🟢 Ready View Preview Aug 17, 2026, 7:38 PM

💡 Tip: Enable Workflows to automatically generate PRs for you.

cursor[bot]
cursor Bot approved these changes Aug 17, 2026
Recommends the extraction-friendly default and documents the tradeoff
against image-based (true) output.

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Stale comment

Risk assessment: Very Low

Verdict: Risk unchanged. Previous approval stands.

Re-evaluated after the follow-up commit (9ad54fe), which updates the same docs-only change: PrintPdfAsImageDefault in the example is now false, and the prose describes the vector vs. raster tradeoff.

This PR still modifies a single Mintlify page (browsers/chrome-policies.mdx, +37 / −0). It adds a Print to PDF subsection under existing common-use-case examples, with Python and TypeScript browsers.create() snippets for PrintingEnabled and PrintPdfAsImageDefault.

  • Codepaths / blast radius: Docs content only. No application code, APIs, CI, config, or infrastructure.
  • Complexity: Small, localized addition that matches the surrounding example pattern.
  • Operational / security impact: None. Examples document existing Chrome policy keys; they do not change runtime behavior.
  • CODEOWNERS: No CODEOWNERS file in this repo, so code-owner review is not required.

Risk has not increased since the prior Very Low assessment. No production logic change.

Open in Web View Automation 

Sent by Cursor Automation: Assign PR reviewers

@dprevoznik
dprevoznik merged commit d8b2f66 into main Aug 17, 2026
4 checks passed
@dprevoznik
dprevoznik deleted the hypeship/add-print-to-pdf-policy-example branch August 17, 2026 21:57

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Risk assessment: Very Low

Verdict: Risk unchanged. Previous approval stands.

Re-evaluated after the latest synchronize (5922bf3), which merges main into this branch. The merge only brings already-merged docs from #504 onto the branch; it does not add unique changes to this PR.

The three-dot diff is still a single Mintlify page (browsers/chrome-policies.mdx, +37 / −0). It adds a Print to PDF subsection under existing common-use-case examples, with Python and TypeScript browsers.create() snippets for PrintingEnabled and PrintPdfAsImageDefault.

  • Codepaths / blast radius: Docs content only. No application code, APIs, CI, config, or infrastructure.
  • Complexity: Small, localized addition that matches the surrounding example pattern.
  • Operational / security impact: None. Examples document existing Chrome policy keys; they do not change runtime behavior.
  • CODEOWNERS: No CODEOWNERS file in this repo, so code-owner review is not required.

Risk has not increased since the prior Very Low assessment. No production logic change. Not re-approving because an approval is already in place.

Open in Web View Automation 

Sent by Cursor Automation: Assign PR reviewers

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.

1 participant