Want your customer to save your article, product catalog, or just a document to PDF format? PDF is very easy document format because it's portable, they can print it anywhere.
//set something usefull information for your pdf document. $author ="Hermawan Haryanto"; //author name (optional) $title ="hermawan.com"; //title of the pdf page (optional) $creator ="Hermawan Haryanto"; //creator (optional) $subject ="News Article"; //Subject (optional) //end set
//start info taken from the database ( i like mysql) $headline="HEADLINE OF THE NEWS"; $reporter="Reporter"; $postdate="04/15/2001"; $article.="This is the sample article line 1 \n"; $article.="This is the sample article line 2 \n"; $article.="This is the sample article line 3 \n"; $article.="This is the sample article line 4 \n"; $article.="This is the sample article line 5 \n"; $article.="This is the sample article line 6 \n"; $article.="This is the sample article line 7 \n"; $article.="This is the sample article line 8 \n"; //end database.
//merging all info to one text $text.=$headline."\n"; $text.=$postdate."\n\n"; $text.=$article."\n"; $text.=$reporter; //end merging
DISCLAIMER: The content provided in this article is not warranted or guaranteed by Developer Shed, Inc. The content provided is intended for entertainment and/or educational purposes in order to introduce to the reader key ideas, concepts, and/or product reviews. As such it is incumbent upon the reader to employ real-world tactics for security and implementation of best practices. We are not liable for any negative consequences that may result from implementing any information covered in our articles or tutorials. If this is a hardware review, it is not recommended to open and/or modify your hardware.