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
2019-02-27 21:19:20 -0500
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
11c878aafbf519f04818abb350ffbfec828c877d
11c878aa
1 parent
c7b31369
Add Document properties
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
42 additions
and
7 deletions
pdf/CHANGELOG.md
pdf/lib/widgets/document.dart
pdf/test/widget_test.dart
printing/CHANGELOG.md
printing/example/lib/document.dart
printing/lib/src/widgets.dart
printing/pubspec.yaml
pdf/CHANGELOG.md
View file @
11c878a
# 1.3.4
*
Add available dimensions for PdfPageFormat
*
Add Document properties
# 1.3.3
*
Fix a bug with the RichText Widget
...
...
pdf/lib/widgets/document.dart
View file @
11c878a
...
...
@@ -29,8 +29,22 @@ class Document {
Document
(
{
PdfPageMode
pageMode
=
PdfPageMode
.
none
,
DeflateCallback
deflate
,
this
.
theme
})
:
document
=
PdfDocument
(
pageMode:
pageMode
,
deflate:
deflate
);
this
.
theme
,
String
title
,
String
author
,
String
creator
,
String
subject
,
String
keywords
,
String
producer
})
:
document
=
PdfDocument
(
pageMode:
pageMode
,
deflate:
deflate
)
{
document
.
info
=
PdfInfo
(
document
,
title:
title
,
author:
author
,
creator:
creator
,
subject:
subject
,
keywords:
keywords
,
producer:
producer
);
}
static
bool
debug
=
false
;
...
...
pdf/test/widget_test.dart
View file @
11c878a
...
...
@@ -25,7 +25,7 @@ void main() {
test
(
'Pdf'
,
()
{
Document
.
debug
=
true
;
final
Document
pdf
=
Document
();
final
Document
pdf
=
Document
(
title:
'Widgets Test'
);
final
TextStyle
symbol
=
TextStyle
(
font:
Font
.
zapfDingbats
());
...
...
printing/CHANGELOG.md
View file @
11c878a
# 2.0.0
*
Breaking change: Switch libraries to AndroidX
*
Add Page information to PdfDoc object
# 1.3.5
*
Restore compatibility with Flutter 1.0.0
...
...
printing/example/lib/document.dart
View file @
11c878a
...
...
@@ -104,7 +104,7 @@ class Category extends StatelessWidget {
}
Future
<
PdfDocument
>
generateDocument
(
PdfPageFormat
format
)
async
{
final
PdfDoc
pdf
=
PdfDoc
();
final
PdfDoc
pdf
=
PdfDoc
(
title:
'My Résumé'
,
author:
'David PHAM-VAN'
);
final
PdfImage
profileImage
=
await
pdfImageFromImageProvider
(
pdf:
pdf
.
document
,
...
...
printing/lib/src/widgets.dart
View file @
11c878a
...
...
@@ -18,8 +18,27 @@ part of printing;
class
PdfDoc
extends
Document
{
/// Wrapper for a [Document] with zlib compression enabled by default
PdfDoc
({
bool
compress
=
true
})
:
super
(
deflate:
compress
?
zlib
.
encode
:
null
)
{
PdfDoc
(
{
bool
compress
=
true
,
PdfPageMode
pageMode
=
PdfPageMode
.
none
,
Theme
theme
,
String
title
,
String
author
,
String
creator
,
String
subject
,
String
keywords
,
String
producer
})
:
super
(
deflate:
compress
?
zlib
.
encode
:
null
,
pageMode:
pageMode
,
theme:
theme
,
title:
title
,
author:
author
,
creator:
creator
,
subject:
subject
,
keywords:
keywords
,
producer:
producer
,
)
{
Document
.
debug
=
debugPaintSizeEnabled
;
}
}
...
...
printing/pubspec.yaml
View file @
11c878a
...
...
@@ -13,7 +13,7 @@ environment:
dependencies
:
flutter
:
sdk
:
flutter
pdf
:
"
^1.3.
3
"
pdf
:
"
^1.3.
4
"
dev_dependencies
:
flutter_test
:
...
...
Please
register
or
login
to post a comment