asdasdasd
This commit is contained in:
@@ -21,16 +21,25 @@ class PrintService {
|
||||
String? responsibleName,
|
||||
String? barcodeData,
|
||||
}) async {
|
||||
// Load Vietnamese-compatible fonts using PdfGoogleFonts
|
||||
// Noto Sans has excellent Vietnamese character support
|
||||
final fontRegular = await PdfGoogleFonts.notoSansRegular();
|
||||
final fontBold = await PdfGoogleFonts.notoSansBold();
|
||||
|
||||
final pdf = pw.Document();
|
||||
|
||||
// Format current date
|
||||
final dt = DateFormat('dd/MM/yyyy HH:mm').format(DateTime.now());
|
||||
|
||||
// Add page to PDF
|
||||
// Add page to PDF with theme for Vietnamese font support
|
||||
pdf.addPage(
|
||||
pw.Page(
|
||||
pageFormat: PdfPageFormat.a4,
|
||||
margin: const pw.EdgeInsets.all(12),
|
||||
theme: pw.ThemeData.withFont(
|
||||
base: fontRegular,
|
||||
bold: fontBold,
|
||||
),
|
||||
build: (pw.Context pdfContext) {
|
||||
return pw.Container(
|
||||
padding: const pw.EdgeInsets.all(12),
|
||||
|
||||
Reference in New Issue
Block a user