By using jspdf library which generates PDF files using java script.You can download library from http://jspdf.com/ after downloading the library create a html or php file in example folder and paste below code.It already as many examples. but sharing this code ,because we can,t add edit or alter code.but we can add function to work according to our condition.because we can replace or change other option in saveondisk button.one more think we can add php variable in it to create pdf file with php content. <!doctype> <html> <head> <title>jsPDF</title> <link rel="stylesheet" type="text/css" href="css/main.css"> <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script> <script type="text/javascript" src="../libs/downloadify/js/swfobject.js"></script> <script type="text/javascr...
I was working around oops in php 7 ,in which I pass class name and variable to another class constructor function to access the function of it Like inheritance concept.Let me brief with example Example for passing class name and variable in constructor : class A{ public function execute($user){ echo $user; } } class B { protected $a; //where we pass Class A inside constructor public function __construct(A $a){ $this->a = $a; } public function show(){ $user = 'pramodh'; $this->a->execute($user); } } $b = new B(new A); $b->show(); Out Put : Pramodh Example for passing just variable in constructor : class A{ public function execute($user){ echo $user; } } class B { protected $a; //where we pass Class A inside constru...
Comments
Post a Comment