I know this question has been asked before, but I'll be more specific.
I have a CGPDFDocumentRef document and I want to find the trailer, ideally in the form of a CGPDFDictionaryRef so that I can look into its Encrypt dictionary and see if it allows text extraction.
The apple libraries don't seem to have a method to allow me to get at this dictionary.
You can get the catalog with CGPDFDocumentGetCatalog() Is there an equivalent to CGPDFDocumentGetTrailer()?
If not I guess I will have to manually parse the PDFDocument for the trailer myself.
These guys: How to find the trailer dictionary?
talk about writing such a low level parser.
How can I get at the code that they are parsing?
Can I convert the last page in the PDF to a CGPDFStream and then convert that stream into NSData and then maybe into ascii and then start implementing the Trailer parser that they are talking about?
Thanks!