我正在尝试使用PDFBox将PDF页面渲染为bmp图像,但所有矢量对象都被错误地渲染。它们比从Adobe Illustrator接收的图像更薄。
例如,比较这些图片:http://imgur.com/BDDpAYT
我该如何纠正?
当我将Adobe Illustrator中的PDF页面导出为bmp图像时,我使用以下选项:位图颜色模型,600 dpi分辨率,无抗锯齿。
在Java中:
...
BufferedImage img = pdPage.convertToImage(BufferedImage.TYPE_INT_RGB, 600);
...
File file = new File("img" + ".bmp");
ImageIO.write(img, "bmp", file);
我使用PDFBox 1.8.9和2.0.0。
输入pdf:http://www.filedropper.com/examplevectortext
Adobe Illustrator输出:http://imgur.com/GqpYfoR
**
我找到了解决方案。首先将pdf转换为svg并更改所有所需内容 设置然后将svg转换为图像。
**