= 1) { if ($ResultsArray[($ECRnum[$i]-1)*2] <= 2) $conclus .= trim($CCW11[$i]); elseif ($ResultsArray[($ECRnum[$i]-1)*2] <= 6) $conclus .= trim($CCW12[$i]); else $conclus .= trim($CCW13[$i]); } $conclus .= $conc[1]; if ($numCCW[$i] >= 2) { if ($ResultsArray[($ECRnum[$i]-1)*2] <= 2) $conclus .= trim($CCW21[$i]); elseif ($ResultsArray[($ECRnum[$i]-1)*2] <= 6) $conclus .= trim($CCW22[$i]); else $conclus .= trim($CCW23[$i]); $conclus .= $conc[2]; } $conclus = trim($conclus); pdf_show_boxed($pdf1, $conclus, 50, ltrHt-440, ltrWd-100, 100, "justify"); //--compute recommendations and write to PDF file pdf_set_font($pdf1, "Times-Bold", 15, "host"); pdf_show_boxed($pdf1, "Recommendations.", 50, ltrHt-520, ltrWd-100, 100, "justify"); pdf_continue_text($pdf1, " "); pdf_set_font($pdf1, "Times-Roman", 14, "host"); $conc = explode("~", $Recommendation[$i]); $recomm = $conc[0]; if ($numCRW[$i] >= 1) { if ($ResultsArray[($ECRnum[$i]-1)*2] <= 2) $recomm .= trim($CRW11[$i]); elseif ($ResultsArray[($ECRnum[$i]-1)*2] <= 6) $recomm .= trim($CRW12[$i]); else $recomm .= trim($CRW13[$i]); } $recomm .= $conc[1]; if ($numCRW[$i] >= 2) { if ($ResultsArray[($ECRnum[$i]-1)*2] <= 2) $recomm .= trim($CRW21[$i]); elseif ($ResultsArray[($ECRnum[$i]-1)*2] <= 6) $recomm .= trim($CRW22[$i]); else $recomm .= trim($CRW23[$i]); $recomm .= $conc[2]; } $recomm = trim($recomm); pdf_show_boxed($pdf1, $recomm, 50, ltrHt-620, ltrWd-100, 180, "justify"); //--End first page pdf_end_page($pdf1); } //---------------------------------------------------------------------- // END OF GENERATED EVALUATION CRITERIA CONCLUSIONS & RECOMMENDATIONS //---------------------------------------------------------------------- //EVALUATION CRITERIA SCORES: //--------------------------------------------------------------------- //PAGE-43 pdf_begin_page($pdf1, ltrWd, ltrHt); //begin first page $no = 43; $page = "E.C. Scores, p.".$no; pdf_add_outline($pdf1, $page); //outline entry //--Set color for text, set font and write title pdf_setrgbcolor_fill($pdf1, 0, 0, 0); pdf_set_font($pdf1, "Times-Bold", 40, "host"); pdf_set_text_pos($pdf1, 83, ltrHt-245); pdf_show($pdf1, "Evaluation Criteria Scores"); //md // pdf_place_image($pdf1, $image1, ltrWd-0.45*$image_width-33, 45, 0.45); pdf_end_page($pdf1); //--------------------------------------------------------------------- //-------------------------------------------------------------------- //PAGE-44 pdf_begin_page($pdf1, ltrWd, ltrHt); //begin first page $no = 44; $page = "Page ".$no; pdf_add_outline($pdf1, $page); //outline entry //--Set color for text, set font and write title pdf_setrgbcolor_fill($pdf1, 0, 0, 0); pdf_set_font($pdf1, "Times-Bold", 27, "host"); pdf_set_text_pos($pdf1, 40, ltrHt-90); pdf_show($pdf1, "Evaluation Criteria Scores"); pdf_set_font($pdf1, "Times-Bold", 29, "host"); pdf_set_text_pos($pdf1, 40, ltrHt-120); pdf_show($pdf1, "Licensed Brand"); // Draw table pdf_setrgbcolor_fill($pdf1, 1.0, .98, .96); pdf_setlinewidth($pdf1, 3); pdf_rect($pdf1, 45, 50, ltrWd-140, 400); pdf_fill($pdf1); pdf_setrgbcolor_fill($pdf1, 0, 0, 0); pdf_rect($pdf1, 45, 50, ltrWd-140, 400); pdf_stroke($pdf1); pdf_setlinewidth($pdf1, 1); pdf_rect($pdf1, 45, 50, ltrWd-140, 25); pdf_rect($pdf1, 45, 75, ltrWd-140, 25); pdf_rect($pdf1, 45, 100, ltrWd-140, 25); pdf_rect($pdf1, 45, 125, ltrWd-140, 25); pdf_rect($pdf1, 45, 150, ltrWd-140, 25); pdf_rect($pdf1, 45, 175, ltrWd-140, 25); pdf_rect($pdf1, 45, 200, ltrWd-140, 25); pdf_rect($pdf1, 45, 225, ltrWd-140, 25); pdf_rect($pdf1, 45, 250, ltrWd-140, 25); pdf_rect($pdf1, 45, 275, ltrWd-140, 25); pdf_rect($pdf1, 45, 300, ltrWd-140, 25); pdf_rect($pdf1, 45, 325, ltrWd-140, 25); pdf_rect($pdf1, 45, 350, ltrWd-140, 25); pdf_rect($pdf1, 45, 375, ltrWd-140, 25); pdf_rect($pdf1, 45, 400, ltrWd-140, 25); pdf_rect($pdf1, 45, 425, ltrWd-140, 25); pdf_stroke($pdf1); // TABULAR TEXT: pdf_setrgbcolor_fill($pdf1, 0, 0, 0); pdf_set_font($pdf1, "Times-Bold", 23, "host"); pdf_set_text_pos($pdf1, 400, ltrHt-185); pdf_show($pdf1, "Score Confidence"); pdf_set_font($pdf1, "Times-Bold", 19, "host"); pdf_set_text_pos($pdf1, 55, ltrHt-210); pdf_show($pdf1, "-- Review and approval"); pdf_set_text_pos($pdf1, 420, ltrHt-210); pdf_show($pdf1, $ResultsArray[0*2]); // (question_num-1) * 2 = main score pdf_set_text_pos($pdf1, 520, ltrHt-210); pdf_show($pdf1, $ResultsArray[0*2+1]); // (question_num-1) * 2 + 1 = confidence pdf_set_text_pos($pdf1, 55, ltrHt-235); pdf_show($pdf1, "-- Requirements / restrictions"); pdf_set_text_pos($pdf1, 420, ltrHt-235); pdf_show($pdf1, $ResultsArray[1*2]); // (question_num-1) * 2 = main score pdf_set_text_pos($pdf1, 520, ltrHt-235); pdf_show($pdf1, $ResultsArray[1*2+1]); // (question_num-1) * 2 + 1 = confidence pdf_set_text_pos($pdf1, 55, ltrHt-260); pdf_show($pdf1, "-- Benefits identified"); pdf_set_text_pos($pdf1, 420, ltrHt-260); pdf_show($pdf1, $ResultsArray[2*2]); // (question_num-1) * 2 = main score pdf_set_text_pos($pdf1, 520, ltrHt-260); pdf_show($pdf1, $ResultsArray[2*2+1]); // (question_num-1) * 2 + 1 = confidence pdf_set_text_pos($pdf1, 55, ltrHt-285); pdf_show($pdf1, "-- Resources approved"); pdf_set_text_pos($pdf1, 420, ltrHt-285); pdf_show($pdf1, $ResultsArray[3*2]); // (question_num-1) * 2 = main score pdf_set_text_pos($pdf1, 520, ltrHt-285); pdf_show($pdf1, $ResultsArray[3*2+1]); // (question_num-1) * 2 + 1 = confidence pdf_set_text_pos($pdf1, 55, ltrHt-310); pdf_show($pdf1, "-- Recent brand study"); pdf_set_text_pos($pdf1, 420, ltrHt-310); pdf_show($pdf1, $ResultsArray[4*2]); // (question_num-1) * 2 = main score pdf_set_text_pos($pdf1, 520, ltrHt-310); pdf_show($pdf1, $ResultsArray[4*2+1]); // (question_num-1) * 2 + 1 = confidence pdf_set_text_pos($pdf1, 55, ltrHt-335); pdf_show($pdf1, "-- Total awareness"); pdf_set_text_pos($pdf1, 420, ltrHt-335); pdf_show($pdf1, $ResultsArray[5*2]); // (question_num-1) * 2 = main score pdf_set_text_pos($pdf1, 520, ltrHt-335); pdf_show($pdf1, $ResultsArray[5*2+1]); // (question_num-1) * 2 + 1 = confidence pdf_set_text_pos($pdf1, 55, ltrHt-360); pdf_show($pdf1, "-- History / heritage"); pdf_set_text_pos($pdf1, 420, ltrHt-360); pdf_show($pdf1, $ResultsArray[6*2]); // (question_num-1) * 2 = main score pdf_set_text_pos($pdf1, 520, ltrHt-360); pdf_show($pdf1, $ResultsArray[6*2+1]); // (question_num-1) * 2 + 1 = confidence pdf_set_text_pos($pdf1, 55, ltrHt-385); pdf_show($pdf1, "-- Loyalty"); pdf_set_text_pos($pdf1, 420, ltrHt-385); pdf_show($pdf1, $ResultsArray[7*2]); // (question_num-1) * 2 = main score pdf_set_text_pos($pdf1, 520, ltrHt-385); pdf_show($pdf1, $ResultsArray[7*2+1]); // (question_num-1) * 2 + 1 = confidence pdf_set_text_pos($pdf1, 55, ltrHt-410); pdf_show($pdf1, "-- Market share"); pdf_set_text_pos($pdf1, 420, ltrHt-410); pdf_show($pdf1, $ResultsArray[8*2]); // (question_num-1) * 2 = main score pdf_set_text_pos($pdf1, 520, ltrHt-410); pdf_show($pdf1, $ResultsArray[8*2+1]); // (question_num-1) * 2 + 1 = confidence pdf_set_text_pos($pdf1, 55, ltrHt-435); pdf_show($pdf1, "-- Price premium"); pdf_set_text_pos($pdf1, 420, ltrHt-435); pdf_show($pdf1, $ResultsArray[9*2]); // (question_num-1) * 2 = main score pdf_set_text_pos($pdf1, 520, ltrHt-435); pdf_show($pdf1, $ResultsArray[9*2+1]); // (question_num-1) * 2 + 1 = confidence pdf_set_text_pos($pdf1, 55, ltrHt-460); pdf_show($pdf1, "-- Distribution"); pdf_set_text_pos($pdf1, 420, ltrHt-460); pdf_show($pdf1, $ResultsArray[10*2]); // (question_num-1) * 2 = main score pdf_set_text_pos($pdf1, 520, ltrHt-460); pdf_show($pdf1, $ResultsArray[10*2+1]); // (question_num-1) * 2 + 1 = confidence pdf_set_text_pos($pdf1, 55, ltrHt-485); pdf_show($pdf1, "-- Limited editions/collectibles"); pdf_set_text_pos($pdf1, 420, ltrHt-485); pdf_show($pdf1, $ResultsArray[11*2]); // (question_num-1) * 2 = main score pdf_set_text_pos($pdf1, 520, ltrHt-485); pdf_show($pdf1, $ResultsArray[11*2+1]); // (question_num-1) * 2 + 1 = confidence pdf_set_text_pos($pdf1, 55, ltrHt-510); pdf_show($pdf1, "-- Brand extensions"); pdf_set_text_pos($pdf1, 420, ltrHt-510); pdf_show($pdf1, $ResultsArray[12*2]); // (question_num-1) * 2 = main score pdf_set_text_pos($pdf1, 520, ltrHt-510); pdf_show($pdf1, $ResultsArray[12*2+1]); // (question_num-1) * 2 + 1 = confidence pdf_set_text_pos($pdf1, 55, ltrHt-535); pdf_show($pdf1, "-- Advertising / promotion"); pdf_set_text_pos($pdf1, 420, ltrHt-535); pdf_show($pdf1, $ResultsArray[13*2]); // (question_num-1) * 2 = main score pdf_set_text_pos($pdf1, 520, ltrHt-535); pdf_show($pdf1, $ResultsArray[13*2+1]); // (question_num-1) * 2 + 1 = confidence pdf_set_text_pos($pdf1, 55, ltrHt-560); pdf_show($pdf1, "-- Promotion support consistency"); pdf_set_text_pos($pdf1, 420, ltrHt-560); pdf_show($pdf1, $ResultsArray[14*2]); // (question_num-1) * 2 = main score pdf_set_text_pos($pdf1, 520, ltrHt-560); pdf_show($pdf1, $ResultsArray[14*2+1]); // (question_num-1) * 2 + 1 = confidence // no room for image on this page // pdf_place_image($pdf1, $image1, ltrWd-0.45*$image_width-33, 45, 0.45); pdf_end_page($pdf1); //--------------------------------------------------------------------- //SUCCESS METRICS: //--------------------------------------------------------------------- //PAGE-52 pdf_begin_page($pdf1, ltrWd, ltrHt); //begin first page $no = 52; $page = "Success Metrics, p.".$no; pdf_add_outline($pdf1, $page); //outline entry //--Set color for text, set font and write title pdf_setrgbcolor_fill($pdf1, 0, 0, 0); pdf_set_font($pdf1, "Times-Bold", 40, "host"); pdf_set_text_pos($pdf1, 173, ltrHt-245); pdf_show($pdf1, "Success Metrics"); //md // pdf_place_image($pdf1, $image1, ltrWd-0.45*$image_width-33, 45, 0.45); pdf_end_page($pdf1); //--------------------------------------------------------------------- //PAGE-53 pdf_begin_page($pdf1, ltrWd, ltrHt); //begin first page $no = 53; $page = "Page ".$no; pdf_add_outline($pdf1, $page); //outline entry //--Set color for text, set font and write title pdf_setrgbcolor_fill($pdf1, 0, 0, 0); pdf_set_font($pdf1, "Times-Bold", 27, "host"); pdf_set_text_pos($pdf1, 40, ltrHt-50); pdf_show($pdf1, "Success Metrics"); pdf_set_font($pdf1, "Times-Bold", 29, "host"); pdf_set_text_pos($pdf1, 40, ltrHt-85); pdf_show($pdf1, "Evaluation Criteria Components"); // Draw table pdf_setrgbcolor_fill($pdf1, 0.98, 1.00, 0.99); pdf_setlinewidth($pdf1, 3); pdf_rect($pdf1, 15, 180, ltrWd-30, 280); //pdf_fill($pdf1); //pdf_setrgbcolor_fill($pdf1, 0, 0, 0); //pdf_rect($pdf1, 15, 180, ltrWd-30, 280); pdf_stroke($pdf1); pdf_setlinewidth($pdf1, 1); pdf_rect($pdf1, 15, 180, ltrWd-30, 40); pdf_rect($pdf1, 15, 220, ltrWd-30, 40); pdf_rect($pdf1, 15, 260, ltrWd-30, 40); pdf_rect($pdf1, 15, 300, ltrWd-30, 40); pdf_rect($pdf1, 15, 340, ltrWd-30, 40); pdf_rect($pdf1, 15, 380, ltrWd-30, 40); pdf_rect($pdf1, 15, 420, ltrWd-30, 40); pdf_stroke($pdf1); //pdf_setrgbcolor_fill($pdf1, 0.75, .90, .81); //pdf_rect($pdf1, 17, 421, ltrWd-34, 39); //pdf_fill($pdf1); pdf_setrgbcolor_fill($pdf1, 0, 0, 0); pdf_set_font($pdf1, "Times-Bold", 25, "host"); pdf_set_text_pos($pdf1, 21, ltrHt-180); pdf_show($pdf1, "Success Metric Criteria Components"); pdf_set_font($pdf1, "Times-Bold", 21, "host"); pdf_set_text_pos($pdf1, 23, ltrHt-220); pdf_show($pdf1, "Brand Strength"); pdf_set_text_pos($pdf1, 299, ltrHt-220); pdf_show($pdf1, "- Awareness, Tradition, Trust"); pdf_set_text_pos($pdf1, 23, ltrHt-260); pdf_show($pdf1, "Brand Relevance"); pdf_set_text_pos($pdf1, 299, ltrHt-260); pdf_show($pdf1, "- Relevance, Authority"); pdf_set_text_pos($pdf1, 23, ltrHt-300); pdf_show($pdf1, "Brand Support"); pdf_set_text_pos($pdf1, 299, ltrHt-300); pdf_show($pdf1, "- Promotion, Consistency"); pdf_set_text_pos($pdf1, 23, ltrHt-340); pdf_show($pdf1, "Brand Appeal"); pdf_set_text_pos($pdf1, 299, ltrHt-340); pdf_show($pdf1, "- Loyalty, Price Premium"); pdf_set_text_pos($pdf1, 23, ltrHt-380); pdf_show($pdf1, "Concept Viability"); pdf_set_text_pos($pdf1, 299, ltrHt-380); pdf_show($pdf1, "- Feasibility, Extensions, Distribution"); pdf_set_text_pos($pdf1, 23, ltrHt-420); pdf_show($pdf1, "Concept Uniqueness"); //pdf_set_font($pdf1, "Times-Bold", 20, "host"); pdf_set_text_pos($pdf1, 299, ltrHt-420); pdf_show($pdf1, "- Features, Style, Brand Differentiation"); //md // pdf_place_image($pdf1, $image1, ltrWd-0.45*$image_width-33, 45, 0.45); pdf_end_page($pdf1); //--------------------------------------------------------------------- //--------------------------------------------------------------------- //PAGE-66 pdf_begin_page($pdf1, ltrWd, ltrHt); //begin first page $no = 66; $page = "Page ".$no.". Royalty Potential"; pdf_add_outline($pdf1, $page); //outline entry //--Set color for text, set font and write title pdf_setrgbcolor_fill($pdf1, 0, 0, 0); pdf_set_font($pdf1, "Times-Bold", 27, "host"); pdf_set_text_pos($pdf1, 40, ltrHt-50); pdf_show($pdf1, "Success Metrics"); pdf_set_font($pdf1, "Times-Bold", 31, "host"); pdf_set_text_pos($pdf1, 40, ltrHt-85); pdf_show($pdf1, "Concept Brand Fit"); // Draw table pdf_setrgbcolor_fill($pdf1, 1.00, 0.95, 1.00); pdf_setlinewidth($pdf1, 3); pdf_rect($pdf1, 15, 290, ltrWd-30, 120); pdf_fill($pdf1); pdf_setrgbcolor_fill($pdf1, 0, 0, 0); pdf_rect($pdf1, 15, 290, ltrWd-30, 120); pdf_stroke($pdf1); pdf_setlinewidth($pdf1, 1); pdf_rect($pdf1, 15, 290, ltrWd-30, 40); pdf_rect($pdf1, 15, 330, ltrWd-30, 40); pdf_rect($pdf1, 15, 370, ltrWd-30, 40); pdf_stroke($pdf1); pdf_setrgbcolor_fill($pdf1, 0, 0, 0); pdf_set_font($pdf1, "Times-Bold", 26, "host"); pdf_set_text_pos($pdf1, 260, ltrHt-230); pdf_show($pdf1, "Score Confidence"); pdf_set_font($pdf1, "Times-Bold", 21, "host"); pdf_set_text_pos($pdf1, 35, ltrHt-270); pdf_show($pdf1, "-- Gross Margins"); pdf_set_text_pos($pdf1, 270, ltrHt-270); pdf_show($pdf1, $ResultsArray[56*2]); // (question_num-1) * 2 = main score pdf_set_text_pos($pdf1, 445, ltrHt-270); pdf_show($pdf1, $ResultsArray[56*2+1]); // (question_num-1) * 2 + 1 = confidence pdf_set_text_pos($pdf1, 35, ltrHt-310); pdf_show($pdf1, "-- Price Premium"); pdf_set_text_pos($pdf1, 270, ltrHt-310); pdf_show($pdf1, $ResultsArray[9*2]); // (question_num-1) * 2 = main score pdf_set_text_pos($pdf1, 445, ltrHt-310); pdf_show($pdf1, $ResultsArray[9*2+1]); // (question_num-1) * 2 + 1 = confidence pdf_set_font($pdf1, "Times-Bold", 26, "host"); pdf_set_text_pos($pdf1, 31, ltrHt-450); pdf_show($pdf1, "Success Metric Score = "); pdf_set_font($pdf1, "Times-Bold", 26, "host"); pdf_set_text_pos($pdf1, 355, ltrHt-450); pdf_show($pdf1, $SM[11]); //md // pdf_place_image($pdf1, $image1, ltrWd-0.45*$image_width-33, 45, 0.45); pdf_end_page($pdf1); //--------------------------------------------------------------------- //###################################################################### //###################################################################### // CLOSE PDF POINTER TO MEMORY SPACE AND CLOSE PDF FILE //-------------------------------------------------------- pdf_close($pdf1); // fclose($fp); //###################################################################### //###################################################################### $buf = PDF_get_buffer ($pdf1); $len = strlen ($buf); header ("Content-Type: application/pdf"); header ("Content-Length: $len"); header ("Content-Disposition: inline; filename=hello_world.pdf"); print $buf; PDF_delete($pdf1); function round_off($number) { $num_array = explode(".", $number); $intgr = $num_array[0]; // round up if (substr($num_array[1], 0, 1) >= 5) $intgr ++ ; return $intgr; } ?>