Skip to content

Update PDFsharp to 6.2.3#238

Open
eXpl0it3r wants to merge 1 commit into
masterfrom
feature/update-pdfsharp
Open

Update PDFsharp to 6.2.3#238
eXpl0it3r wants to merge 1 commit into
masterfrom
feature/update-pdfsharp

Conversation

@eXpl0it3r

@eXpl0it3r eXpl0it3r commented Jan 4, 2026

Copy link
Copy Markdown
Collaborator

Closes #221

One of the major challenges with updating PDFsharp is, that it no longer depends on GDI for the font resolving, which is a good thing, as it makes HtmlRenderer.PdfSharp cross-platform, but also requires a custom cross-platform font resolver.

As I'm planning to use this for other projects that use PDFsharp, I've implemented FontResolver as a separate library, repo and NuGet.

Will need to check if #130 would be a good idea, when using HtmlRenderer.Gdi, so this custom resolver isn't needed in those cases.

I'll move this to a separate change, so it's not further blocking.

@eXpl0it3r
eXpl0it3r force-pushed the feature/update-pdfsharp branch from 56cb783 to 7ba6f9b Compare January 4, 2026 21:49
ypaulau added a commit to ypaulau/HTML-Renderer that referenced this pull request Mar 27, 2026
- XFontStyle -> XFontStyleEx via Utils.Convert(RFontStyle)
- Remove XPdfFontOptions (v6 defaults to Unicode)
- Target net472 + PDFsharp-GDI 6.2.4 NuGet
- HtmlRenderer core targets netstandard2.0
- Skip FontResolver dependency (GDI build on Windows)

Based on PR ArthurHub#238 approach by eXpl0it3r.
ypaulau added a commit to ypaulau/HTML-Renderer that referenced this pull request Mar 27, 2026
- PdfSharpAdapter.cs: XFontStyle -> XFontStyleEx via Utils.Convert(RFontStyle), drop XPdfFontOptions
- Utils.cs: add Convert(RFontStyle) -> XFontStyleEx helper
- HtmlRenderer.PdfSharp.csproj: PDFsharp 1.50.5147 -> PDFsharp-GDI 6.2.4

Based on PR ArthurHub#238 approach by eXpl0it3r.
@eXpl0it3r

Copy link
Copy Markdown
Collaborator Author

Priorities have shifted a bit. Since FontResolver will take some more work to release v2 which is capable enough and since I want to keep the dependency tree slim for HtmlRenderer v1.6, I'll vendor in, the code from FontResolver.

For HtmlRender v2, we want to anyways use HtmlKit (and vendored ExCSS), so there it would make sense to directly use FontResolver.

Priority is now, to get v1.6 out, so that pending work for v2 can be merged.

@eXpl0it3r
eXpl0it3r force-pushed the feature/update-pdfsharp branch from 7ba6f9b to a1a3a1f Compare July 20, 2026 19:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Update PDFsharp for Version 6.x

1 participant