I'm using this code to render an Image inside a box in the PDF I'm generating using PDFLib
$p = new pdflib();
if ($p->begin_document("", "") == 0)
throw new Exception("Error: " . $p->get_errmsg());
$p->begin_page_ext(0, 0, "width=792 height=612");
$image = $p->load_image("auto", "01.jpg", "");
$p->fit_image($image, 100,200,"boxsize={300 500} fitmethod=entire showborder");
This works as expected. Now the need is to rotate the Image within the box as specified as above.
I tried this:
$p->fit_image($image, 100,200,"boxsize={300 500} fitmethod=entire showborder rotate 15");
But it yielded no result.
Update: It works when I try the above code without the showborder:
$p->fit_image($image, 100,200,"boxsize={300 500} fitmethod=entire rotate 15");
Any Idea why this is happening?