Showing
11 changed files
with
11 additions
and
11 deletions
| @@ -20,7 +20,7 @@ import 'package:pdf/pdf.dart'; | @@ -20,7 +20,7 @@ import 'package:pdf/pdf.dart'; | ||
| 20 | import 'package:test/test.dart'; | 20 | import 'package:test/test.dart'; |
| 21 | 21 | ||
| 22 | void main() { | 22 | void main() { |
| 23 | - test('Pdf', () { | 23 | + test('Pdf Annotations', () { |
| 24 | final PdfDocument pdf = PdfDocument(); | 24 | final PdfDocument pdf = PdfDocument(); |
| 25 | final PdfPage page = | 25 | final PdfPage page = |
| 26 | PdfPage(pdf, pageFormat: const PdfPageFormat(500, 300)); | 26 | PdfPage(pdf, pageFormat: const PdfPageFormat(500, 300)); |
| @@ -51,7 +51,7 @@ class Color extends StatelessWidget { | @@ -51,7 +51,7 @@ class Color extends StatelessWidget { | ||
| 51 | } | 51 | } |
| 52 | 52 | ||
| 53 | void main() { | 53 | void main() { |
| 54 | - test('Pdf', () { | 54 | + test('Pdf Colors', () { |
| 55 | final Document pdf = Document(title: 'Material Colors'); | 55 | final Document pdf = Document(title: 'Material Colors'); |
| 56 | 56 | ||
| 57 | pdf.addPage(MultiPage( | 57 | pdf.addPage(MultiPage( |
| @@ -23,7 +23,7 @@ import 'package:test/test.dart'; | @@ -23,7 +23,7 @@ import 'package:test/test.dart'; | ||
| 23 | import 'package:vector_math/vector_math_64.dart'; | 23 | import 'package:vector_math/vector_math_64.dart'; |
| 24 | 24 | ||
| 25 | void main() { | 25 | void main() { |
| 26 | - test('Pdf', () { | 26 | + test('Pdf Complex', () { |
| 27 | final Uint32List img = Uint32List(10 * 10); | 27 | final Uint32List img = Uint32List(10 * 10); |
| 28 | img.fillRange(0, img.length - 1, 0x12345678); | 28 | img.fillRange(0, img.length - 1, 0x12345678); |
| 29 | 29 |
| @@ -32,7 +32,7 @@ Future<Uint8List> download(String url) async { | @@ -32,7 +32,7 @@ Future<Uint8List> download(String url) async { | ||
| 32 | } | 32 | } |
| 33 | 33 | ||
| 34 | void main() { | 34 | void main() { |
| 35 | - test('Pdf1', () async { | 35 | + test('Pdf Jpeg', () async { |
| 36 | final PdfDocument pdf = PdfDocument(); | 36 | final PdfDocument pdf = PdfDocument(); |
| 37 | final PdfPage page = PdfPage(pdf, pageFormat: PdfPageFormat.a4); | 37 | final PdfPage page = PdfPage(pdf, pageFormat: PdfPageFormat.a4); |
| 38 | 38 |
| @@ -58,7 +58,7 @@ void printMetrics( | @@ -58,7 +58,7 @@ void printMetrics( | ||
| 58 | } | 58 | } |
| 59 | 59 | ||
| 60 | void main() { | 60 | void main() { |
| 61 | - test('Pdf', () { | 61 | + test('Pdf Font Metrics', () { |
| 62 | final Document pdf = Document(); | 62 | final Document pdf = Document(); |
| 63 | 63 | ||
| 64 | final File ttfFont = File('open-sans.ttf'); | 64 | final File ttfFont = File('open-sans.ttf'); |
| @@ -20,7 +20,7 @@ import 'package:pdf/pdf.dart'; | @@ -20,7 +20,7 @@ import 'package:pdf/pdf.dart'; | ||
| 20 | import 'package:test/test.dart'; | 20 | import 'package:test/test.dart'; |
| 21 | 21 | ||
| 22 | void main() { | 22 | void main() { |
| 23 | - test('Pdf1', () { | 23 | + test('Pdf Minimal', () { |
| 24 | final PdfDocument pdf = PdfDocument(); | 24 | final PdfDocument pdf = PdfDocument(); |
| 25 | final PdfPage page = PdfPage(pdf, pageFormat: PdfPageFormat.a4); | 25 | final PdfPage page = PdfPage(pdf, pageFormat: PdfPageFormat.a4); |
| 26 | 26 |
| @@ -58,7 +58,7 @@ void printTextTtf(PdfGraphics canvas, String text, File ttfFont, double top) { | @@ -58,7 +58,7 @@ void printTextTtf(PdfGraphics canvas, String text, File ttfFont, double top) { | ||
| 58 | } | 58 | } |
| 59 | 59 | ||
| 60 | void main() { | 60 | void main() { |
| 61 | - test('Pdf', () { | 61 | + test('Pdf TrueType', () { |
| 62 | final PdfDocument pdf = PdfDocument(); | 62 | final PdfDocument pdf = PdfDocument(); |
| 63 | final PdfPage page = | 63 | final PdfPage page = |
| 64 | PdfPage(pdf, pageFormat: const PdfPageFormat(500, 300)); | 64 | PdfPage(pdf, pageFormat: const PdfPageFormat(500, 300)); |
| @@ -49,7 +49,7 @@ void printText(PdfGraphics canvas, String text, PdfFont font, double top) { | @@ -49,7 +49,7 @@ void printText(PdfGraphics canvas, String text, PdfFont font, double top) { | ||
| 49 | } | 49 | } |
| 50 | 50 | ||
| 51 | void main() { | 51 | void main() { |
| 52 | - test('Pdf', () { | 52 | + test('Pdf Type1 Embedded Fonts', () { |
| 53 | final PdfDocument pdf = PdfDocument(); | 53 | final PdfDocument pdf = PdfDocument(); |
| 54 | final PdfPage page = | 54 | final PdfPage page = |
| 55 | PdfPage(pdf, pageFormat: const PdfPageFormat(500, 430)); | 55 | PdfPage(pdf, pageFormat: const PdfPageFormat(500, 430)); |
| @@ -22,7 +22,7 @@ import 'package:pdf/widgets.dart'; | @@ -22,7 +22,7 @@ import 'package:pdf/widgets.dart'; | ||
| 22 | import 'package:test/test.dart'; | 22 | import 'package:test/test.dart'; |
| 23 | 23 | ||
| 24 | void main() { | 24 | void main() { |
| 25 | - test('Pdf', () { | 25 | + test('Pdf Widgets', () { |
| 26 | Document.debug = true; | 26 | Document.debug = true; |
| 27 | 27 | ||
| 28 | final Document pdf = Document(title: 'Widgets Test'); | 28 | final Document pdf = Document(title: 'Widgets Test'); |
| @@ -111,7 +111,7 @@ Future<PdfDocument> generateDocument(PdfPageFormat format) async { | @@ -111,7 +111,7 @@ Future<PdfDocument> generateDocument(PdfPageFormat format) async { | ||
| 111 | image: const fw.NetworkImage( | 111 | image: const fw.NetworkImage( |
| 112 | 'https://www.gravatar.com/avatar/00000000000000000000000000000000?d=mp&s=200'), | 112 | 'https://www.gravatar.com/avatar/00000000000000000000000000000000?d=mp&s=200'), |
| 113 | onError: (dynamic exception, StackTrace stackTrace) { | 113 | onError: (dynamic exception, StackTrace stackTrace) { |
| 114 | - print('error'); | 114 | + print('Unable to download image'); |
| 115 | }); | 115 | }); |
| 116 | 116 | ||
| 117 | pdf.addPage(MyPage( | 117 | pdf.addPage(MyPage( |
| @@ -7,7 +7,7 @@ import 'package:pdf/pdf.dart'; | @@ -7,7 +7,7 @@ import 'package:pdf/pdf.dart'; | ||
| 7 | import 'package:printing_example/document.dart'; | 7 | import 'package:printing_example/document.dart'; |
| 8 | 8 | ||
| 9 | void main() { | 9 | void main() { |
| 10 | - testWidgets('Generate the Pdf document', (WidgetTester tester) async { | 10 | + testWidgets('Pdf Generate the document', (WidgetTester tester) async { |
| 11 | final PdfDocument pdf = await generateDocument(PdfPageFormat.a4); | 11 | final PdfDocument pdf = await generateDocument(PdfPageFormat.a4); |
| 12 | final File file = File('document.pdf'); | 12 | final File file = File('document.pdf'); |
| 13 | file.writeAsBytesSync(pdf.save()); | 13 | file.writeAsBytesSync(pdf.save()); |
-
Please register or login to post a comment