tcpdf imagebox and cropping

Tags: ,

I would like to add a ‘imagebox’ a box which contains the image and crops exceeding image value that is outside of this box. something like this:

alt text

I am not sure on how to do this if it’s even possible.


You could crop an image with php , store it as a temp_file pass it to tcpfd and then delete it after the rendering of the pdf was done . Another option would be to use html/css to position a html element over the image but as we all know tcpdf doesn’t know too much about css so i don’t know if it will work .

Source: stackoverflow