nichemtktg — 2011-05-17T10:25:26-04:00 — #1
I need to understand how to positition/float an image created by php. I know how to position/float JPG in PHP, but am unclear of how to position/float an image generated by PHP. This script displays a barcode in the upper left-hand corner of the page. I think the header script needs some HTML/CSS to center it on the page, but don't know what that script would look like or even if I'm on the right track.
How would you change this script to display the header in the middle of the page?
$font = new BCGFont('./class/font/Arial.ttf', 18);
$color_black = new BCGColor(0, 0, 0);
$color_white = new BCGColor(255, 255, 255);
$code = new BCGpostnet();
// Drawing Part
$drawing = new BCGDrawing('', $color_white);
rubble — 2011-05-17T10:42:29-04:00 — #2
What I would do is place the image on your page using normal css etc. and instead of using the image name use the php code file name.
You could have a problem with the headers but give this a go first
nichemtktg — 2011-05-17T10:51:36-04:00 — #3
I'm following you.
What would the the actual script look like?
echo '<img src="include "code_to_creat_image.php"">';
rubble — 2011-05-17T10:57:48-04:00 — #4
It does not need to be within the php tags as the image is created on the php page.
This should work:
nichemtktg — 2011-05-17T12:22:29-04:00 — #5