David PHAM-VAN

Add available dimensions for PdfPageFormat

# 1.3.4
* Add available dimensions for PdfPageFormat
# 1.3.3
* Fix a bug with the RichText Widget
* Update code to Dart 2.1.0
... ...
... ... @@ -66,8 +66,18 @@ class PdfPageFormat {
marginRight: marginRight ?? this.marginRight);
}
/// Total page dimensions
PdfPoint get dimension => PdfPoint(width, height);
/// Total page width excluding margins
double get availableWidth => width - marginLeft - marginRight;
/// Total page height excluding margins
double get availableHeight => height - marginTop - marginBottom;
/// Total page dimensions excluding margins
PdfPoint get availableDimension => PdfPoint(availableWidth, availableHeight);
PdfPageFormat get landscape =>
width >= height ? this : copyWith(width: height, height: width);
... ... @@ -85,6 +95,6 @@ class PdfPageFormat {
@override
String toString() {
return '${width}x$height';
return 'Page ${width}x$height margins:$marginLeft, $marginTop, $marginRight, $marginBottom';
}
}
... ...
... ... @@ -4,7 +4,7 @@ description: A pdf producer for Dart. It can create pdf files for both web or fl
homepage: https://github.com/DavBfr/dart_pdf/tree/master/pdf
repository: https://github.com/DavBfr/dart_pdf
issue_tracker: https://github.com/DavBfr/dart_pdf/issues
version: 1.3.3
version: 1.3.4
environment:
sdk: ">=2.1.0 <3.0.0"
... ...