tags:

views:

1097

answers:

2

Does anyone know how to get TCPDF to output a .GIF file with a specific number of inches width x height?

I am trying to get a GIF embedded in a PDF so that it will print at exactly 4x6 inches. I tried this:

$this->setpageUnit('in');
$this->Image($tmp, 0, 0, 4, 6, 'gif', '', '', true);

But that only seemed to result in a blank page. Any ideas?

A: 

I think you'll need to figure out how many pixel's per inch and then use the method setImageScale(float $scale);

For example:

$this->setImageScale(24.5);

Then your code should work, after setting the scale:

$this->Image($tmp, 0, 0, 4, 6, 'gif', '', '', true);
JasonMichael
A: 

I think it's happen because you are not using a capital "P"

$this->setpageUnit('in');

maybe is should be :

$this->setPageUnit('in');
Julius