Permalink
Browse files

Changed the default for the demo application back to HTML rendering.

  • Loading branch information...
1 parent 8cf70b2 commit bcf26e3e4ba2dbf7e200db5507dc6e5adfae37f1 @ocrickard committed Mar 24, 2012
Showing with 8 additions and 8 deletions.
  1. +8 −8 OCPDFGen/OCViewController.m
@@ -24,16 +24,16 @@ - (void)loadView {
UIWebView *webView = [[UIWebView alloc] initWithFrame:CGRectMake(0, 0, self.view.frame.size.width, self.view.frame.size.height)];
//Use the below code for HTML
-// NSString *readmePath = [[NSBundle mainBundle] pathForResource:@"test.html" ofType:nil];
-// NSString *html = [NSString stringWithContentsOfFile:readmePath encoding:NSUTF8StringEncoding error:NULL];
-//
-// NSString *path = [OCPDFGenerator generatePDFFromHTMLString:html];
+ NSString *readmePath = [[NSBundle mainBundle] pathForResource:@"test.html" ofType:nil];
+ NSString *html = [NSString stringWithContentsOfFile:readmePath encoding:NSUTF8StringEncoding error:NULL];
- //This is for Markdown
- NSString *readmePath = [[NSBundle mainBundle] pathForResource:@"test2.md" ofType:nil];
- NSString *md = [NSString stringWithContentsOfFile:readmePath encoding:NSUTF8StringEncoding error:NULL];
+ NSString *path = [OCPDFGenerator generatePDFFromHTMLString:html];
- NSString *path = [OCPDFGenerator generatePDFFromMarkDownString:md];
+ //This is for Markdown
+// NSString *readmePath = [[NSBundle mainBundle] pathForResource:@"test2.md" ofType:nil];
+// NSString *md = [NSString stringWithContentsOfFile:readmePath encoding:NSUTF8StringEncoding error:NULL];
+//
+// NSString *path = [OCPDFGenerator generatePDFFromMarkDownString:md];
NSLog(@"FileExists:%d", [[NSFileManager defaultManager] fileExistsAtPath:path]);

0 comments on commit bcf26e3

Please sign in to comment.