Showing
4 changed files
with
8 additions
and
5 deletions
1 | # Changelog | 1 | # Changelog |
2 | 2 | ||
3 | -## 5.0.5 | 3 | +## 5.1.0 |
4 | 4 | ||
5 | - Fix PdfPreview timer dispose [wwl901215] | 5 | - Fix PdfPreview timer dispose [wwl901215] |
6 | - Remove unnecessary _raster call in PdfPreview [yaymalaga] | 6 | - Remove unnecessary _raster call in PdfPreview [yaymalaga] |
7 | +- Added subject, body and email parameters in sharePdf [Deepak] | ||
8 | +- Subject, body and emails parameter to pdf preview [Deepak] | ||
7 | 9 | ||
8 | ## 5.0.4 | 10 | ## 5.0.4 |
9 | 11 |
@@ -208,7 +208,7 @@ public class PrintingJob extends PrintDocumentAdapter { | @@ -208,7 +208,7 @@ public class PrintingJob extends PrintDocumentAdapter { | ||
208 | } | 208 | } |
209 | 209 | ||
210 | static void sharePdf(final Context context, final byte[] data, final String name, | 210 | static void sharePdf(final Context context, final byte[] data, final String name, |
211 | - final String subject, final String body, final ArrayList<String> emails) { | 211 | + final String subject, final String body, final ArrayList<String> emails) { |
212 | assert name != null; | 212 | assert name != null; |
213 | 213 | ||
214 | try { | 214 | try { |
@@ -236,7 +236,8 @@ public class PrintingJob extends PrintDocumentAdapter { | @@ -236,7 +236,8 @@ public class PrintingJob extends PrintDocumentAdapter { | ||
236 | shareIntent.addFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION); | 236 | shareIntent.addFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION); |
237 | shareIntent.putExtra(Intent.EXTRA_SUBJECT, subject); | 237 | shareIntent.putExtra(Intent.EXTRA_SUBJECT, subject); |
238 | shareIntent.putExtra(Intent.EXTRA_TEXT, body); | 238 | shareIntent.putExtra(Intent.EXTRA_TEXT, body); |
239 | - shareIntent.putExtra(Intent.EXTRA_EMAIL, emails != null ? emails.toArray(new String[0]) : null); | 239 | + shareIntent.putExtra( |
240 | + Intent.EXTRA_EMAIL, emails != null ? emails.toArray(new String[0]) : null); | ||
240 | Intent chooserIntent = Intent.createChooser(shareIntent, null); | 241 | Intent chooserIntent = Intent.createChooser(shareIntent, null); |
241 | List<ResolveInfo> resInfoList = context.getPackageManager().queryIntentActivities( | 242 | List<ResolveInfo> resInfoList = context.getPackageManager().queryIntentActivities( |
242 | chooserIntent, PackageManager.MATCH_DEFAULT_ONLY); | 243 | chooserIntent, PackageManager.MATCH_DEFAULT_ONLY); |
@@ -198,7 +198,7 @@ public class PrintJob: UIPrintPageRenderer, UIPrintInteractionControllerDelegate | @@ -198,7 +198,7 @@ public class PrintJob: UIPrintPageRenderer, UIPrintInteractionControllerDelegate | ||
198 | } | 198 | } |
199 | 199 | ||
200 | let activityViewController = UIActivityViewController(activityItems: [fileURL, body], applicationActivities: nil) | 200 | let activityViewController = UIActivityViewController(activityItems: [fileURL, body], applicationActivities: nil) |
201 | - activityViewController.setValue(subject , forKey: "subject") | 201 | + activityViewController.setValue(subject, forKey: "subject") |
202 | if UI_USER_INTERFACE_IDIOM() == .pad { | 202 | if UI_USER_INTERFACE_IDIOM() == .pad { |
203 | let controller: UIViewController? = UIApplication.shared.keyWindow?.rootViewController | 203 | let controller: UIViewController? = UIApplication.shared.keyWindow?.rootViewController |
204 | activityViewController.popoverPresentationController?.sourceView = controller?.view | 204 | activityViewController.popoverPresentationController?.sourceView = controller?.view |
@@ -7,7 +7,7 @@ description: > | @@ -7,7 +7,7 @@ description: > | ||
7 | homepage: https://github.com/DavBfr/dart_pdf/tree/master/printing | 7 | homepage: https://github.com/DavBfr/dart_pdf/tree/master/printing |
8 | repository: https://github.com/DavBfr/dart_pdf | 8 | repository: https://github.com/DavBfr/dart_pdf |
9 | issue_tracker: https://github.com/DavBfr/dart_pdf/issues | 9 | issue_tracker: https://github.com/DavBfr/dart_pdf/issues |
10 | -version: 5.0.5 | 10 | +version: 5.1.0 |
11 | 11 | ||
12 | environment: | 12 | environment: |
13 | sdk: ">=2.12.0-0 <3.0.0" | 13 | sdk: ">=2.12.0-0 <3.0.0" |
-
Please register or login to post a comment