|
|
1
2
由于nspdimagerep是NSImageRep的一个子类,您不能使用[NSImageRep drawInRect]方法吗? |
|
2
2
最简单的方法是使用ImageIO框架。将PDF数据馈送到 image source 得到一个 CGImage ;将该对象馈送给 image destination 生成(并可选地保存在同一步骤中)JPEG数据。在后一步中,可以在图像属性中指定分辨率;请参见 âIndividual Image Propertiesâ in the documentation . 别忘了 finalize your destination . 这很重要。 |