fix(pdf): make footer and all content stay compact and strictly within half-sheet area
This commit is contained in:
@@ -69,9 +69,12 @@ class DepartmentReferralPdfService {
|
||||
crossAxisAlignment: pw.CrossAxisAlignment.stretch,
|
||||
children: [
|
||||
// Mitad superior de la hoja (máximo 5.5 pulgadas / 396 pt)
|
||||
pw.Container(
|
||||
height: 5.5 * PdfPageFormat.inch - 36,
|
||||
pw.ConstrainedBox(
|
||||
constraints: const pw.BoxConstraints(
|
||||
maxHeight: 5.5 * PdfPageFormat.inch - 36,
|
||||
),
|
||||
child: pw.Column(
|
||||
mainAxisSize: pw.MainAxisSize.min,
|
||||
crossAxisAlignment: pw.CrossAxisAlignment.stretch,
|
||||
children: [
|
||||
// 1. Cabecera con Nombre del Doctor y Badge Sutil de Hidalyx Med
|
||||
@@ -168,23 +171,28 @@ class DepartmentReferralPdfService {
|
||||
pw.SizedBox(height: 8),
|
||||
|
||||
// 2. Contenido del Referimiento (Idéntico a AlfaMedical)
|
||||
pw.Expanded(
|
||||
child: pw.Container(
|
||||
padding: const pw.EdgeInsets.symmetric(vertical: 4),
|
||||
child: pw.Text(
|
||||
referralText.trim().isNotEmpty
|
||||
? referralText.trim()
|
||||
: 'Sin detalles de referimiento.',
|
||||
style: pw.TextStyle(
|
||||
font: regular,
|
||||
fontSize: 10.5,
|
||||
lineSpacing: 3.5,
|
||||
color: PdfColor.fromHex('1E293B'),
|
||||
),
|
||||
pw.Container(
|
||||
padding: const pw.EdgeInsets.symmetric(vertical: 6),
|
||||
child: pw.Text(
|
||||
referralText.trim().isNotEmpty
|
||||
? referralText.trim()
|
||||
: 'Sin detalles de referimiento.',
|
||||
style: pw.TextStyle(
|
||||
font: regular,
|
||||
fontSize: 10.5,
|
||||
lineSpacing: 3.5,
|
||||
color: PdfColor.fromHex('1E293B'),
|
||||
),
|
||||
),
|
||||
),
|
||||
pw.SizedBox(height: 6),
|
||||
pw.SizedBox(height: 10),
|
||||
|
||||
// Línea divisoria decorativa previa al pie
|
||||
pw.Container(
|
||||
height: 0.5,
|
||||
color: PdfColor.fromHex('CBD5E1'),
|
||||
),
|
||||
pw.SizedBox(height: 5),
|
||||
|
||||
// 3. Pie de página con Contacto del Consultorio
|
||||
if (generalContact.isNotEmpty) ...[
|
||||
|
||||
@@ -69,9 +69,12 @@ class DoctorReferralPdfService {
|
||||
crossAxisAlignment: pw.CrossAxisAlignment.stretch,
|
||||
children: [
|
||||
// Mitad superior de la hoja (máximo 5.5 pulgadas / 396 pt)
|
||||
pw.Container(
|
||||
height: 5.5 * PdfPageFormat.inch - 36,
|
||||
pw.ConstrainedBox(
|
||||
constraints: const pw.BoxConstraints(
|
||||
maxHeight: 5.5 * PdfPageFormat.inch - 36,
|
||||
),
|
||||
child: pw.Column(
|
||||
mainAxisSize: pw.MainAxisSize.min,
|
||||
crossAxisAlignment: pw.CrossAxisAlignment.stretch,
|
||||
children: [
|
||||
// 1. Cabecera con Nombre del Doctor y Badge Sutil de Hidalyx Med
|
||||
@@ -168,23 +171,28 @@ class DoctorReferralPdfService {
|
||||
pw.SizedBox(height: 8),
|
||||
|
||||
// 2. Contenido del Referimiento (Idéntico a AlfaMedical con fontSize 13-14)
|
||||
pw.Expanded(
|
||||
child: pw.Container(
|
||||
padding: const pw.EdgeInsets.symmetric(vertical: 4),
|
||||
child: pw.Text(
|
||||
referralText.trim().isNotEmpty
|
||||
? referralText.trim()
|
||||
: 'Sin detalles de referimiento.',
|
||||
style: pw.TextStyle(
|
||||
font: regular,
|
||||
fontSize: 10.5,
|
||||
lineSpacing: 3.5,
|
||||
color: PdfColor.fromHex('1E293B'),
|
||||
),
|
||||
pw.Container(
|
||||
padding: const pw.EdgeInsets.symmetric(vertical: 6),
|
||||
child: pw.Text(
|
||||
referralText.trim().isNotEmpty
|
||||
? referralText.trim()
|
||||
: 'Sin detalles de referimiento.',
|
||||
style: pw.TextStyle(
|
||||
font: regular,
|
||||
fontSize: 10.5,
|
||||
lineSpacing: 3.5,
|
||||
color: PdfColor.fromHex('1E293B'),
|
||||
),
|
||||
),
|
||||
),
|
||||
pw.SizedBox(height: 6),
|
||||
pw.SizedBox(height: 10),
|
||||
|
||||
// Línea divisoria decorativa previa al pie
|
||||
pw.Container(
|
||||
height: 0.5,
|
||||
color: PdfColor.fromHex('CBD5E1'),
|
||||
),
|
||||
pw.SizedBox(height: 5),
|
||||
|
||||
// 3. Pie de página con Contacto del Consultorio
|
||||
if (generalContact.isNotEmpty) ...[
|
||||
|
||||
Reference in New Issue
Block a user