Re: Write a PDF file for an HTML file

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

 



well I have gone though the class but I think u are not understanding what I am saying. I have an html file saved at my host server. When I access any html file via browser,  browser parse the html and then display the output. 
 
What I want is to read that html file from the server, and save its output (just like a browse shows after parsing) to its pdf file. I do NOT want to output the html code in pdf. In other words, I want a phpclass or script that take this open this html file (or just take the html code in a string) and print its output after parsing like the browsers do and save it in pdf. 
 
I hope I have now clearly told what I need.
 
Thanks
 

--- On Thu, 4/2/09, davidonzo blog <davidonzo@xxxxxxxxx> wrote:


From: davidonzo blog <davidonzo@xxxxxxxxx>
Subject: Re:  Write a PDF file for an HTML file
To: php-objects@xxxxxxxxxxxxxxx
Date: Thursday, April 2, 2009, 5:52 PM






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@ yahoo.com> 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@ yahoo.com. br <nickmarinho@ yahoo.com. br>
> wrote:
>
> From: nickmarinho@ yahoo.com. br <nickmarinho@ yahoo.com. br>
> Subject: Re:  Write a PDF file for an HTML file
> To: php-objects@ yahoogroups. com
> 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]
>
> 
















      

[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