Toggle navigation
Toggle navigation
This project
Loading...
Sign in
flutter_package
/
dart_pdf
Go to a project
Toggle navigation
Projects
Groups
Snippets
Help
Toggle navigation pinning
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Authored by
David PHAM-VAN
2022-05-12 08:13:07 -0300
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
6036109a8bb9d0ebcb72b518ffe9ecee826554f6
6036109a
1 parent
565fbc6b
Fix large PDF generation on web with compressed xref
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
7 additions
and
6 deletions
pdf/CHANGELOG.md
pdf/lib/src/pdf/xref.dart
pdf/pubspec.yaml
pdf/CHANGELOG.md
View file @
6036109
# Changelog
## 3.8.1
-
Fix large PDF generation on web with compressed xref
## 3.8.0
-
Update xml dependency range
...
...
pdf/lib/src/pdf/xref.dart
View file @
6036109
...
...
@@ -14,6 +14,7 @@
* limitations under the License.
*/
import
'dart:math'
as
math
;
import
'dart:typed_data'
;
import
'data_types.dart'
;
...
...
@@ -185,11 +186,7 @@ class PdfXrefTable extends PdfDataType {
params
[
'/Index'
]
=
PdfArray
.
fromNum
(
blocks
);
}
var
bytes
=
2
;
// A pdf less than 256 bytes is unlikely
while
(
1
<<
(
bytes
*
8
)
<
offset
)
{
bytes
++;
}
final
bytes
=
(
math
.
log
(
offset
)
~/
math
.
ln2
)
~/
8
;
final
w
=
[
1
,
bytes
,
1
];
params
[
'/W'
]
=
PdfArray
.
fromNum
(
w
);
final
wl
=
w
.
reduce
((
a
,
b
)
=>
a
+
b
);
...
...
pdf/pubspec.yaml
View file @
6036109
...
...
@@ -3,7 +3,7 @@ description: A pdf producer for Dart. It can create pdf files for both web or fl
homepage
:
https://github.com/DavBfr/dart_pdf/tree/master/pdf
repository
:
https://github.com/DavBfr/dart_pdf
issue_tracker
:
https://github.com/DavBfr/dart_pdf/issues
version
:
3.8.
0
version
:
3.8.
1
environment
:
sdk
:
"
>=2.12.0
<3.0.0"
...
...
Please
register
or
login
to post a comment