php-general Digest 27 Mar 2010 16:50:25 -0000 Issue 6662

Topics (messages 303517 through 303525):

Server-side postscript-to-PDF on-the-fly conversion
        303517 by: Rob Gould
        303518 by: David Robley
        303522 by: Floyd Resler
        303523 by: Al

Re: Please guide in selection of Framework: according to your experience
        303519 by: Nilesh Govindarajan
        303520 by: Ashley Sheridan

Re: Zip and text files generated are corrupted
        303521 by: Kim Madsen

Noloh PHP Framework
        303524 by: Brandon Rampersad

is there any setting to declare the member variables in constructor?
        303525 by: solo hsi

Administrivia:

To subscribe to the digest, e-mail:
        php-general-digest-subscr...@lists.php.net

To unsubscribe from the digest, e-mail:
        php-general-digest-unsubscr...@lists.php.net

To post to the list, e-mail:
        php-gene...@lists.php.net


----------------------------------------------------------------------
--- Begin Message ---
Is there a free solution out there that will enable me to take a PHP-generated 
postscript output file, and dynamically, on-the-fly convert it to a PDF 
document and send to the user as a download when the user clients on a link?

More description of what I'm trying to do:

1)  I've got a web-page that accepts some user input
2)  They hit SUBMIT
3)  I've got a PHP file that takes that input and generates a custom Postscript 
file from it, which I presently serve back to the user.  On a Mac, Safari and 
Firefox automatically take the .ps output and render it in Preview.
4)  However, in the world of Windows, it seems like it'd be better to just 
convert it on-the-fly into a PDF, so that the user doesn't need to worry about 
having a post-script viewer app installed.  



--- End Message ---
--- Begin Message ---
Rob Gould wrote:

> Is there a free solution out there that will enable me to take a
> PHP-generated postscript output file, and dynamically, on-the-fly convert
> it to a PDF document and send to the user as a download when the user
> clients on a link?
> 
> More description of what I'm trying to do:
> 
> 1)  I've got a web-page that accepts some user input
> 2)  They hit SUBMIT
> 3)  I've got a PHP file that takes that input and generates a custom
> Postscript file from it, which I presently serve back to the user.  On a
> Mac, Safari and Firefox automatically take the .ps output and render it in
> Preview.
> 4)  However, in the world of Windows, it seems like it'd be better to just
> convert it on-the-fly into a PDF, so that the user doesn't need to worry
> about having a post-script viewer app installed.

Ghostscript is the first thing that comes to my mind; alternatively googling
for "convert postscript pdf" or similar might turn up other options.


Cheers
-- 
David Robley

To a cat, "NO!" means "Not while I'm looking."
Today is Sweetmorn, the 13rd day of Discord in the YOLD 3176. 


--- End Message ---
--- Begin Message ---


On Mar 27, 2010, at 12:41 AM, Rob Gould <gould...@me.com> wrote:

Is there a free solution out there that will enable me to take a PHP- generated postscript output file, and dynamically, on-the-fly convert it to a PDF document and send to the user as a download when the user clients on a link?

More description of what I'm trying to do:

1)  I've got a web-page that accepts some user input
2)  They hit SUBMIT
3) I've got a PHP file that takes that input and generates a custom Postscript file from it, which I presently serve back to the user. On a Mac, Safari and Firefox automatically take the .ps output and render it in Preview. 4) However, in the world of Windows, it seems like it'd be better to just convert it on-the-fly into a PDF, so that the user doesn't need to worry about having a post-script viewer app installed.


Is there a particular reason why you need to use Postscript? Can you output it directly to PDF?

Take care,
Floyd

Sent from my iPhone


--- End Message ---
--- Begin Message ---


On 3/27/2010 12:41 AM, Rob Gould wrote:
Is there a free solution out there that will enable me to take a PHP-generated 
postscript output file, and dynamically, on-the-fly convert it to a PDF 
document and send to the user as a download when the user clients on a link?

More description of what I'm trying to do:

1)  I've got a web-page that accepts some user input
2)  They hit SUBMIT
3)  I've got a PHP file that takes that input and generates a custom Postscript 
file from it, which I presently serve back to the user.  On a Mac, Safari and 
Firefox automatically take the .ps output and render it in Preview.
4)  However, in the world of Windows, it seems like it'd be better to just 
convert it on-the-fly into a PDF, so that the user doesn't need to worry about 
having a post-script viewer app installed.




http://pear.php.net/package/XML_fo2pdf
http://pear.php.net/package/File_PDF

--- End Message ---
--- Begin Message ---
On 03/27/2010 09:58 AM, Vishal Rewari wrote:
Dear PHP community,

I am vishal, I have recently started development in PHP

I have come across these PHP frameworks:


    1. Codeigniter
    2. Symphony
    3. CakePHP
    4. PEAR



Please guide me which one of them is *good in performance ? available
functionality ? Easy to use and configure* or the one you would recommend
according to your experience.


My DB is MySQl, or should I stick to native call from PHP?


Since you're new to PHP, you should not directly start off with frameworks. I agree, using frameworks makes the job infinite times easier, but as a learning point of view, you should first try to build some applications (not to sell or freelance!) from scratch without using any frameworks. You can of course use minimal PEAR packages.

This way you will get a lot to know how to write efficient PHP code. Yes this will take time, but in future you may be one of the best developers coding PHP out there !

Lastly, PEAR isn't a framework, though combining various packages out there you can make one :)

First try Zend, its the easiest to use as far I've seen.

I have tried Symfony too, but I found it a little tougher to start with.

--
Nilesh Govindarajan
Site & Server Administrator
www.itech7.com

--- End Message ---
--- Begin Message ---
On Sat, 2010-03-27 at 11:15 +0530, Nilesh Govindarajan wrote:

> On 03/27/2010 09:58 AM, Vishal Rewari wrote:
> > Dear PHP community,
> >
> > I am vishal, I have recently started development in PHP
> >
> > I have come across these PHP frameworks:
> >
> >
> >     1. Codeigniter
> >     2. Symphony
> >     3. CakePHP
> >     4. PEAR
> >
> >
> >
> > Please guide me which one of them is *good in performance ? available
> > functionality ? Easy to use and configure* or the one you would recommend
> > according to your experience.
> >
> >
> > My DB is MySQl, or should I stick to native call from PHP?
> >
> 
> Since you're new to PHP, you should not directly start off with 
> frameworks. I agree, using frameworks makes the job infinite times 
> easier, but as a learning point of view, you should first try to build 
> some applications (not to sell or freelance!) from scratch without using 
> any frameworks. You can of course use minimal PEAR packages.
> 
> This way you will get a lot to know how to write efficient PHP code. Yes 
> this will take time, but in future you may be one of the best developers 
> coding PHP out there !
> 
> Lastly, PEAR isn't a framework, though combining various packages out 
> there you can make one :)
> 
> First try Zend, its the easiest to use as far I've seen.
> 
> I have tried Symfony too, but I found it a little tougher to start with.
> 
> -- 
> Nilesh Govindarajan
> Site & Server Administrator
> www.itech7.com
> 

As far as frameworks go, I've found CodeIgniter very very easy to work
with, but I do agree with Nilesh, you should begin by writing code
without a framework first. This is because any framework adds an extra
layer to your learning, which obviously makes it more difficult for you.

Thanks,
Ash
http://www.ashleysheridan.co.uk



--- End Message ---
--- Begin Message ---
Mike Roberts wrote on 25/03/2010 14:56:
remove

No :-) Use the proper unsubscribe method rather than spamming the list.

--
Kind regards
Kim Emax - masterminds.dk

--- End Message ---
--- Begin Message ---
Hello buds,

Anyone have experience with the noloh php framework (noloh) and knows where
i can download it? Im not sure if its open source or encrypted.

Thanks

--- End Message ---
--- Begin Message ---
now i'm re-writing some script to output pdf files. the original code
is based on fpdf, but as you know, fpdf can't deal with the characters
in utf8. so i want to change it to tcpdf. there is a class extend from
fpdf, in its constructor function, there is some script just like
"$this->db = $db;". there isn't any variable named "$db" in parent
class(class fpdf) and child class, i have checked it carefully and
"print_r($this)" at the top of child's constructor function. but after
"$this->db=$db", there is a member variable named $db(i have print_r
and check it too). when i change the parent class to tcpdf, although i
haven't change any code in child class and there isn't a member
variable named $db in parent class(class tcpdf), php returns me a
error "TCPDF ERROR: Cannot access protected property / Undefined
property". i print_r($this) at the top of constructor function again
and check whether there is a member variable named $db in both parent
and child class, finally i'm sure there isn't. i think maybe there is
a setting in the parent class(fpdf/tcpdf) here about this condition.
it controls whether you can declare a member variable by equaling it.
i tried to find it out on google or in fpdf/tcpdf sources but i
failed, there are about 16k lines in tcpdf.... so i post this mail to
request some help, is there somebody have any experience about this
case? please help me, thanks a lot.
solo

--- End Message ---

Reply via email to