我試圖使用Imagemagic(RMAgick)將PDF文檔轉換爲圖像。原始PDF也是從圖像創建的(不是原生矢量PDF)。將PDF轉換爲JPG時質量不佳
image = Magick::Image::from_blob(original_pdf) { self.format = 'PDF' }
image[0].format = 'JPG'
image[0].to_blob
image[0].write(to_file.jpg) {
self.quality = 100
self.density = 144
}
但打印時產生的圖像質量太低。原始PDF在同一時間質量很好。 我試圖使用這些選項
self.quality = 100
self.density = 144
或使用PNG而JPG,但是這一切都不起作用,只會加劇KB圖像大小)。
可能重複[轉換PDF到高分辨率圖像](http://stackoverflow.com/questions/6605006/convert-pdf-to-image-with-high-resolution) – plinth 2013-04-23 13:53:59