create certificate with odt php

hello today i complete my own work.
this work based on odtphp. This is api with help your create the cerificate and many odt documents

now start how to create certificate using odt php and save in odtphp/tests/ folder

first create the odt document in this doecument set the attributes for ex:-

odt

in this you see some attributes like [!–BEGIN articles–],{pic},[!–END articles–]
with help of this attributes data are inserted in odt document using php

now i show you simple coding for certificate creation

<?php
setSegment('articles'); //set the article
$article->setImage('pic','./images/hello.jpg'); //this code for {pic} attribute
$odf->setVars('titlem','RECENT ADVANCEMENTS IN MANUFACTURING TECHNOLOGY'); //this for titlem
$odf->setVars('person','HITESH KUMAR'); //this for person
$odf->setVars('college','G.N.D.E.C.,Ludhiana'); //this for college
$article->merge(); //merge the all data in article
$odf->mergeSegment($article); //merge the Segment of article
$odf->exportAsAttachedFile(); //this for download the file when is created
?>

after this your document look like this

cr

now your certificate is created

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s