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
2018-10-28 08:25:44 -0400
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
3f7505df9b8f822cce6cebb305a9b1ba1b729160
3f7505df
1 parent
8c283153
Use lower case constants
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
34 additions
and
9 deletions
pdf/lib/src/page_format.dart
pdf/lib/src/page_format.dart
View file @
3f7505d
...
...
@@ -19,16 +19,35 @@
part of
pdf
;
class
PDFPageFormat
{
static
const
A4
=
const
PDFPageFormat
(
595.28
,
841.89
);
static
const
A3
=
const
PDFPageFormat
(
841.89
,
1190.55
);
static
const
A5
=
const
PDFPageFormat
(
420.94
,
595.28
);
static
const
LETTER
=
const
PDFPageFormat
(
612.0
,
792.0
);
static
const
LEGAL
=
const
PDFPageFormat
(
612.0
,
1008.0
);
static
const
a4
=
const
PDFPageFormat
(
595.28
,
841.89
);
static
const
a3
=
const
PDFPageFormat
(
841.89
,
1190.55
);
static
const
a5
=
const
PDFPageFormat
(
420.94
,
595.28
);
static
const
letter
=
const
PDFPageFormat
(
612.0
,
792.0
);
static
const
legal
=
const
PDFPageFormat
(
612.0
,
1008.0
);
static
const
PT
=
1.0
;
static
const
IN
=
72.0
;
static
const
CM
=
IN
/
2.54
;
static
const
MM
=
IN
/
25.4
;
static
const
point
=
1.0
;
static
const
inch
=
72.0
;
static
const
cm
=
inch
/
2.54
;
static
const
mm
=
inch
/
25.4
;
@deprecated
static
const
A4
=
a4
;
@deprecated
static
const
A3
=
a3
;
@deprecated
static
const
A5
=
a5
;
@deprecated
static
const
LETTER
=
letter
;
@deprecated
static
const
LEGAL
=
legal
;
@deprecated
static
const
PT
=
point
;
@deprecated
static
const
IN
=
inch
;
@deprecated
static
const
CM
=
cm
;
@deprecated
static
const
MM
=
mm
;
final
double
width
;
final
double
height
;
...
...
@@ -36,4 +55,10 @@ class PDFPageFormat {
const
PDFPageFormat
(
this
.
width
,
this
.
height
);
PDFPoint
get
dimension
=>
new
PDFPoint
(
width
,
height
);
PDFPageFormat
get
landscape
=>
width
>=
height
?
this
:
PDFPageFormat
(
height
,
width
);
PDFPageFormat
get
portrait
=>
height
>=
width
?
this
:
PDFPageFormat
(
height
,
width
);
}
...
...
Please
register
or
login
to post a comment