Reputation: 115
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
Upvotes: 0
Views: 496
Reputation: 5834
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).
Upvotes: 1