【发布时间】:2009-08-07 11:25:55
【问题描述】:
我正在使用 Perl 的 PDF::API2 模块创建 PDF 文档,我需要在页面上的特定 X、Y 位置添加 PNG 图像。
我该怎么做?
【问题讨论】:
我正在使用 Perl 的 PDF::API2 模块创建 PDF 文档,我需要在页面上的特定 X、Y 位置添加 PNG 图像。
我该怎么做?
【问题讨论】:
其实我已经解决了:
# grab a text object - we are missing fonts?
my $gfx = $page->gfx;
my $image = $self->pdf->image_png('/tmp/logo.png');
# add the image to the graphic object - x, y, width, height
$gfx->image($image, 24, 815, 102, 29);
【讨论】: