We are looking for an Adobe Air Native Extension, in both human-readable source and binary (SWC) format, targeting the iOS platform, with three strictly-defined entry points:
This function will provide a list of "subcategories" that can be defined by the user to organize their PDF content. It should read from the datastore that is used by iBooks, and NOT be separately implemented.
* enumerateFiles(category:* = null)
This function will accept an arbitrary string and return a list of iBooks content (books, PDFs, etc - anything manageable by the iBooks application available on the App Store) including a screenshot of the content, document title, file size, number of pages, etc, whatever makes sense for enumeration in a list The "filter", if provided, serves to determine the "subcategory" as defined in the preceding function.
* renderContent(id:*, pageNumber:int, format:String = "png", compression:uint = 75, desiredWidth:Number = null, desiredHeight:Number = null)
This function will take as parameters a unique identifier (either a filename / UUID from the results of enumerateFiles; -OR- a URI from the network; in the event a URI is provided the module must access the resource via whatever protocol the URI scheme dictates), and the desired page number. It will then read the PDF, generate a screenshot of the content, and return either a PNG or a JPEG image representing the contents of that PDF at whatever desired level of compression (unsigned integer value in the interval [0, 100]).
If the width and height are not provided in the function call, make an intelligent decision as to what size you should render the content. Experiment to find this value, it should not be inordinately large; no larger than, say, the maximum real estate available to a full-screen iPad 3 application, assuming that the top status bar is visible and the application is not fullscreened.
Aspect ratio in the rendered content should be preserved; if the "desired" width/height breaks the aspect ratio of the actual page, scale the content to fit the boundingbox as best as possible.
Please also provide, with the ANE, a Flash Builder 4.6 mobile project, targeting Apple iOS, using it. We'd like this to be a stand-alone "drop-in" library with as much neutrality as possible outside of the requirement to use iBooks.