David PHAM-VAN

Add Document properties

# 1.3.4
* Add available dimensions for PdfPageFormat
* Add Document properties
# 1.3.3
* Fix a bug with the RichText Widget
... ...
... ... @@ -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;
... ...
... ... @@ -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());
... ...
# 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
... ...
... ... @@ -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,
... ...
... ... @@ -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;
}
}
... ...
... ... @@ -13,7 +13,7 @@ environment:
dependencies:
flutter:
sdk: flutter
pdf: "^1.3.3"
pdf: "^1.3.4"
dev_dependencies:
flutter_test:
... ...