Hi
I am using Html2pdf with CodeIgniter in my project and i have to genrate pdf with Some pictures and charts.
I am using version 1.7.2 and CI Html2pdf version 3 .*.
I Am Not Able to insert / put images in pdf file.
bellow Is The Code I Have Written
then this is plugin named to_pdf_pi
<? Php if (! Defined ('basePath')) exit ('No direct script access Allowed');
pdf_create function ($ html, $ filename, $ stream = TRUE)
(
require_once ('html2pdf/html2pdf.class.php');
$ Html2pdf Html2pdf = new ('P', 'A4', 'en', false, 'ISO-8859-15', 2);
$ Html2pdf-> WriteHTML ($ html, isset ($ _GET ['vuehtml']));
$ Html2pdf-> Output ($ filename);
)
?>
and in my controller
$ This-> load-> plugin ('to_pdf');
$ Data = "";
$ Content = $ this-> load-> view (rpt.php '1 ', $ data, true);
pdf_create ($ content, "test.pdf");
and this is my view (view/1rpt.php) file
<! DOCTYPE html PUBLIC "- / / W3C / / DTD XHTML 1.0 Transitional / / EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
<title> Untitled Document </ title>
</ Head>
<body>
<img src="images/loginpage_12.jpg" alt="logo" style="width: 50mm" />
</ Body>
</ Html>
please anyone can help
thanks in advance
Vaibhav Malushte