fix(pdf): letter page with content constrained strictly to top half (media carta vertical)
This commit is contained in:
@@ -28,13 +28,14 @@ class InsuranceAuthPdfService {
|
|||||||
final pdf = pw.Document(title: 'Autorización de seguro - $patientName');
|
final pdf = pw.Document(title: 'Autorización de seguro - $patientName');
|
||||||
final formattedDate = DateFormat('dd/MM/yyyy').format(date ?? DateTime.now());
|
final formattedDate = DateFormat('dd/MM/yyyy').format(date ?? DateTime.now());
|
||||||
|
|
||||||
// Formato Media Carta Vertical (5.5 x 8.5 pulgadas / 396 x 612 pt):
|
// Formato Carta Vertical (8.5 x 11.0 pulgadas / 612 x 792 pt):
|
||||||
// Margen equilibrado de media pulgada (36 pt) a los lados y 20 pt vertical
|
// Todo el contenido abarca estrictamente la mitad superior de la hoja (5.5 pulgadas / 396 pt),
|
||||||
|
// dejando la mitad inferior libre para corte o papel pre-cortado.
|
||||||
const pageFormat = PdfPageFormat(
|
const pageFormat = PdfPageFormat(
|
||||||
5.5 * PdfPageFormat.inch,
|
|
||||||
8.5 * PdfPageFormat.inch,
|
8.5 * PdfPageFormat.inch,
|
||||||
marginLeft: 36,
|
11.0 * PdfPageFormat.inch,
|
||||||
marginRight: 36,
|
marginLeft: 54,
|
||||||
|
marginRight: 54,
|
||||||
marginTop: 20,
|
marginTop: 20,
|
||||||
marginBottom: 20,
|
marginBottom: 20,
|
||||||
);
|
);
|
||||||
@@ -72,8 +73,14 @@ class InsuranceAuthPdfService {
|
|||||||
return pw.Column(
|
return pw.Column(
|
||||||
crossAxisAlignment: pw.CrossAxisAlignment.stretch,
|
crossAxisAlignment: pw.CrossAxisAlignment.stretch,
|
||||||
children: [
|
children: [
|
||||||
// 1. Cabecera con Nombre del Doctor y Badge Sutil de Hidalyx Med
|
// Mitad superior de la hoja (máximo 5.5 pulgadas / 396 pt)
|
||||||
pw.Stack(
|
pw.Container(
|
||||||
|
height: 5.5 * PdfPageFormat.inch - 36,
|
||||||
|
child: pw.Column(
|
||||||
|
crossAxisAlignment: pw.CrossAxisAlignment.stretch,
|
||||||
|
children: [
|
||||||
|
// 1. Cabecera con Nombre del Doctor y Badge Sutil de Hidalyx Med
|
||||||
|
pw.Stack(
|
||||||
children: [
|
children: [
|
||||||
// Nombre y especialidad del doctor centrado
|
// Nombre y especialidad del doctor centrado
|
||||||
pw.Align(
|
pw.Align(
|
||||||
@@ -338,7 +345,10 @@ class InsuranceAuthPdfService {
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
);
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
);
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -24,13 +24,14 @@ class PrescriptionPdfService {
|
|||||||
final pdf = pw.Document(title: 'Receta Médica - $patientName');
|
final pdf = pw.Document(title: 'Receta Médica - $patientName');
|
||||||
final formattedDate = DateFormat('dd/MM/yyyy').format(date ?? DateTime.now());
|
final formattedDate = DateFormat('dd/MM/yyyy').format(date ?? DateTime.now());
|
||||||
|
|
||||||
// Formato Media Carta Vertical (5.5 x 8.5 pulgadas / 396 x 612 pt):
|
// Formato Carta Vertical (8.5 x 11.0 pulgadas / 612 x 792 pt):
|
||||||
// Margen equilibrado de media pulgada (36 pt) a los lados y 20 pt vertical
|
// Todo el contenido abarca estrictamente la mitad superior de la hoja (5.5 pulgadas / 396 pt),
|
||||||
|
// dejando la mitad inferior libre para corte o papel pre-cortado.
|
||||||
const pageFormat = PdfPageFormat(
|
const pageFormat = PdfPageFormat(
|
||||||
5.5 * PdfPageFormat.inch,
|
|
||||||
8.5 * PdfPageFormat.inch,
|
8.5 * PdfPageFormat.inch,
|
||||||
marginLeft: 36,
|
11.0 * PdfPageFormat.inch,
|
||||||
marginRight: 36,
|
marginLeft: 54,
|
||||||
|
marginRight: 54,
|
||||||
marginTop: 20,
|
marginTop: 20,
|
||||||
marginBottom: 20,
|
marginBottom: 20,
|
||||||
);
|
);
|
||||||
@@ -69,7 +70,13 @@ class PrescriptionPdfService {
|
|||||||
return pw.Column(
|
return pw.Column(
|
||||||
crossAxisAlignment: pw.CrossAxisAlignment.stretch,
|
crossAxisAlignment: pw.CrossAxisAlignment.stretch,
|
||||||
children: [
|
children: [
|
||||||
// 1. Cabecera con Nombre del Doctor y Badge Superior de Hidalyx Med
|
// Mitad superior de la hoja (máximo 5.5 pulgadas / 396 pt)
|
||||||
|
pw.Container(
|
||||||
|
height: 5.5 * PdfPageFormat.inch - 36,
|
||||||
|
child: pw.Column(
|
||||||
|
crossAxisAlignment: pw.CrossAxisAlignment.stretch,
|
||||||
|
children: [
|
||||||
|
// 1. Cabecera con Nombre del Doctor y Badge Superior de Hidalyx Med
|
||||||
pw.Stack(
|
pw.Stack(
|
||||||
children: [
|
children: [
|
||||||
// Nombre y especialidad del doctor centrado
|
// Nombre y especialidad del doctor centrado
|
||||||
@@ -261,7 +268,10 @@ class PrescriptionPdfService {
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
);
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
);
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -23,13 +23,14 @@ class DepartmentReferralPdfService {
|
|||||||
final pdf = pw.Document(title: 'Referir a Departamento');
|
final pdf = pw.Document(title: 'Referir a Departamento');
|
||||||
final formattedDate = DateFormat('dd/MM/yyyy').format(date ?? DateTime.now());
|
final formattedDate = DateFormat('dd/MM/yyyy').format(date ?? DateTime.now());
|
||||||
|
|
||||||
// Formato Media Carta Vertical (5.5 x 8.5 pulgadas / 396 x 612 pt):
|
// Formato Carta Vertical (8.5 x 11.0 pulgadas / 612 x 792 pt):
|
||||||
// Margen equilibrado de media pulgada (36 pt) a los lados y 20 pt vertical
|
// Todo el contenido abarca estrictamente la mitad superior de la hoja (5.5 pulgadas / 396 pt),
|
||||||
|
// dejando la mitad inferior libre para corte o papel pre-cortado.
|
||||||
const pageFormat = PdfPageFormat(
|
const pageFormat = PdfPageFormat(
|
||||||
5.5 * PdfPageFormat.inch,
|
|
||||||
8.5 * PdfPageFormat.inch,
|
8.5 * PdfPageFormat.inch,
|
||||||
marginLeft: 36,
|
11.0 * PdfPageFormat.inch,
|
||||||
marginRight: 36,
|
marginLeft: 54,
|
||||||
|
marginRight: 54,
|
||||||
marginTop: 20,
|
marginTop: 20,
|
||||||
marginBottom: 20,
|
marginBottom: 20,
|
||||||
);
|
);
|
||||||
@@ -67,8 +68,14 @@ class DepartmentReferralPdfService {
|
|||||||
return pw.Column(
|
return pw.Column(
|
||||||
crossAxisAlignment: pw.CrossAxisAlignment.stretch,
|
crossAxisAlignment: pw.CrossAxisAlignment.stretch,
|
||||||
children: [
|
children: [
|
||||||
// 1. Cabecera con Nombre del Doctor y Badge Sutil de Hidalyx Med
|
// Mitad superior de la hoja (máximo 5.5 pulgadas / 396 pt)
|
||||||
pw.Stack(
|
pw.Container(
|
||||||
|
height: 5.5 * PdfPageFormat.inch - 36,
|
||||||
|
child: pw.Column(
|
||||||
|
crossAxisAlignment: pw.CrossAxisAlignment.stretch,
|
||||||
|
children: [
|
||||||
|
// 1. Cabecera con Nombre del Doctor y Badge Sutil de Hidalyx Med
|
||||||
|
pw.Stack(
|
||||||
children: [
|
children: [
|
||||||
pw.Align(
|
pw.Align(
|
||||||
alignment: pw.Alignment.center,
|
alignment: pw.Alignment.center,
|
||||||
@@ -210,7 +217,10 @@ class DepartmentReferralPdfService {
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
);
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
);
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -23,13 +23,14 @@ class DoctorReferralPdfService {
|
|||||||
final pdf = pw.Document(title: 'Referir a Doctor (a)');
|
final pdf = pw.Document(title: 'Referir a Doctor (a)');
|
||||||
final formattedDate = DateFormat('dd/MM/yyyy').format(date ?? DateTime.now());
|
final formattedDate = DateFormat('dd/MM/yyyy').format(date ?? DateTime.now());
|
||||||
|
|
||||||
// Formato Media Carta Vertical (5.5 x 8.5 pulgadas / 396 x 612 pt):
|
// Formato Carta Vertical (8.5 x 11.0 pulgadas / 612 x 792 pt):
|
||||||
// Margen equilibrado de media pulgada (36 pt) a los lados y 20 pt vertical
|
// Todo el contenido abarca estrictamente la mitad superior de la hoja (5.5 pulgadas / 396 pt),
|
||||||
|
// dejando la mitad inferior libre para corte o papel pre-cortado.
|
||||||
const pageFormat = PdfPageFormat(
|
const pageFormat = PdfPageFormat(
|
||||||
5.5 * PdfPageFormat.inch,
|
|
||||||
8.5 * PdfPageFormat.inch,
|
8.5 * PdfPageFormat.inch,
|
||||||
marginLeft: 36,
|
11.0 * PdfPageFormat.inch,
|
||||||
marginRight: 36,
|
marginLeft: 54,
|
||||||
|
marginRight: 54,
|
||||||
marginTop: 20,
|
marginTop: 20,
|
||||||
marginBottom: 20,
|
marginBottom: 20,
|
||||||
);
|
);
|
||||||
@@ -67,8 +68,14 @@ class DoctorReferralPdfService {
|
|||||||
return pw.Column(
|
return pw.Column(
|
||||||
crossAxisAlignment: pw.CrossAxisAlignment.stretch,
|
crossAxisAlignment: pw.CrossAxisAlignment.stretch,
|
||||||
children: [
|
children: [
|
||||||
// 1. Cabecera con Nombre del Doctor y Badge Sutil de Hidalyx Med
|
// Mitad superior de la hoja (máximo 5.5 pulgadas / 396 pt)
|
||||||
pw.Stack(
|
pw.Container(
|
||||||
|
height: 5.5 * PdfPageFormat.inch - 36,
|
||||||
|
child: pw.Column(
|
||||||
|
crossAxisAlignment: pw.CrossAxisAlignment.stretch,
|
||||||
|
children: [
|
||||||
|
// 1. Cabecera con Nombre del Doctor y Badge Sutil de Hidalyx Med
|
||||||
|
pw.Stack(
|
||||||
children: [
|
children: [
|
||||||
pw.Align(
|
pw.Align(
|
||||||
alignment: pw.Alignment.center,
|
alignment: pw.Alignment.center,
|
||||||
@@ -210,7 +217,10 @@ class DoctorReferralPdfService {
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
);
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
);
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
|||||||
Reference in New Issue
Block a user