我试图通过Imagick将PDF转换为高质量的PNG,但文件仍然模糊不清。目前,我正在运行以下选项,但无法找到正确的标记以从转换中获得清晰的PNG。原始PDF文件是8.5 x 11.建议?谢谢!
$image = new \Imagick(storage_path('app/'.$path));
$image->setResolution( 200, 200 );
$image->scaleImage(1700,2200);
$image->setImageFormat( "png32" );
$image->writeImage(storage_path('app/'.$split[0].'.png'));
答案 0 :(得分:4)
你需要在之前设置分辨率,因为图像在读取时是光栅化的,所以它后来没有帮助设置分辨率 - 为时已晚!
尝试以下几行:
1. right click blank white section of your report > Report > Group Expert.
2. create new in running total.
3.select field to summarize.
4.Sum
5.for each record.
6.on group change.
答案 1 :(得分:0)
$imagick_i = new Imagick();
$imagick_i->setResolution( 595, 842 );
$imagick_i->readImageblob($blob);
$imagick_i->setImageFormat( "png32" );
foreach ($imagick_i as $auxiliaryvalue) {
echo '<img src="data:image/png;base64,' . base64_encode($auxiliaryvalue->getimageblob()) . '" /><br>';
}