feat: enhance PDF styling for abstract and content sections

- Replaced abstract section header with inline bold text to improve readability
- Removed redundant section header code for both abstract and content
- Added color change to distinguish abstract text

This improves the user experience by providing more visually appealing PDF documents.
This commit is contained in:
Kumi 2024-08-02 22:03:20 +02:00
parent 32cbcedc52
commit 4dbf366b1c
Signed by: kumi
GPG key ID: ECBCC9082395383F

View file

@ -806,15 +806,13 @@ function handle_pdf_download()
// Set abstract // Set abstract
$pdf->Ln(10); $pdf->Ln(10);
$pdf->SetFont('helvetica', 'B', 16);
$pdf->Cell(0, 10, 'Abstract', 0, 1);
$pdf->SetFont('helvetica', '', 12); $pdf->SetFont('helvetica', '', 12);
$pdf->MultiCell(0, 10, $post->post_excerpt); $pdf->setTextColor(128);
$pdf->writeHTML("<b>Abstract:</b> " . $post->post_excerpt);
// Set content // Set content
$pdf->setTextColor(0);
$pdf->Ln(10); $pdf->Ln(10);
$pdf->SetFont('helvetica', 'B', 16);
$pdf->Cell(0, 10, 'Content', 0, 1);
$pdf->SetFont('helvetica', '', 12); $pdf->SetFont('helvetica', '', 12);
$pdf->writeHTML($post->post_content); $pdf->writeHTML($post->post_content);