如果页面尺寸较小,则PDFBOX页面到图像会产生模糊的图像 [英] PDFBOX page to image produce blurry image if the page dimensions are low

查看:402
本文介绍了如果页面尺寸较小,则PDFBOX页面到图像会产生模糊的图像的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的任务是将pdf文件转换为图像(通常为PNG),我遇到的情况是页面尺寸较小(612792),即使比例缩放或DPI api的"pdfRenderer.renderImage(pageNo,2),呈现的图像质量也很差)"

使用


20.0.20 版本.

这是使用 pdf查看器的外观:

渲染图像中的相同代码段:

pdf查看器中的

缩放:

缩放渲染的图像会得到以下结果:



有什么办法可以创建更好的图像质量?

谢谢

解决方案

2.0.20中的图像模糊问题已在2020年8月发布的2.0.21中解决.此问题已在 PDFBOX-4863 (标题具有误导性,问题不仅与字体有关). /p>

my task is to convert pdf files into images (usually PNG), I encounter situations when the page dimension is low (612,792) the rendered image quality is poor even scale rendering or DPI api's "pdfRenderer.renderImage(pageNo, 2)"


20.0.20 version is used.

This is how it looks using pdf viewer :

Same snippet from the rendered image :

zooming in the pdf viewer :

zooming the rendered image result the following :



is there any way to create better image quality ??

thanks

解决方案

The problem of blurry images in 2.0.20 has been solved in 2.0.21, released in August 2020. The problem was fixed in the issue PDFBOX-4863 (the title is misleading, the problem is not just related to fonts).

这篇关于如果页面尺寸较小,则PDFBOX页面到图像会产生模糊的图像的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆