ArthurHub / ArthurHub/HTML-Renderer

PrintDocument graphics gdi+ vs gdi issue (winforms)

Aberta
#54 0 comentários 0 reações 0 responsáveis Ver no GitHub
bug
Linguagem predominante
C#
Estrelas
1.4k
Forks
550
Merge médio
14d 9h
PRs com merge (30d)
1

Descrição

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!

Guia de contribuição

Nenhum guia de contribuição indexado para este repositório

Direção de pesquisa

Comece reproduzindo o problema com PrintDocument usando os dois pontos de entrada mencionados, HtmlRender.Render e HtmlRender.RenderGdiPlus, e os valores de margem fornecidos. Compare a escala da impressão e inspecione o caminho de renderização para identificar onde o processamento GDI normal diverge; considera-se concluído quando o Render normal produz uma saída corretamente dimensionada sem perder a funcionalidade exigida por quem relatou o problema.

Escrita pelo modelo de indexação a partir do texto da issue.

Avaliação

Stack de tecnologia
csharp
Domínio
desktop
Tipo de issue
Bug
Dificuldade
4/5
Tempo estimado
3-5 dias
Status de atividade
Estagnada
Clareza
Precisa de esclarecimento
Facilidade para iniciantes
25/100

Receba novas issues na sua caixa de entrada

Um resumo curto de issues do GitHub para quem está começando.