Re: Write a PDF file for an HTML file

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Try to generate pdf using ezPdf class.
ezPdf => http://www.ros.co.nz/pdf/

Is free and open source class.

Regards

On Thu, Apr 2, 2009 at 8:00 AM, Softmasters <s_soft_masters@xxxxxxxxx> wrote:
> Thanks, but it seems you are using some functions that are not available in
> the core PHP installation. I think there must some class that will using in
> this script. Can you please send me a complete working example or at least
> the orignal class and page.
>
> Thanks you
>
> --- On Thu, 4/2/09, nickmarinho@xxxxxxxxxxxx <nickmarinho@xxxxxxxxxxxx>
> wrote:
>
> From: nickmarinho@xxxxxxxxxxxx <nickmarinho@xxxxxxxxxxxx>
> Subject: Re:  Write a PDF file for an HTML file
> To: php-objects@xxxxxxxxxxxxxxx
> Date: Thursday, April 2, 2009, 8:21 AM
>
> Here is one that i use to convert html tags to fpdf:
>
> function WriteHTML($html) {
> $html=str_replace( "\n",' ',$html);
> $a=preg_split( '/<(.*)>/ U',$html, -1,PREG_SPLIT_ DELIM_CAPTURE) ;
>
> foreach($a as $i=>$e){
> if($i%2==0){
> if($this->HREF) $this->PutLink( $this->HREF, $e);
> else $this->Write( 5,$e);
> }
> else{
> if($e{0}=='/ ')
> $this->CloseTag( strtoupper( substr($e, 1)));
> else{
> $a2=explode( ' ',$e);
> $tag=strtoupper( array_shift( $a2));
> $attr=array( );
> foreach($a2 as $v)
> if(ereg('^([ ^=]*)=["\ ']?([^"\' ]*)["\']? $',$v,$a3) )
> $attr[strtoupper( $a3[1])]= $a3[2];
> $this->OpenTag( $tag,$attr) ;
> }
> }
> }
> }
>
> Softmasters wrote:
>>
>> Dear All,
>>
>> I have template for the report to printed and emailed to each client.
>> I have reached at the point where I have the html text for the whole
>> report in a string object. Now I want to write a pdf for this html code.
>>
>> Please suggest me the BEST php script (php class) that I can use to
>> generate good pdfs. I know there are a lot of such scripts available
>> but which one is best (developers) can suggest.
>>
>> Waiting for your reply
>> Thanks
>>
>
> [Non-text portions of this message have been removed]
>
> 

[Index of Archives]     [PHP Home]     [PHP Users]     [PHP Soap]     [Kernel Newbies]     [Yosemite]     [Yosemite Campsites]

  Powered by Linux