简体   繁体   中英

Parse PDF content stream as a string in xCode?

I am trying to get the contents stream out of a PDFs internal structure using xCode. I have managed to get to the array of contents using:

CGPDFDictionaryGetArray(str, "Contents", &val)

Then counting the amount of objects within the array, its returning 8 which is far less than shown in Acrobat Pro.

The objects with in the array seem to be of type kCGPDFObjectTypeStream, not sure what I can do with this.

Any help would be much appreciated, many

thanks, Jacob

The page /Contents entry can be a stream object or an array of stream objects. When you have an array of stream objects you get the complete page content by merging these streams in a single one (append one stream after another).

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM