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:
parent
32cbcedc52
commit
4dbf366b1c
1 changed files with 3 additions and 5 deletions
|
@ -806,15 +806,13 @@ function handle_pdf_download()
|
|||
|
||||
// Set abstract
|
||||
$pdf->Ln(10);
|
||||
$pdf->SetFont('helvetica', 'B', 16);
|
||||
$pdf->Cell(0, 10, 'Abstract', 0, 1);
|
||||
$pdf->SetFont('helvetica', '', 12);
|
||||
$pdf->MultiCell(0, 10, $post->post_excerpt);
|
||||
$pdf->setTextColor(128);
|
||||
$pdf->writeHTML("<b>Abstract:</b> " . $post->post_excerpt);
|
||||
|
||||
// Set content
|
||||
$pdf->setTextColor(0);
|
||||
$pdf->Ln(10);
|
||||
$pdf->SetFont('helvetica', 'B', 16);
|
||||
$pdf->Cell(0, 10, 'Content', 0, 1);
|
||||
$pdf->SetFont('helvetica', '', 12);
|
||||
$pdf->writeHTML($post->post_content);
|
||||
|
||||
|
|
Loading…
Reference in a new issue