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-28 04:59:44 -0500
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
18ebd364671aeab788bd115a89a9f930a44a0d4f
18ebd364
1 parent
11c878aa
Add a default page format constant
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
4 additions
and
2 deletions
pdf/lib/src/page.dart
pdf/lib/src/page_format.dart
pdf/lib/widgets/document.dart
pdf/lib/src/page.dart
View file @
18ebd36
...
...
@@ -24,7 +24,7 @@ class PdfPage extends PdfObject {
///
/// @param pdfDocument Document
/// @param pageFormat [PdfPageFormat] describing the page size
PdfPage
(
PdfDocument
pdfDocument
,
{
this
.
pageFormat
=
PdfPageFormat
.
a4
})
PdfPage
(
PdfDocument
pdfDocument
,
{
this
.
pageFormat
=
PdfPageFormat
.
standard
})
:
super
(
pdfDocument
,
'/Page'
)
{
pdfDocument
.
pdfPageList
.
pages
.
add
(
this
);
}
...
...
pdf/lib/src/page_format.dart
View file @
18ebd36
...
...
@@ -39,6 +39,8 @@ class PdfPageFormat {
static
const
PdfPageFormat
legal
=
PdfPageFormat
(
8.5
*
inch
,
14.0
*
inch
,
marginAll:
inch
);
static
const
PdfPageFormat
standard
=
a4
;
static
const
double
point
=
1.0
;
static
const
double
inch
=
72.0
;
static
const
double
cm
=
inch
/
2.54
;
...
...
pdf/lib/widgets/document.dart
View file @
18ebd36
...
...
@@ -64,7 +64,7 @@ typedef BuildListCallback = List<Widget> Function(Context context);
class
Page
extends
BasePage
{
Page
(
{
PdfPageFormat
pageFormat
=
PdfPageFormat
.
a4
,
{
PdfPageFormat
pageFormat
=
PdfPageFormat
.
standard
,
BuildCallback
build
,
this
.
theme
,
EdgeInsets
margin
})
...
...
Please
register
or
login
to post a comment