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-09-26 09:42:53 -0300
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
5072e8a9328ee4c8485fc597e95eda054c9b3edc
5072e8a9
1 parent
6be38a92
Add compatibility with web 1.1.0
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
42 additions
and
8 deletions
.github/workflows/dart.yaml
pdf/lib/src/pdf/document.dart
pdf/lib/src/pdf/io/na.dart
printing/CHANGELOG.md
printing/lib/printing_web.dart
printing/lib/src/print_job.dart
.github/workflows/dart.yaml
View file @
5072e8a
...
...
@@ -33,7 +33,7 @@ jobs:
-
name
:
Run readme tests
run
:
make test-readme
-
name
:
Verify that nothing changed
run
:
test -z "$(git status --porcelain)"
run
:
test -z "$(git status --porcelain
| tee /dev/stderr
)"
-
name
:
Push to codecov
run
:
bash <(curl -s https://codecov.io/bash)
-
name
:
Prepare build
...
...
@@ -104,7 +104,7 @@ jobs:
-
name
:
Run readme tests
run
:
make test-readme
-
name
:
Verify that nothing changed
run
:
test -z "$(git status --porcelain)"
run
:
test -z "$(git status --porcelain
| tee /dev/stderr
)"
-
name
:
Push to codecov
run
:
bash <(curl -s https://codecov.io/bash)
-
name
:
Prepare build
...
...
pdf/lib/src/pdf/document.dart
View file @
5072e8a
...
...
@@ -27,7 +27,9 @@ import 'format/stream.dart';
import
'format/string.dart'
;
import
'format/xref.dart'
;
import
'graphic_state.dart'
;
import
'io/vm.dart'
if
(
dart
.
library
.
js
)
'io/js.dart'
;
import
'io/na.dart'
if
(
dart
.
library
.
io
)
'io/vm.dart'
if
(
dart
.
library
.
js_interop
)
'io/js.dart'
;
import
'obj/catalog.dart'
;
import
'obj/encryption.dart'
;
import
'obj/font.dart'
;
...
...
pdf/lib/src/pdf/io/na.dart
0 → 100644
View file @
5072e8a
/*
* Copyright (C) 2017, David PHAM-VAN <dev.nfet.net@gmail.com>
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import
'../format/object_base.dart'
;
/// Zip compression function
DeflateCallback
defaultDeflate
=
(
List
<
int
>
a
)
=>
a
;
/// Computation function
Future
<
R
>
pdfCompute
<
R
>(
Future
<
R
>
Function
()
computation
)
async
{
await
null
;
return
computation
();
}
...
...
printing/CHANGELOG.md
View file @
5072e8a
...
...
@@ -3,6 +3,7 @@
## 5.13.3
-
Update gfonts
[
Minh-Danh
]
-
Add compatibility with web 1.1.0
## 5.13.2
...
...
printing/lib/printing_web.dart
View file @
5072e8a
...
...
@@ -129,10 +129,10 @@ class PrintingPlugin extends PrintingPlatform {
// Restore module and exports
if
(
module
!=
null
)
{
web
.
window
[
'module'
]
=
module
;
web
.
window
.
module
=
module
;
}
if
(
exports
!=
null
)
{
web
.
window
[
'exports'
]
=
exports
;
web
.
window
.
exports
=
exports
;
}
}
...
...
@@ -192,8 +192,8 @@ class PrintingPlugin extends PrintingPlatform {
}
final
userAgent
=
web
.
window
.
navigator
.
userAgent
;
final
isChrome
=
web
.
window
[
'chrome'
]
!=
null
;
final
isSafari
=
web
.
window
[
'safari'
]
!=
null
&&
final
isChrome
=
web
.
window
[
'chrome'
].
isUndefinedOrNull
;
final
isSafari
=
web
.
window
[
'safari'
].
isUndefinedOrNull
&&
!
userAgent
.
contains
(
RegExp
(
r'Version/14\.1\.'
));
final
isMobile
=
userAgent
.
contains
(
'Mobile'
);
final
isFirefox
=
userAgent
.
contains
(
'Firefox'
);
...
...
@@ -439,3 +439,8 @@ class _WebPdfRaster extends PdfRaster {
return
png
;
}
}
extension
_WindowModule
on
web
.
Window
{
external
set
module
(
js
.
JSObject
?
value
);
external
set
exports
(
js
.
JSObject
?
value
);
}
...
...
printing/lib/src/print_job.dart
View file @
5072e8a
...
...
@@ -15,7 +15,7 @@
*/
import
'dart:async'
;
import
'dart:io'
;
import
'dart:io'
show
Platform
;
import
'dart:typed_data'
;
import
'callback.dart'
;
...
...
Please
register
or
login
to post a comment