forked from science-ation/science-ation
Change font from Arial (embedded) to Times-Roman (builtin) - reduces filesize from 180k to 3k
Also change titles to Times-Bold
This commit is contained in:
parent
4dce799338
commit
740994032b
@ -1,6 +1,7 @@
|
||||
<?
|
||||
require("../common.inc.php");
|
||||
send_header("Configuration");
|
||||
echo error(i18n("Note: this section will normally be password protected. It is left open for now for debugging and testing purposes"));
|
||||
|
||||
if($_POST['action']=="save")
|
||||
{
|
||||
@ -26,6 +27,7 @@
|
||||
echo "<form method=\"post\" action=\"index.php\">";
|
||||
echo "<input type=\"hidden\" name=\"action\" value=\"save\">\n";
|
||||
echo "<table>";
|
||||
echo "<tr><td colspan=\"3\"><h3>".i18n("Global configuration settings")."</h3></td></tr>";
|
||||
while($r=mysql_fetch_object($q))
|
||||
{
|
||||
echo "<tr><td>$r->var</td><td>".i18n($r->description)."</td><td><input type=\"text\" name=\"specialconfig[$r->var]\" value=\"$r->val\" /></td></tr>";
|
||||
|
@ -42,8 +42,10 @@ echo mysql_error();
|
||||
pdf_open_file($pdf,null);
|
||||
//Letter size (8.5 x 11) is 612,792
|
||||
pdf_begin_page($pdf,612,792);
|
||||
pdf_set_parameter($pdf, "FontOutline", "Arial=/home/sfiab/www.sfiab.ca/sfiab/arial.ttf");
|
||||
$arial=pdf_findfont($pdf,"Arial","host",1);
|
||||
// pdf_set_parameter($pdf, "FontOutline", "Arial=/home/sfiab/www.sfiab.ca/sfiab/arial.ttf");
|
||||
//$arial=pdf_findfont($pdf,"Arial","host",1);
|
||||
$normalfont=pdf_findfont($pdf,"Times-Roman","host",0);
|
||||
$headerfont=pdf_findfont($pdf,"Times-Bold","host",0);
|
||||
pdf_set_info($pdf,"Author","SFIAB");
|
||||
pdf_set_info($pdf,"Creator","SFIAB");
|
||||
pdf_set_info($pdf,"Title","SFIAB - Participant Signature Page");
|
||||
@ -61,15 +63,15 @@ echo mysql_error();
|
||||
$height['exhibitorsigspace']=0.40;
|
||||
$height['exhibitorsigtext']=0.13;
|
||||
$height['parenttitle']=0.2;
|
||||
$height['parentbox']=3;
|
||||
$height['parentbox']=2.60;
|
||||
$height['parentsigspace']=0.40;
|
||||
$height['parentsigtext']=0.13;
|
||||
|
||||
pdf_setfont($pdf,$arial,18);
|
||||
pdf_setfont($pdf,$headerfont,18);
|
||||
pdf_show_boxed($pdf,$config['fairname'] ,loc(0.75),loc($yloc),loc(7),loc($height['title']),"center",null);
|
||||
$yloc-=$height['title'];
|
||||
|
||||
pdf_setfont($pdf,$arial,14);
|
||||
pdf_setfont($pdf,$headerfont,14);
|
||||
pdf_show_boxed($pdf,i18n("Signature Form"),loc(0.75),loc($yloc),loc(7),loc($height['subtitle']),"center",null);
|
||||
$yloc-=$height['subtitle'];
|
||||
|
||||
@ -102,7 +104,7 @@ echo mysql_error();
|
||||
//add the newline
|
||||
$topboxtext.="\n";
|
||||
|
||||
pdf_setfont($pdf,$arial,11);
|
||||
pdf_setfont($pdf,$normalfont,11);
|
||||
pdf_set_value($pdf,"leading",15);
|
||||
|
||||
$yloc-=$height['topbox'];
|
||||
@ -113,11 +115,11 @@ echo mysql_error();
|
||||
pdf_stroke($pdf);
|
||||
|
||||
|
||||
pdf_setfont($pdf,$arial,12);
|
||||
pdf_setfont($pdf,$headerfont,12);
|
||||
$yloc-=$height['exhibitortitle'];
|
||||
pdf_show_xy($pdf,"Exhibitor Declaration",loc(0.5),loc($yloc));
|
||||
|
||||
pdf_setfont($pdf,$arial,11);
|
||||
pdf_setfont($pdf,$normalfont,11);
|
||||
pdf_set_value($pdf,"leading",15);
|
||||
|
||||
$studentbox="The following section is to be read and signed by the exhibitor$plural\n\n".
|
||||
@ -158,11 +160,11 @@ echo mysql_error();
|
||||
|
||||
|
||||
//now for the parent/guardian signatures
|
||||
pdf_setfont($pdf,$arial,12);
|
||||
pdf_setfont($pdf,$headerfont,12);
|
||||
$yloc-=$height['parenttitle'];
|
||||
pdf_show_xy($pdf,"Parent/Guardian Declaration",loc(0.5),loc($yloc));
|
||||
|
||||
pdf_setfont($pdf,$arial,11);
|
||||
pdf_setfont($pdf,$normalfont,11);
|
||||
pdf_set_value($pdf,"leading",15);
|
||||
|
||||
$parentbox="The following is to be read and signed by the exhibitor$plural parent$plural/guardian$plural.\n\n".
|
||||
@ -199,8 +201,8 @@ echo mysql_error();
|
||||
|
||||
//now put a nice little footer at the bottom
|
||||
$footertext="Reg Num: ".$_SESSION['registration_number']." - Generated: ".date("Y-m-d h:ia")." - ".$config['fairname']." - ".$config['FAIRYEAR'];
|
||||
$footerwidth=pdf_stringwidth($pdf,$footertext,$arial,9);
|
||||
pdf_setfont($pdf,$arial,9);
|
||||
$footerwidth=pdf_stringwidth($pdf,$footertext,$normalfont,9);
|
||||
pdf_setfont($pdf,$normalfont,9);
|
||||
pdf_show_xy($pdf,$footertext,loc(4.25)-$footerwidth/2,loc(0.5));
|
||||
|
||||
//footer line
|
||||
|
Loading…
x
Reference in New Issue
Block a user