Hi

My requirement is converting html to pdf.
We are using php 5.0.2 version on linux server.
dompdf version : 0.5.1

this is the code we used.

<?php
ini_set("memory_limit", "850M");
ini_set("display_errors","0");
ini_set("safe_mode",1);
$path_pdf = $_SERVER['DOCUMENT_ROOT'].'/include/dompdf/dompdf_config.inc.php';
require_once($path_pdf);
$dompdf = new DOMPDF();

ob_start();	

$test = "<table width='90%' align='center' cellpadding='2' cellspacing='1' border='0'>	<tr><td width = '12.5%'><u>Company Name</u></td><td width = '12.5%'><u>Title</u></td><td width = '12.5%'><u>Description</u></td><td width = '12.5%'><u>Start Date</u></td><td width = '12.5%'><u>End Date</u></td><td width = '12.5%'><u>City</u></td><td width = '12.5%'><u>State</u></td><td width = '12.5%'><u>Country</u></td></tr><tr><td width = '12.5%'>Test Company</td><td width = '12.5%'>  </td><td width = '12.5%'>[COLOR="DarkGreen"][B]As online and bug fixing team member, Iam working mainly on oracle &amp; Pro*c. Details of person or company are stored in oracle tables in back end using Pro*c programs. Data will be sent using CCAPPS (C as front end). These details are known as Market Partner (MP) details. Whenever MP is loaded or updated from CCAPPS, Daemon process will pick up the data and will be stored in temporary oracle tables using proc*c programs, by using these tables, data will be stored in permanent tables. After insertion in permanent tables, data will be deleted from interface temporary tables. If the insertion is not proper in permanent tables then it will be roll backed from all permanent tables. So, in interface part, storing of MP in permanent tables is taken care. My Role is to solve the issues in the interface part of the application. The issues that were major handled by me were on addresses and employment details of the customers of the GECB. The issues include Data Correction in addresses table, employment details, bug fixing in (Market Partner) Pro*c programs, etc. I have written pl/sqls to alter the table, migration of data from one table to other, trigger to insert the record in permanent table whenever there is an insertion in temporary table, correction of data in tables by pl/sql programs. Configuration &amp; Release Management: This project's intention was to stabilize the release process and SCM. The tool used is Rational ClearCase. We defined certain standards, which helps to keep track of development changes during different phases of project. This also helped in easy identification of who, when, why the changes has been made to a project file. This was a mandatory requirement of Six Sigma, to lower down the defects. I am working as a CM for many projects, to say few, IREAL, ****PIT, CCAPPS, PCS which all are branches of the GLASS project. Being a CM, my responsibility is to maintain &amp; control versions of the project files with the objective to ensure product integrity. As a RM, my responsibility is that, while releasing a product I have to ensure that correct versions of files are released from the repository and release documents are submitted to the Quality team. Also I am responsible for the system testing after every release in co-ordination with business analysts. Also as a CM in a project which implements MultiSite, I am responsible to ensure the synchronization of vob replicas in Vienna and Satyam locations. Whenever there is any packet loss, it is my responsibility to resend or regain the lost packets. Also, as a CM on a UNIX platform, I wrote shell scripts to speed up many processes like vob creation, updation, checkouts and checkins. PROC*C 8.1.6 Compiler Implementation: A GE-Capita[/B][/COLOR]</td><td width = '12.5%'>  </td><td width = '12.5%'>  </td><td width = '12.5%'>  </td><td width = '12.5%'>  </td><td width = '12.5%'>  </td></tr><tr><td colspan = '8'>&nbsp;</td></tr></table>";	

//$html = ob_get_contents(); 
//ob_end_clean();	
$dompdf->set_paper("a4","portrait");
$font = Font_Metrics::get_font("Arial");	
$dompdf->load_html($test);	
$dompdf->render();
$dompdf->stream("sample.pdf",array('Attachment' => 0));	

?>

The above code is working fine when green colored text is small, if text is big not generating pdf file. If text is long my browser getting hanged.

Please any one help me out.

Thanking you in advance for your help

Praveen

    7 days later

    This is a known problem with DOMPDF and tables. If a single table cell is too large to fit on a page DOMPDF will enter an infinite loop. Your only option right now is if you can move the text outside the table cell.

    I don't expect this will be addressed in the upcoming release, but probably in the one after that.

      8 days later
      bsweeney;10953458 wrote:

      This is a known problem with DOMPDF and tables. If a single table cell is too large to fit on a page DOMPDF will enter an infinite loop. Your only option right now is if you can move the text outside the table cell.

      I don't expect this will be addressed in the upcoming release, but probably in the one after that.

      Thank you Bsweeney, and sorry for late reply i was in different project and no time to look this forum.

      I have searched in so many forums but no luck. I used html2pdf that is working for me.

      Thanks
      Praveen.P

        Write a Reply...