You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CHANGELOG.md
+6Lines changed: 6 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,3 +1,9 @@
1
+
## 0.4.0
2
+
3
+
* The PDFBoxResourceLoader is now used on Android to load PDF documents much faster than before. The fast initialization (i.e. *fastInit*) option has therefore been removed.
4
+
* PDF documents are no longer kept alive in the platform-specific scope. Instead, they are opened and closed at each read with the respective library functions. This does not affect the caching mechanism utilized directly in Dart. This change prevents errors due to multiple document accesses at the same time.
5
+
* Tests have been implemented.
6
+
1
7
## 0.3.1
2
8
3
9
* The possibility to initialize a document faster (without immediately initializing the text stripper engine) on Android has been added.
@@ -71,19 +65,19 @@ Retrieve the number of pages of the document:
71
65
int numPages = doc.length;
72
66
```
73
67
74
-
*Access a page of the document:*
68
+
**Access a page of the document:**
75
69
76
70
```dart
77
71
PDFPage page = doc.pageAt(pageNumber);
78
72
```
79
73
80
-
*Read the text of a page of the document:*
74
+
**Read the text of a page of the document:**
81
75
82
76
```dart
83
77
String pageText = await page.text;
84
78
```
85
79
86
-
*Read the information of the document:*
80
+
**Read the information of the document:**
87
81
88
82
```dart
89
83
PDFDocInfo info = doc.info;
@@ -119,9 +113,9 @@ allows you not to waste time loading text that you will probably not use. When y
119
113
| Return | Description |
120
114
|---|---|
121
115
| PDFPage |**pageAt(int pageNumber)** <br> Gets the page of the document at the given page number. |
122
-
| static Future\<PDFDoc> |**fromFile(File file, {String password = "", bool fastInit = false})** <br> Creates a PDFDoc object with a File instance. Optionally, takes a password for encrypted PDF documents. If fastInit is true, the initialization of the document will be faster on Android. In that case, the text stripper engine will not be initialized with this call, but later when some text is read. This means that the first text read will take some time but the document data can be accessed immediately.|
123
-
| static Future\<PDFDoc> |**fromPath(String path, {String password = "", bool fastInit = false})** <br> Creates a PDFDoc object with a file path. Optionally, takes a password for encrypted PDF documents. If fastInit is true, the initialization of the document will be faster on Android. In that case, the text stripper engine will not be initialized with this call, but later when some text is read. This means that the first text read will take some time but the document data can be accessed immediately.|
124
-
| static Future\<PDFDoc> |**fromURL(String url, {String password = "", bool fastInit = false})** <br> Creates a PDFDoc object with a url. Optionally, takes a password for encrypted PDF documents. If fastInit is true, the initialization of the document will be faster on Android. In that case, the text stripper engine will not be initialized with this call, but later when some text is read. This means that the first text read will take some time but the document data can be accessed immediately. It downloads the PDF file located in the given URL and saves it in the app's temporary directory. |
116
+
| static Future\<PDFDoc> |**fromFile(File file, {String password = ""})** <br> Creates a PDFDoc object with a File instance. Optionally, takes a password for encrypted PDF documents.|
117
+
| static Future\<PDFDoc> |**fromPath(String path, {String password = ""})** <br> Creates a PDFDoc object with a file path. Optionally, takes a password for encrypted PDF documents.|
118
+
| static Future\<PDFDoc> |**fromURL(String url, {String password = ""})** <br> Creates a PDFDoc object with a url. Optionally, takes a password for encrypted PDF documents.|
125
119
| void |**deleteFile()** <br> Deletes the file related to this PDFDoc.<br>Throws an exception if the FileSystemEntity cannot be deleted. |
126
120
| static Future |**deleteAllExternalFiles()** <br> Deletes all the files of the documents that have been imported from outside the local file system (e.g. using fromURL). |
127
121
@@ -155,4 +149,4 @@ class PDFDocInfo {
155
149
## Contribute
156
150
157
151
If you have any suggestions, improvements or issues, feel free to contribute to this project.
158
-
You can either submit a new issue or propose a pull request.
152
+
You can either submit a new issue or propose a pull request. Direct your pull requests into the *dev* branch.
0 commit comments