Repository navigation
Render web page content through PdfRenderer::render_with_text_layout - #584
Merged
Merged
Conversation
Remove the free function render_page_content_with_text_layout. The renderer method now takes the page viewport and optional content state, so the web page renderer owns a PdfRenderer and uses the same path as the Skia example and the conformance harness. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Conformance readsDocuments that Safe-PDF reads differently from the base commit, compared with PDFium. A read pdf.js corpus1009 documents compared with Regressions
840 documents of the PDFium corpus read as on Details are in the job summaries of the workflow run. Rerun a case locally with |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
render_page_content_with_text_layout;PdfRenderer::render_with_text_layoutis now the single content-and-text pass.render_with_text_layouttakes thePageViewportandOptionalContentStateto render with, so the web path keeps its zoom/DPR/rotation viewport and runtimeSetOCGStatevisibility.PdfRenderer::pageandPdfRenderer::default_optional_contentare public so callers can build those arguments.WebPageRendererowns aPdfRenderer(exposingdocument()) instead of a font system;renderlooks the page up by index.WebErrorgains aRenderervariant, andpdf-webdrops itspdf-text-enginedependency.PdfCanvas::newcomputed before.Test plan
cargo clippy --all --workspace,cargo fmt --checkcargo test -p pdf-renderer -p pdf-webcargo build --example skia --features skiacargo xtask web-canvas --profile debugcargo check -p pdf-conformance(not run locally: its skia-bindings build needs a download)🤖 Generated with Claude Code