c121c74d by Jeff Balicki

design changes

1 parent eff8dcd8
......@@ -181,9 +181,46 @@ try {
$num_optlist = "fillcolor={".$fontColor." } position={".$fontAlignment."} boxsize={" . $textwidth." ".$textheight . "} fontsize=".$fontSize." ".$fitm. " ";
$p->fit_textline($textline, $textLRight, $textLUp, $num_optlist);
}
else if ($row->change_type == 'img') {
} else if ($row->change_type == 'date') {
$yoff = 50;
//Get font var from row
$textline = $row->content;
$textLUp = $row->locationUp;
$textwidth = $row->width;
$textheight = $row->height;
$textLRight = $row->locationRight;
$fontStyles = unserialize($row->style);
$fitmethod = $fontStyles["fitmethod"];
$fontAlignment = $fontStyles["alignment"];
$fontFamily = $fontStyles["font-family"];
$fontSize = $fontStyles["font-size"];
if(isset($fontStyles["font-color"])) {
$fontColor = $fontStyles["font-color"];
}else{
$fontColor = 'cmyk 0.75 0.68 0.67 0.90';
}
/// Load and insert text and font
$p->set_option("FontOutline={" . $fontFamily . "=" . $storagePath . $folder . "/" . $fontFamily . ".otf}");
/* For PDFlib Lite: change "unicode" to "winansi" */
$font = $p->load_font($fontFamily, "unicode", "embedding");
if ($font == 0) {
die("Error: " . $p->get_errmsg());
}
$p->setfont($font, $fontSize);
//$num_optlist = "fontname=".$fontFamily." fontsize=".$fontSize." encoding=unicode alignment=".$fontAlignment." fillcolor={".$fontColor." }";
if($fitmethod == ''){$fitm ="";
}else{ $fitm = "fitmethod=".$fitmethod;}
$num_optlist = "fillcolor={".$fontColor." } position={".$fontAlignment."} boxsize={" . $textwidth." ".$textheight . "} fontsize=".$fontSize." ".$fitm. " ";
$p->fit_textline($textline, $textLRight, $textLUp, $num_optlist);
}
else if ($row->change_type == 'img') {
//Get image var from row
......