I am developing a application where user has the facility to share MS-Office files. Under Windows I use the Word Automation objects and a virtual printer to create .BMP files from the .doc and the .ppt's which I then read/display and send it on a network.
Now, I am porting my application on MAC.
On MAC I am really not sure as to how to achieve this stuff. I searched and found a way to get the bitmap representation of files under MAC through the user of QuickLook API. I also found some posts here related to QuickLook.
Get QuickLook preview image for file
Mac Quick Look Preview in an NSView or NSImage?
But here we are stuck with QLThumbnailImageCreate as it gives only a single thumbnail image for the document (1st page of .doc and .ppt). So this would not be of any use for me.
I researched a bit more and found a command qlmanage that with its option of -p will generate the actual PREVIEW of the document not only the thumbnail. But now it only saves the images inside pages as .png files and does nothing with the text. It gives a single Preview.html file though along with PreviewProperties.plist that has information about the attachments.
The same qlmange command does something weird for PowerPoint files. It saves the template of slide as .pdf file( and the embedded images as .png).
Does there exists some way in code through which I can request the MS-Office QuickLook generator (office.qlgenerator) to give me a preview objects and then using that preview object I convert the pages into bitmaps ?
Finder / Spotlight seems to figure the preview perfectly I wonder how are these applications are able to do it ? Does Apple hide this functionality from developers ???
Can anyone having QuickLook expertise guide me through this, or show me some other way possible, with or without QuickLook because as of now I think I am really stuck here.
In simple terms I just want the raw image representations of pages/slides.
Any help in this regard would be highly appreciated.
Thanks & Regards, LazyCoder7