ArthurHub / ArthurHub/HTML-Renderer

HTML with Images - unwanted image scaling problem

未关闭
#197 1 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
bug
主要语言
C#
星标
1.4k
派生
550
平均合并
14 天 9 小时
30 天内合并 PR
1

描述

When HTML contains images they are scaled up by ~20% when converting to PDF.

Image 1:
![Screenshot 2022-10-05 135628](https://user-images.githubusercontent.com/32173891/194054894-5195821b-2cdf-419f-b9e5-c95a23e61916.jpg)
_This is the desired look when generating (taken from HTML template)_

Image 2:
![Screenshot 2022-10-05 135738](https://user-images.githubusercontent.com/32173891/194055092-fab0ab3b-7988-4352-9885-fe3ba9b74dc6.jpg)
_This is the result i am getting_

When HTML is opened in browser it looks like _example 1_ as it should be.
The < img > tag have height and width attributes and this is occurring every time image is present in the HTML.

贡献指南

这个仓库没有索引到贡献指南

调研方向

首先,使用包含带有显式 height 和 width 属性的 img 标签的 HTML 重现该问题,然后跟踪 HTML 图像尺寸调整和 PDF 渲染的入口点。将生成的 PDF 尺寸与浏览器中的结果进行比较;当图像保留 HTML 指定的尺寸且没有不必要的缩放时,即表示完成。

由索引模型根据 Issue 内容生成。

评估

技术栈
csharp
领域
desktop
Issue 类型
缺陷
难度
4/5
预计耗时
3-5 天
活跃度
停滞
描述清晰度
基本清楚
新手友好度
35/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。