ArthurHub / ArthurHub/HTML-Renderer

PrintDocument graphics gdi+ vs gdi issue (winforms)

未關閉
#54 0 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視
bug
主要語言
C#
星號
1.4k
分支
550
平均合併
14 天 9 小時
30 天內合併 PR
1

描述

Hi,
It seems like something is off with regular gdi rendering in the current version. Seems like it is being output at an extremely small resolution, even though I'm passing the correct margin data.

Here's a ghetto phone pic of my printed output:

![Image](https://github.com/user-attachments/assets/9d3ea0a5-9b06-4dfb-8975-d815e2f58bb3)

Here are the statements I'm using:
`HtmlRender.Render(printerGraphics, html, (float)printedMarginArea.Left, (float)printedMarginArea.Top, (float)printedMarginArea.Width);`
`HtmlRender.RenderGdiPlus(printerGraphics, html, (float)printedMarginArea.Left, (float)printedMarginArea.Top, (float)printedMarginArea.Width);`

The regular "render" method appears to be scaling correctly in 1.3.0, but I'm missing too much functionality to be able to use that version. I'm trying to poke around the source code but I'm not able to find the disconnect...

Appreciate it!

貢獻指南

這個儲存庫沒有索引到貢獻指南

研究方向

首先,使用提到的兩個進入點 HtmlRender.Render 和 HtmlRender.RenderGdiPlus,以及提供的邊界值,透過 PrintDocument 重現此問題。比較列印縮放比例,並檢查轉譯路徑,以找出一般 GDI 處理在哪裡出現差異;完成的條件是一般 Render 能產生正確縮放的輸出,同時不失去回報者所需的功能。

由索引模型根據 Issue 內容生成。

評估

技術堆疊
csharp
領域
desktop
Issue 類型
缺陷
難度
4/5
預估耗時
3-5 天
活躍度
停滯
描述清晰度
需要釐清
新手友好度
25/100

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。