duanque19820925 2011-11-28 14:12 采纳率: 0%
浏览 26
已采纳

如何在PDF规范中说明图像属于哪个页面?

I'm doing some low-level extracting of images directly out of a PDF file with PHP, since GhostScript is too slow, and I'm doing pretty well. But the problem is that I can't figure out where it says which page an image belongs to. I have no problem getting the images out of the PDF, but I'm having trouble figuring out the order of them.

Where in the PDF data does it say what page an image is supposed to be displayed on?

  • 写回答

1条回答 默认 最新

  • dongsigan2044 2011-11-28 14:28
    关注

    Images are stored in a PDF as standalone objects. They are referenced from a page through the page's Resources dictionary, XObject subdictionary. The relation is page -> resources -> images, so in order to know to what page an image belongs to you have to scan all the resource dictionaries of all the pages and see in which resources dictionary your image appears. An image can be referenced from multiple resource dictionaries. This is very low level PDF manipulation, I do not know how low level are you working in your code.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 keil的map文件中Image component sizes各项意思
  • ¥30 BC260Y用MQTT向阿里云发布主题消息一直错误
  • ¥20 求个正点原子stm32f407开发版的贪吃蛇游戏
  • ¥15 划分vlan后,链路不通了?
  • ¥20 求各位懂行的人,注册表能不能看到usb使用得具体信息,干了什么,传输了什么数据
  • ¥15 Vue3 大型图片数据拖动排序
  • ¥15 Centos / PETGEM
  • ¥15 划分vlan后不通了
  • ¥20 用雷电模拟器安装百达屋apk一直闪退
  • ¥15 算能科技20240506咨询(拒绝大模型回答)