Skip to content

Commit

Permalink
Release 3.4.1
Browse files Browse the repository at this point in the history
  • Loading branch information
PSPDFKit committed Nov 18, 2022
1 parent 8ef5cb0 commit 97adc2e
Show file tree
Hide file tree
Showing 9 changed files with 38 additions and 30 deletions.
8 changes: 7 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,19 @@
## Newest Release

### 3.4.1 - 18 Nov 2022

- Updates for PSPDFKit 12.0 for iOS. (#37508)
- Fixes missing header file issue. (#37283)

## Previous Releases

### 3.4.0 - 26 Oct 2022

- Adds generating PDF from images, templates and HTML. (#36736)
- Updates for PSPDFKit 8.4.1 Android. (#37192)
- Updates for PSPDFKit 12.0 for iOS. (#37192)
- Fixes keyboard cutting off search results when inline search is disabled. (#35418)
- Fixes an issue where the `PspdfkitView` widget is not rendered in Flutter versions 3.3.0 and above on Android. (#37044)
## Previous Releases

### 3.3.0 - 19 Jul 2022

Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
# PSPDFKit Flutter
# Flutter PDF Library by PSPDFKit

![Flutter Intro](screenshots/flutter-intro.png)

PSPDFKit for Flutter is available at [pub.dev](https://pub.dev/packages/pspdfkit_flutter) and [GitHub](https://github.com/PSPDFKit/pspdfkit-flutter).
PSPDFKit for Flutter is an SDK for viewing, annotating, and editing PDFs. It offers developers the ability to quickly add PDF functionality to any Flutter application. It is available at [pub.dev](https://pub.dev/packages/pspdfkit_flutter) and [GitHub](https://github.com/PSPDFKit/pspdfkit-flutter).

If you are new to Flutter, make sure to check our Flutter blog posts:

- [How I Got Started With Flutter](https://pspdfkit.com/blog/2018/starting-with-flutter/).
- [Getting Started with PSPDFKit Flutter](https://pspdfkit.com/blog/2019/getting-started-with-pspdfkit-flutter/).
- [Getting Started with Flutter PDF Library by PSPDFKit](https://pspdfkit.com/blog/2019/getting-started-with-pspdfkit-flutter/).
- [Opening a PDF in Flutter](https://pspdfkit.com/blog/2019/opening-a-pdf-in-flutter/).
- [How to Bridge Native iOS Code to Flutter](https://pspdfkit.com/blog/2021/how-to-bridge-native-ios-code-to-flutter/).
- [How to Customize Our Flutter PDF SDK for Android](https://pspdfkit.com/blog/2021/how-to-customize-our-flutter-pdf-sdk/).
Expand Down Expand Up @@ -275,7 +275,7 @@ Platform specific README exists for [Android](android/) and [iOS](ios/).
# Example App
To see PSPDFKit Flutter in action check out our [Flutter example app](example/).
To see PSPDFKit for Flutter in action check out our [Flutter example app](example/).
Showing a PDF document inside your Flutter app is as simple as this:
Expand Down
2 changes: 1 addition & 1 deletion example/ios/Podfile
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ flutter_ios_podfile_setup

target "Runner" do
flutter_install_all_ios_pods __dir__
pod "PSPDFKit", "~> 12.0.0"
pod "PSPDFKit", "~> 12.0.1"
end

post_install do |installer|
Expand Down
2 changes: 1 addition & 1 deletion example/pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: pspdfkit_example
description: Demonstrates how to use the pspdfkit plugin.
version: 3.4.0
version: 3.4.1
homepage: https://pspdfkit.com/
environment:
sdk: '>=2.12.0 <3.0.0'
Expand Down
2 changes: 1 addition & 1 deletion ios/Classes/PspdfkitFlutterHelper.m
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ + (void)processMethodCall:(FlutterMethodCall *)call result:(FlutterResult)result
NSString *outputPath = call.arguments[@"outputFilePath"];
NSArray<NSDictionary<NSString *,NSObject *> *> *pages = call.arguments[@"pages"];
NSURL *processedDocumentURL = [PspdfkitFlutterHelper writableFileURLWithPath:outputPath override:YES copyIfNeeded:NO];
[PspdfkitPdfGenrator generatePdfWithPages:pages outputUrl:processedDocumentURL results:result];
[PspdfkitPdfGenerator generatePdfWithPages:pages outputUrl:processedDocumentURL results:result];
} else {
result(FlutterMethodNotImplemented);
}
Expand Down
39 changes: 20 additions & 19 deletions ios/Classes/PspdfkitHtmlPdfConvertor.swift
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,10 @@
import Foundation
import PSPDFKit.PSPDFProcessor

@objc(PspdfkitHtmlPdfConvertor)
public class PspdfkitHtmlPdfConvertor: NSObject {

@objc public static func generateFromHtmlString(html: String, outputFileURL: URL, convertionOptions: Dictionary<String,Any>? , results:@escaping FlutterResult) {
@objc public static func generateFromHtmlString(html: String, outputFileURL: URL, convertionOptions: Dictionary<String,Any>?, results:@escaping FlutterResult) {

var options:[String: Any] = [:]

Expand All @@ -23,27 +24,27 @@ public class PspdfkitHtmlPdfConvertor: NSObject {
if(convertionOptions?["numberOfPages"] != nil){
options[PSPDFProcessorNumberOfPagesKey] = convertionOptions?["numberOfPages"]
}

options = options as [String: Any]

Processor.generatePDF(fromHTMLString: html,outputFileURL: outputFileURL, options: options) { outputURL, error in
if let outputURL = outputURL {
results(outputURL.relativePath);
} else if let error = error {
results(FlutterError(code: "PspdfkitError", message: error.localizedDescription,details: nil))
}
}
if let outputURL = outputURL {
results(outputURL.relativePath);
} else if let error = error {
results(FlutterError(code: "PspdfkitError", message: error.localizedDescription,details: nil))
}
}
}

@objc public static func generateFromHtmlURL(htmlURL: URL, outputFileURL: URL, convertionOptions: Dictionary<String,Any>? , results:@escaping FlutterResult) {

@objc public static func generateFromHtmlURL(htmlURL: URL, outputFileURL: URL, convertionOptions: Dictionary<String,Any>?, results:@escaping FlutterResult) {
let options = [PSPDFProcessorNumberOfPagesKey: 1, PSPDFProcessorDocumentTitleKey: "Generated PDF"] as [String: Any]
Processor.generatePDF(from:htmlURL,outputFileURL: outputFileURL, options: options) { outputURL, error in
if let outputURL = outputURL {
results(outputURL.relativePath);
} else if let error = error {
results(FlutterError(code: "PspdfkitError", message: error.localizedDescription,details: nil))
}
}
if let outputURL = outputURL {
results(outputURL.relativePath);
} else if let error = error {
results(FlutterError(code: "PspdfkitError", message: error.localizedDescription,details: nil))
}
}
}
}
3 changes: 2 additions & 1 deletion ios/Classes/PspdfkitPdfGenerator.swift
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@
import Foundation
import PSPDFKit.PSPDFProcessor

public class PspdfkitPdfGenrator: NSObject {
@objc(PspdfkitPdfGenerator)
public class PspdfkitPdfGenerator: NSObject {

static let pageAdaptor: PspdfkitPageConvertor = PspdfkitPageConvertor()

Expand Down
2 changes: 1 addition & 1 deletion ios/pspdfkit_flutter.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -21,5 +21,5 @@ Pod::Spec.new do |s|
s.dependency("PSPDFKit")
s.swift_version = "5.0"
s.platform = :ios, "14.0"
s.ios.deployment_target = "14.0"
s.pod_target_xcconfig = { "DEFINES_MODULE" => "YES", "GENERATE_INFOPLIST_FILE" => "YES", "SWIFT_INSTALL_OBJC_HEADER" => "NO" }
end
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: pspdfkit_flutter
description: A Flutter plugin providing a feature-rich PDF viewing and editing experience to your users with the powerful PSPDFKit PDF SDK.
version: 3.4.0
version: 3.4.1
homepage: https://pspdfkit.com/
repository: https://github.com/PSPDFKit/pspdfkit-flutter
issue_tracker: https://support.pspdfkit.com/hc/en-us/requests/new
Expand Down

0 comments on commit 97adc2e

Please sign in to comment.