generate pdf sobi2 joomla
Posted on December 11, 2008

Sobi2 is a great component but it lacks in some feature such as PDF generation.
Many of you must be searching on web to find the solution but there is none which can satisfy you.

Here are some simple steps to generate PDF from sobi2

There are some limitation for generating PDF one is that you have to make the sobi

detailed template in either table structure or in ’spans’.DIV IS NOT SUPPORTED HERE.

You need to download DOMPDF

unzip the DOMPDF folder and put files in to a folder inside the includes folder.

Just make a form in sobi detailed template and add all the fields in hidden fields. make the action of your form to “your site name.com/filename.php”.

Now make a link for PDF and submit the form on click of that link.

Make a file “filename.php” inside your default site folder.

Just include the file “dompdf_config.inc.php”

[require_once(realpath(dirname(__FILE__).'/includes/pdf/dompdf_config.inc.php'))]

Retrieve all the required posted values and design the PDF file accordingly.

At the end of the page just wright the following code

<?php
$old_limit = ini_set(”memory_limit”, “64M”);
$dompdf = new DOMPDF();
$dompdf->load_html($value);
$dompdf->set_paper(’a4′,’portrait’);
$dompdf->render();
$dompdf->stream(”dompdf_out.pdf”);
exit(0);
?>

Still in trouble!!! Do write your comments here and I will try to solve the problem.

Happy AlgoBloging!!!