From 3a11923dda5f9efab02a7e388ed05250ac7ff218 Mon Sep 17 00:00:00 2001 From: Geo Date: Thu, 28 Apr 2016 14:53:05 +0200 Subject: [PATCH] updated to be cordova 6.1.1+ compatible --- README.md | 2 +- plugin.xml | 4 ++-- src/ios/Html2pdf.h | 1 - src/ios/Html2pdf.m | 5 ++--- 4 files changed, 5 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 60ce6f6..4504e90 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ Html 2 Pdf ============= -This is a pdf creation plugin for Phonegap 3.3.0 / Cordova 3.3.1 supporting Android (>=2.3.3) and iOS(>=6.0). +This is a pdf creation plugin for PCordova 6.1.1+ supporting Android (>4.1) and iOS(>=6.0). It creates a pdf from the given html and stores it on the device. There is one method: diff --git a/plugin.xml b/plugin.xml index 8fc9f61..9470be0 100644 --- a/plugin.xml +++ b/plugin.xml @@ -2,7 +2,7 @@ + version="2.0.0"> Html2pdf https://github.com/moderna/cordova-plugin-html2pdf.git @@ -10,7 +10,7 @@ MIT Modern Alchemists OG - <p>This is a plugin converts the given html to a pdf document and stores it on the device.</p> + <p>Cordova 6.1.1+ plugin for android and ios which converts the given html to a pdf document and stores it on the device.</p> This Plugin requires iText.jar to be added to your project. Here is the last open source version (4.2.0) of it: diff --git a/src/ios/Html2pdf.h b/src/ios/Html2pdf.h index a1f2566..a2d9b1b 100644 --- a/src/ios/Html2pdf.h +++ b/src/ios/Html2pdf.h @@ -7,7 +7,6 @@ #import #import -#import #import "AppDelegate.h" diff --git a/src/ios/Html2pdf.m b/src/ios/Html2pdf.m index fc66b8e..4888d97 100644 --- a/src/ios/Html2pdf.m +++ b/src/ios/Html2pdf.m @@ -80,7 +80,7 @@ - (void)success messageAsString:[resultMsg stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding]]; // send cordova result - [self writeJavascript:[result toSuccessCallbackString:command.callbackId]]; + [self.commandDelegate sendPluginResult:result callbackId:command.callbackId]; } - (void)error:(NSString*)message @@ -93,8 +93,7 @@ - (void)error:(NSString*)message messageAsString:[resultMsg stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding]]; // send cordova result - [self writeJavascript:[result toErrorCallbackString:command.callbackId]]; - + [self.commandDelegate sendPluginResult:result callbackId:command.callbackId]; } - (void)webViewDidFinishLoad:(UIWebView *)webView