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
2023-03-13 09:09:04 -0300
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
75e736867206726ccd171a074e123b8723f4a82a
75e73686
1 parent
80572788
Import already defined form
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
13 additions
and
11 deletions
pdf/CHANGELOG.md
pdf/lib/src/pdf/data_types.dart
pdf/lib/src/pdf/obj/catalog.dart
pdf/CHANGELOG.md
View file @
75e7368
...
...
@@ -6,6 +6,8 @@
-
Fix Color.toHex()
-
Improve Annotations placement
-
Improve documentation strings
-
Improve verbose output
-
Import already defined form
## 3.9.0
...
...
pdf/lib/src/pdf/data_types.dart
View file @
75e7368
...
...
@@ -114,6 +114,10 @@ class PdfNum extends PdfDataType {
return
false
;
}
PdfNum
operator
|(
PdfNum
other
)
{
return
PdfNum
(
value
.
toInt
()
|
other
.
value
.
toInt
());
}
@override
int
get
hashCode
=>
value
.
hashCode
;
}
...
...
pdf/lib/src/pdf/obj/catalog.dart
View file @
75e7368
...
...
@@ -123,17 +123,13 @@ class PdfCatalog extends PdfObjectDict {
}
if
(
widgets
.
isNotEmpty
)
{
params
[
'/AcroForm'
]
=
PdfDict
({
'/SigFlags'
:
PdfNum
(
pdfDocument
.
sign
?.
flagsValue
??
0
),
'/Fields'
:
PdfArray
.
fromObjects
(
widgets
),
});
// final acroForm = (params['/AcroForm'] ??= PdfDict()) as PdfDict;
// acroForm['/SigFlags'] = PdfNum(pdfDocument.sign?.flagsValue ?? 0);
// final fields = (acroForm['/Fields'] ??= PdfArray()) as PdfArray;
// for (final w in widgets) {
// fields.add(w.ref());
// }
final
acroForm
=
(
params
[
'/AcroForm'
]
??=
PdfDict
())
as
PdfDict
;
acroForm
[
'/SigFlags'
]
=
PdfNum
(
pdfDocument
.
sign
?.
flagsValue
??
0
)
|
(
acroForm
[
'/SigFlags'
]
as
PdfNum
?
??
const
PdfNum
(
0
));
final
fields
=
(
acroForm
[
'/Fields'
]
??=
PdfArray
())
as
PdfArray
;
for
(
final
w
in
widgets
)
{
fields
.
add
(
w
.
ref
());
}
}
}
}
...
...
Please
register
or
login
to post a comment