0

I am currently using FPDF to generate PDF files. What I would need is to draw alpha-transparent rectangles (say with opacity 0.5) on top of an image.

I cannot find how to do this in FPDF, since SetDrawColor and SetFillColor (which are used to draw the rectangles) only take RGB arguments, no alpha value. So they automatically completely cover images or lines placed there with Image or Line.

How can I generate PDF files from PHP that have semi-transparent colored rectangles on top of a given background image and/or on top of a given set of (dashed/full) lines?

4

1 回答 1

1

我突然想到了答案:显然,透明度不是存储在 PDF 中的颜色级别上,而是存储在对象级别上。这个附加组件为其提供了功能:http: //fpdf.org/en/script/script74.php

于 2013-04-24T01:45:39.320 回答