fix(pdf): maintain exact media-carta height and anchor footer for short clinical texts
This commit is contained in:
@@ -73,13 +73,11 @@ class InsuranceAuthPdfService {
|
||||
return pw.Column(
|
||||
crossAxisAlignment: pw.CrossAxisAlignment.stretch,
|
||||
children: [
|
||||
// Mitad superior de la hoja (máximo 5.5 pulgadas / 396 pt)
|
||||
pw.ConstrainedBox(
|
||||
constraints: const pw.BoxConstraints(
|
||||
maxHeight: 5.5 * PdfPageFormat.inch - 32,
|
||||
),
|
||||
// Mitad superior de la hoja: altura fija de media carta (5.5 pulgadas / 396 pt)
|
||||
// para que el pie de página siempre quede anclado al final de la media hoja.
|
||||
pw.SizedBox(
|
||||
height: 5.5 * PdfPageFormat.inch - 32,
|
||||
child: pw.Column(
|
||||
mainAxisSize: pw.MainAxisSize.min,
|
||||
crossAxisAlignment: pw.CrossAxisAlignment.stretch,
|
||||
children: [
|
||||
// 1. Cabecera con Nombre del Doctor y Badge Sutil de Hidalyx Med
|
||||
@@ -209,10 +207,10 @@ class InsuranceAuthPdfService {
|
||||
),
|
||||
pw.SizedBox(height: 8),
|
||||
|
||||
// 3. Contenido Formal idéntico a AlfaMedical
|
||||
pw.Column(
|
||||
// 3. Contenido Formal idéntico a AlfaMedical (ocupa el espacio central disponible)
|
||||
pw.Expanded(
|
||||
child: pw.Column(
|
||||
crossAxisAlignment: pw.CrossAxisAlignment.stretch,
|
||||
mainAxisSize: pw.MainAxisSize.min,
|
||||
children: [
|
||||
// Señores ARS
|
||||
pw.RichText(
|
||||
@@ -314,7 +312,8 @@ class InsuranceAuthPdfService {
|
||||
],
|
||||
],
|
||||
),
|
||||
pw.SizedBox(height: 10),
|
||||
),
|
||||
pw.SizedBox(height: 6),
|
||||
|
||||
// Línea divisoria decorativa previa al pie
|
||||
pw.Container(
|
||||
|
||||
@@ -70,13 +70,11 @@ class PrescriptionPdfService {
|
||||
return pw.Column(
|
||||
crossAxisAlignment: pw.CrossAxisAlignment.stretch,
|
||||
children: [
|
||||
// Mitad superior de la hoja (máximo 5.5 pulgadas / 396 pt)
|
||||
pw.ConstrainedBox(
|
||||
constraints: const pw.BoxConstraints(
|
||||
maxHeight: 5.5 * PdfPageFormat.inch - 32,
|
||||
),
|
||||
// Mitad superior de la hoja: altura fija de media carta (5.5 pulgadas / 396 pt)
|
||||
// para que el pie de página siempre quede anclado al final de la media hoja.
|
||||
pw.SizedBox(
|
||||
height: 5.5 * PdfPageFormat.inch - 32,
|
||||
child: pw.Column(
|
||||
mainAxisSize: pw.MainAxisSize.min,
|
||||
crossAxisAlignment: pw.CrossAxisAlignment.stretch,
|
||||
children: [
|
||||
// 1. Cabecera con Nombre del Doctor y Badge Superior de Hidalyx Med
|
||||
@@ -221,9 +219,11 @@ class PrescriptionPdfService {
|
||||
),
|
||||
pw.SizedBox(height: 8),
|
||||
|
||||
// 3. Contenido de la Receta / Prescripción Médica
|
||||
pw.Container(
|
||||
padding: const pw.EdgeInsets.symmetric(vertical: 6),
|
||||
// 3. Contenido de la Receta / Prescripción Médica (ocupa el espacio central disponible)
|
||||
pw.Expanded(
|
||||
child: pw.Container(
|
||||
alignment: pw.Alignment.topLeft,
|
||||
padding: const pw.EdgeInsets.symmetric(vertical: 4),
|
||||
child: pw.Text(
|
||||
prescriptionText.trim().isNotEmpty
|
||||
? prescriptionText.trim()
|
||||
@@ -236,7 +236,8 @@ class PrescriptionPdfService {
|
||||
),
|
||||
),
|
||||
),
|
||||
pw.SizedBox(height: 10),
|
||||
),
|
||||
pw.SizedBox(height: 6),
|
||||
|
||||
// Línea sutil previa al pie de página
|
||||
pw.Container(
|
||||
|
||||
@@ -68,13 +68,11 @@ class DepartmentReferralPdfService {
|
||||
return pw.Column(
|
||||
crossAxisAlignment: pw.CrossAxisAlignment.stretch,
|
||||
children: [
|
||||
// Mitad superior de la hoja (máximo 5.5 pulgadas / 396 pt)
|
||||
pw.ConstrainedBox(
|
||||
constraints: const pw.BoxConstraints(
|
||||
maxHeight: 5.5 * PdfPageFormat.inch - 32,
|
||||
),
|
||||
// Mitad superior de la hoja: altura fija de media carta (5.5 pulgadas / 396 pt)
|
||||
// para que el pie de página siempre quede anclado al final de la media hoja.
|
||||
pw.SizedBox(
|
||||
height: 5.5 * PdfPageFormat.inch - 32,
|
||||
child: pw.Column(
|
||||
mainAxisSize: pw.MainAxisSize.min,
|
||||
crossAxisAlignment: pw.CrossAxisAlignment.stretch,
|
||||
children: [
|
||||
// 1. Cabecera con Nombre del Doctor y Badge Sutil de Hidalyx Med
|
||||
@@ -170,9 +168,11 @@ class DepartmentReferralPdfService {
|
||||
),
|
||||
pw.SizedBox(height: 8),
|
||||
|
||||
// 2. Contenido del Referimiento (Idéntico a AlfaMedical)
|
||||
pw.Container(
|
||||
padding: const pw.EdgeInsets.symmetric(vertical: 6),
|
||||
// 2. Contenido del Referimiento (ocupa el espacio central disponible)
|
||||
pw.Expanded(
|
||||
child: pw.Container(
|
||||
alignment: pw.Alignment.topLeft,
|
||||
padding: const pw.EdgeInsets.symmetric(vertical: 4),
|
||||
child: pw.Text(
|
||||
referralText.trim().isNotEmpty
|
||||
? referralText.trim()
|
||||
@@ -185,7 +185,8 @@ class DepartmentReferralPdfService {
|
||||
),
|
||||
),
|
||||
),
|
||||
pw.SizedBox(height: 10),
|
||||
),
|
||||
pw.SizedBox(height: 6),
|
||||
|
||||
// Línea divisoria decorativa previa al pie
|
||||
pw.Container(
|
||||
|
||||
@@ -68,13 +68,11 @@ class DoctorReferralPdfService {
|
||||
return pw.Column(
|
||||
crossAxisAlignment: pw.CrossAxisAlignment.stretch,
|
||||
children: [
|
||||
// Mitad superior de la hoja (máximo 5.5 pulgadas / 396 pt)
|
||||
pw.ConstrainedBox(
|
||||
constraints: const pw.BoxConstraints(
|
||||
maxHeight: 5.5 * PdfPageFormat.inch - 32,
|
||||
),
|
||||
// Mitad superior de la hoja: altura fija de media carta (5.5 pulgadas / 396 pt)
|
||||
// para que el pie de página siempre quede anclado al final de la media hoja.
|
||||
pw.SizedBox(
|
||||
height: 5.5 * PdfPageFormat.inch - 32,
|
||||
child: pw.Column(
|
||||
mainAxisSize: pw.MainAxisSize.min,
|
||||
crossAxisAlignment: pw.CrossAxisAlignment.stretch,
|
||||
children: [
|
||||
// 1. Cabecera con Nombre del Doctor y Badge Sutil de Hidalyx Med
|
||||
@@ -170,9 +168,11 @@ class DoctorReferralPdfService {
|
||||
),
|
||||
pw.SizedBox(height: 8),
|
||||
|
||||
// 2. Contenido del Referimiento (Idéntico a AlfaMedical con fontSize 13-14)
|
||||
pw.Container(
|
||||
padding: const pw.EdgeInsets.symmetric(vertical: 6),
|
||||
// 2. Contenido del Referimiento (ocupa el espacio central disponible)
|
||||
pw.Expanded(
|
||||
child: pw.Container(
|
||||
alignment: pw.Alignment.topLeft,
|
||||
padding: const pw.EdgeInsets.symmetric(vertical: 4),
|
||||
child: pw.Text(
|
||||
referralText.trim().isNotEmpty
|
||||
? referralText.trim()
|
||||
@@ -185,7 +185,8 @@ class DoctorReferralPdfService {
|
||||
),
|
||||
),
|
||||
),
|
||||
pw.SizedBox(height: 10),
|
||||
),
|
||||
pw.SizedBox(height: 6),
|
||||
|
||||
// Línea divisoria decorativa previa al pie
|
||||
pw.Container(
|
||||
|
||||
Reference in New Issue
Block a user