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
2024-01-27 09:58:03 -0400
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
7cc4851d41caf9e64e05c5f2ee3ce69c0db6290c
7cc4851d
1 parent
e09ea755
Refactor html imports
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
7 deletions
printing/CHANGELOG.md
printing/lib/printing_web.dart
printing/pubspec.yaml
printing/CHANGELOG.md
View file @
7cc4851
# Changelog
## 5.1.2
-
Refactor html imports
## 5.11.1
-
Use pdfDpi on CPP lib
...
...
printing/lib/printing_web.dart
View file @
7cc4851
...
...
@@ -16,7 +16,6 @@
import
'dart:async'
;
import
'dart:html'
as
html
;
import
'dart:html'
;
import
'dart:js'
as
js
;
import
'dart:js_util'
;
import
'dart:typed_data'
;
...
...
@@ -87,12 +86,12 @@ class PrintingPlugin extends PrintingPlatform {
}
js
.
context
[
'module'
]
=
0
;
final
script
=
ScriptElement
()
final
script
=
html
.
ScriptElement
()
..
type
=
'text/javascript'
..
async
=
true
..
src
=
'
$_pdfJsUrlBase
/build/pdf.min.js'
;
assert
(
document
.
head
!=
null
);
document
.
head
!.
append
(
script
);
assert
(
html
.
document
.
head
!=
null
);
html
.
document
.
head
!.
append
(
script
);
await
script
.
onLoad
.
first
;
if
(
amd
!=
null
)
{
...
...
@@ -344,10 +343,10 @@ class PrintingPlugin extends PrintingPlatform {
final
completer
=
Completer
<
void
>();
final
blob
=
await
canvas
.
toBlob
();
final
data
=
BytesBuilder
();
final
r
=
FileReader
();
final
r
=
html
.
FileReader
();
r
.
readAsArrayBuffer
(
blob
);
r
.
onLoadEnd
.
listen
(
(
ProgressEvent
e
)
{
(
html
.
ProgressEvent
e
)
{
data
.
add
(
r
.
result
as
List
<
int
>);
completer
.
complete
();
},
...
...
printing/pubspec.yaml
View file @
7cc4851
...
...
@@ -15,7 +15,7 @@ topics:
-
print
-
printing
-
report
version
:
5.11.
1
version
:
5.11.
2
environment
:
sdk
:
"
>=3.0.0
<4.0.0"
...
...
Please
register
or
login
to post a comment