Creating a cell shadow effect in fpdf

I want to emulate generating a “sticky note” in PDFs. My current system is a wordpress website with a custom plugin written in PHP that uses fpdf for PDF generation. I can generate a yellow rectangle with borders and text easily:

$pdf = new fpdf();
$pdf->SetFillColor(255, 246, 108);
$pdf->SetXY(0, 40);
$pdf->ShadowCell($pdf->GetPageWidth(),50,'Hello World!', 1, 0, 'C', true);

Now the issue is generating a shadow around the box. I’ve gone through the fpdf API and examples, but didn’t see anything relevant that I could use. There is a text-shadow example, but that doesn’t work in my case.

Read more here: Creating a cell shadow effect in fpdf

Leave a Reply

Your email address will not be published. Required fields are marked *