Update PDFsharp to 6.2.3 - #238
Merged
Merged
Conversation
eXpl0it3rforce-pushed
the
feature/update-pdfsharp
branch
from
January 4, 2026 21:49
56cb783 to
7ba6f9bCompareypaulau 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
commented
Jul 20, 2026
CollaboratorAuthor
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. |
eXpl0it3rforce-pushed
the
feature/update-pdfsharp
branch
2 times, most recently
from
July 25, 2026 21:18
a1a3a1f to
2b72273CompareeXpl0it3rforce-pushed
the
feature/update-pdfsharp
branch
3 times, most recently
from
July 26, 2026 09:42
6b417e2 to
7f52b8eCompareeXpl0it3rforce-pushed
the
feature/update-pdfsharp
branch
from
July 26, 2026 09:52
7f52b8e to
afa2702CompareeXpl0it3rforce-pushed
the
feature/update-pdfsharp
branch
from
July 26, 2026 09:54
afa2702 to
6234339CompareeXpl0it3r
commented
Jul 26, 2026
CollaboratorAuthor
I've added some basic tests for HtmlRenderer.PdfSharp to ensure that it works on Windows, macOS and Linux now. |
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 freeto 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.
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.