T
Ted Byers
I successfully created a number of PNG files using chart, and I
successfully created my PDF file. Both look quite nice.
I did find, in the documentation of PDF::API2 the image functions
(e.g. my $png1 = $pdf->image_png("chart1.png"), but these do not
actually add the image to the current page. I have looked through all
the documentation I have for PDFs, including PDF::API2, but I do not
see anything about how to actually add the png file (which I assume is
read by "image_png") to a specific page.
I did find the following for PDF::Report
"$pdf->addImg($file, $x, $y);
"Add image $file to the current page at position ($x, $y).
"$pdf->addImgScaled($file, $x, $y, $scale);
"Add image $file to the current page at position ($x, $y) scaled to
$scale. "
But I didn't use PDF::Report, yet, so I am concerned that shifting to
it will break the code I have already written. I use PDF::Table for
much of my PDF file. Do you know if it plays nicely with
PDF::Report? I see PDF::Report is described as a wrapper for
PDF::API2, so I would have thought that there would be something like
'addImg' in the PDF::API2 API, but I don't see it there.
I am looking fo rthe path of least resistance to get these images
added to specific pages in my PDF.
Any help would be appreciated.
Thanks
Ted
successfully created my PDF file. Both look quite nice.
I did find, in the documentation of PDF::API2 the image functions
(e.g. my $png1 = $pdf->image_png("chart1.png"), but these do not
actually add the image to the current page. I have looked through all
the documentation I have for PDFs, including PDF::API2, but I do not
see anything about how to actually add the png file (which I assume is
read by "image_png") to a specific page.
I did find the following for PDF::Report
"$pdf->addImg($file, $x, $y);
"Add image $file to the current page at position ($x, $y).
"$pdf->addImgScaled($file, $x, $y, $scale);
"Add image $file to the current page at position ($x, $y) scaled to
$scale. "
But I didn't use PDF::Report, yet, so I am concerned that shifting to
it will break the code I have already written. I use PDF::Table for
much of my PDF file. Do you know if it plays nicely with
PDF::Report? I see PDF::Report is described as a wrapper for
PDF::API2, so I would have thought that there would be something like
'addImg' in the PDF::API2 API, but I don't see it there.
I am looking fo rthe path of least resistance to get these images
added to specific pages in my PDF.
Any help would be appreciated.
Thanks
Ted