PHP Code:
<?php
require('num2txt.php');
$img = imagecreate(1320,900);
$color = imagecolorallocate($img, 0xFF, 0xFF, 0xFF);
$font = 'DejaVuSerif-Bold.ttf';
$fontItalic = 'DejaVuSerif-BoldItalic.ttf';
$fontCalli = 'Amazone.ttf';
$black = imagecolorallocate($img, 0, 0, 0);
$red = imagecolorallocate($img, 255, 0, 0);
//Name Handling
$name = "";
$bboxname = imagettfbbox(18, 0, $fontItalic, $name);
$namecent = $bboxname[2]/2;
//Shares Handling
$shares = "4500";
$bboxshares = imagettfbbox(14, 0, $font, $shares);
$sharescent = $bboxshares[2]/2;
$date = $today = date("F j, Y");
// Add the text
$ispreferred = '1';
if($ispreferred == '1'){
imagettftext($img, 12, 0, 620, 360, $red, $font, "PREFERRED");//Preferred under Company Name
}
imagettftext($img, 14, 0, 1065-$sharescent, 210, $black, $font, number_format($shares)); //Number of shares
imagettftext($img, 18, 0, 665-$namecent, 510, $black, $fontItalic, $name); //name
imagettftext($img, 14, 0, 220, 552, $black, $fontItalic, convertNum($shares));//Spelled out Shares
imagettftext($img, 20, 0, 180, 740, $black, $fontCalli, $date);//Spelled out Shares
header ("Content-type: image/jpeg"); // Let teh system know to generate an image
ImagePNG($img,"pic.png");
$command="lp -d Cert_Print pic.png"; // Send command to Unix OS lpr command
exec($command); // Send the command string directly to the operating system */
imagedestroy($img);
?>
In the end it would print a Stock Cert with the pertinent information, I can get
Bookmarks