convert powerpoint and keynote file to set of images
I doubt. ppt file is the fact XML style document. So if you want to parse it you have to write a XML parser who puts element in the exact position... So in fact you have to create your own powerpoint.
But, you might (both PowerPoint and Keynote) consider to export presentation to pdf, and then this will be a lot simpler.
How to get images from slides in ppt file in iPhone or iPad?
You can use QuickLook framework for generating previews for documents, that can be handled by system (like iWorks or MS Office). See more information about this at http://developer.apple.com/library/ios/#DOCUMENTATION/QuickLook/Reference/QuickLookFrameworkReference_iPhoneOS/_index.html
How to create JPEG image on iOS from scratch
The fastest way to visualize elements is, to me, OpenGL ES. You can use mobile GPU to visualize then there is CIImage for managing image.
programmatically generate ppt in iOS
There's no in-built Apple API, and I've never heard of a third-party framework for this.
PowerPoint (pptx) in iOS
Convert to HTML5 then embed in UIWebView is the answer. To retain interactions is difficult. But you don't have to reinvent the wheel, a tool called SlideGo is available and free. It also exposes some javascript API if you need to build your own navigation, otherwise just use default swiping to advance slides.
IOS PowerPoint slide Navigation
UIDocumentInteractionController not provide any delegate to take the completer control over the document.
It will utilize the QLPreview frame work to preview the document whatever you specified in the corresponding URL.
How to convert (.doc,.xls,.ppt) to pdf using objective c?
You can do it with google docs API.
I have implement this.
Just try it it is very easy to implement...
Second Option : Use following, I found it from here.
(1) Use UIWebView
to display the content of the PPT. The well formed (!) HTML allows you to parse it. Get the html using
NSString *htmlContent = [self.webView stringByEvaluatingJavaScriptFromString:@"document.body.innerHTML"];
(2) Count the number of div class = 'slide
to get the slide count
(4) You need to parse the HTML to get the styles and div
using the below code
(5) Get all the styles
- (NSString *)getStyles:(int)slideCount forView:(UIWebView *)view {
NSString *getElementByTag = [[NSString alloc] init];
NSString *allStyles = [[NSString alloc] init];
for (int i = 0; i < slideCount; i++) {
getElementByTag = [NSString stringWithFormat:@"document.getElementsByTagName('style')[%d].innerHTML", i];
NSString *style = [[view stringByEvaluatingJavaScriptFromString:getElementByTag] stringByAppendingString:@"\n"];
allStyles = [allStyles stringByAppendingString:style];
}
allStyles = [@"<style type='text/css'>" stringByAppendingString: allStyles];
return [allStyles stringByAppendingString:@"</style>"];
}
(6) Concatenate all the styles from step 5 with div
tag content. Define a NSMutableArray
variable to to store all slides with styles for future reference. Define NSMutableArray *slides
to store all the slides
- (void)makeSlides:(int)slideCount forView:(UIWebView *)view {
self.slides = [[NSMutableArray alloc] init];
for (int i = 0; i < slideCount; i++) {
NSString *slideBody = [NSString stringWithFormat:@"document.getElementsByClassName('slide')[%d].innerHTML", i];
NSString *div = [view stringByEvaluatingJavaScriptFromString:slideBody];
NSString *slide = [self.slideStyles stringByAppendingString:div];
[self.slides addObject:slide];
}
}
Hope this helps
Related Topics
Auto-Implement Swift Protocol Methods in Xcode
None of Your Accounts Are a Member, Code Signing Errors After Upgrading to Xcode 8
Detecting When App Is Becoming Active from Lockscreen VS Other on iOS7
Programmatically Creating Uinavigationcontroller in iOS
How to Detect Orientation in an App Extension
Obtaining Bluetooth Le Scan Response Data with iOS
Wkwebview Setting Cookie Not Possible (iOS 11+)
How to Implement Gmuclusterrenderer in Swift
Uploading Image with iOS App to Server File Size Is Too Large
Mkannotationview and Tap Detection
Hide a Phone Call Completely in iOS (Jailbreak Device)
iPhone Mkmapview - Mkpolygon Issues
How to Upload Multiple Image on Firebase Using Swift
Cashapelayer Animating Path Glitches/Flickers (From Ellipse to Rect and Back)
iOS Automatic @Synthesize Without Creating an Ivar
Which Cgimagealphainfo Should We Use
How to Access User Defined Runtime Attribute from the 'Sender' Object