We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Describe the bug
Whenever trying to write a table with emoji's included in the header it doesn't print the emojis.
To Reproduce Code snippet to reproduce the behavior:
import 'dart:io'; import 'package:pdf/pdf.dart'; import 'package:pdf/widgets.dart' as pw; Future<void> main(List<String> arguments) async { await buildPdf(); } Future<void> buildPdf() async { final document = pw.Document(pageMode: PdfPageMode.outlines); final defaultFont = pw.Font.helvetica(); final boldFont = pw.Font.helveticaBold(); document.addPage( pw.Page( theme: pw.ThemeData.withFont( base: defaultFont, bold: boldFont, ), build: (pw.Context context) { return pw.TableHelper.fromTextArray( context: context, border: pw.TableBorder.all(width: 0.2), data: <List<String>>[ ['', '✅ Passed', '❌ Failed'], ['my_app', '0', '100'], ['my_package', '20', '0'] ], cellAlignments: { 0: pw.Alignment.topCenter, 1: pw.Alignment.topCenter, 2: pw.Alignment.topCenter }, ); }, ), ); final file = await File('output/report.pdf').create(recursive: true); await file.writeAsBytes(await document.save()); }
Expected behavior
After creating the PDF document with dart_pdf I would see emoji's in the document
dart_pdf
Screenshots
This is what the produced PDF shows
Additional context
This is a command-line app so I am unable to make use of any Flutter packages
dart_pdf: ^3.10.8
Dart SDK version: 3.1.5 (stable) (Tue Oct 24 04:57:17 2023 +0000) on "macos_arm64"
The text was updated successfully, but these errors were encountered:
You need to load an emoji font. Look at https://github.com/DavBfr/dart_pdf/blob/master/pdf/test/widget_text_test.dart#L362
Sorry, something went wrong.
I've tried that already with Noto Color Emoji font but it didn't work. What font do you recommend?
No branches or pull requests
Describe the bug
Whenever trying to write a table with emoji's included in the header it doesn't print the emojis.
To Reproduce
Code snippet to reproduce the behavior:
Expected behavior
After creating the PDF document with
dart_pdf
I would see emoji's in the documentScreenshots
This is what the produced PDF shows
Additional context
This is a command-line app so I am unable to make use of any Flutter packages
dart_pdf: ^3.10.8
Dart SDK version: 3.1.5 (stable) (Tue Oct 24 04:57:17 2023 +0000) on "macos_arm64"
The text was updated successfully, but these errors were encountered: