asdasdasd

This commit is contained in:
Phuoc Nguyen
2025-10-29 16:31:04 +07:00
parent c12869b01f
commit efcc6306b0
6 changed files with 4351 additions and 17 deletions

View File

@@ -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),