Skip to content

Commit

Permalink
updated to be cordova 6.1.1+ compatible
Browse files Browse the repository at this point in the history
  • Loading branch information
Geo committed Apr 28, 2016
1 parent 8724b75 commit 3a11923
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 7 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -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:
Expand Down
4 changes: 2 additions & 2 deletions plugin.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@
<plugin xmlns="http://www.phonegap.com/ns/plugins/1.0"
xmlns:android="http://schemas.android.com/apk/res/android"
id="at.modalog.cordova.plugin.html2pdf"
version="1.0.0">
version="2.0.0">

<name>Html2pdf</name>
<repo>https://github.com/moderna/cordova-plugin-html2pdf.git</repo>
<keywords>html,pdf,android,ios</keywords>
<license>MIT</license>
<author>Modern Alchemists OG</author>
<description>
&lt;p&gt;This is a plugin converts the given html to a pdf document and stores it on the device.&lt;/p&gt;
&lt;p&gt;Cordova 6.1.1+ plugin for android and ios which converts the given html to a pdf document and stores it on the device.&lt;/p&gt;

This Plugin requires iText.jar to be added to your project. Here is the last open source version (4.2.0) of it:

Expand Down
1 change: 0 additions & 1 deletion src/ios/Html2pdf.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
#import <Foundation/Foundation.h>

#import <Cordova/CDVPlugin.h>
#import <Cordova/CDVJSON.h>

#import "AppDelegate.h"

Expand Down
5 changes: 2 additions & 3 deletions src/ios/Html2pdf.m
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down

0 comments on commit 3a11923

Please sign in to comment.