php-general Digest 6 Jan 2012 11:11:13 -0000 Issue 7637

Topics (messages 316189 through 316197):

PDF Printing instead?
        316189 by: Jim Giner
        316190 by: Dan Joseph
        316191 by: Davo Smith
        316193 by: Bastien
        316194 by: Marc Guay
        316195 by: Govinda
        316196 by: Paul M Foster

Re: Printing
        316192 by: Steven Staples

How to find where class is used?
        316197 by: Dotan Cohen

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 ---
ok - somebody has advised that I should not be trying to print to a printer 
from my website php script.

The suggestion of creating a pdf and sending to the client was made.  How do 
I install the pdf functions?  I've never had to install a package before or 
is that something my hoster does? 



--- End Message ---
--- Begin Message ---
On Thu, Jan 5, 2012 at 3:14 PM, Jim Giner <jim.gi...@albanyhandball.com>wrote:

> ok - somebody has advised that I should not be trying to print to a printer
> from my website php script.
>
> The suggestion of creating a pdf and sending to the client was made.  How
> do
> I install the pdf functions?  I've never had to install a package before or
> is that something my hoster does?
>

If you're on shared hosting, it'd be something your hosting company does.
I used fpdf for my last pdf job.  Although, I personally do not see a
problem with having people just print a nicely formatted web page out.

-- 
-Dan Joseph

http://www.danjoseph.me

--- End Message ---
--- Begin Message ---
On Thu, Jan 5, 2012 at 8:26 PM, Dan Joseph <dmjos...@gmail.com> wrote:
> On Thu, Jan 5, 2012 at 3:14 PM, Jim Giner <jim.gi...@albanyhandball.com>wrote:
>
>> ok - somebody has advised that I should not be trying to print to a printer
>> from my website php script.
>>
>> The suggestion of creating a pdf and sending to the client was made.  How
>> do
>> I install the pdf functions?  I've never had to install a package before or
>> is that something my hoster does?
>>
>
> If you're on shared hosting, it'd be something your hosting company does.
> I used fpdf for my last pdf job.  Although, I personally do not see a
> problem with having people just print a nicely formatted web page out.

I've used TCPDF in some projects - does not need much in the way of
installing, just stick all the TCPDF files in a subfolder on your
website then include the main php file.

As an added hint, if you don't need lots of fonts, you can safely
delete all the ones you don't want to reduce the disk usage
considerably.

Davo

--- End Message ---
--- Begin Message ---
On 2012-01-05, at 3:14 PM, "Jim Giner" <jim.gi...@albanyhandball.com> wrote:

> ok - somebody has advised that I should not be trying to print to a printer 
> from my website php script.
> 
> The suggestion of creating a pdf and sending to the client was made.  How do 
> I install the pdf functions?  I've never had to install a package before or 
> is that something my hoster does? 
> 
> 
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 

Also try dompdf from digitaljunkies.ca. It allows you to pass an HTML doc to 
the code to provide a PDF

Bastien

--- End Message ---
--- Begin Message ---
> Also try dompdf from digitaljunkies.ca. It allows you to pass an HTML doc to 
> the code to provide a PDF

I think in this case it should say "It doesn't work!".  :)

Marc

--- End Message ---
--- Begin Message ---
>> Also try dompdf from digitaljunkies.ca. It allows you to pass an HTML doc to 
>> the code to provide a PDF
> 
> I think in this case it should say "It doesn't work!".  :)


maybe this:

http://code.google.com/p/dompdf/

-G

--- End Message ---
--- Begin Message ---
On Thu, Jan 05, 2012 at 03:14:58PM -0500, Jim Giner wrote:

> ok - somebody has advised that I should not be trying to print to a printer 
> from my website php script.
> 
> The suggestion of creating a pdf and sending to the client was made.  How do 
> I install the pdf functions?  I've never had to install a package before or 
> is that something my hoster does? 
> 

The fpdf and/or tcpdf libraries are the standard answers to this. The
fpdf library is more primitive, but if your needs are simple, it's
considerably less "bulky" than tcpdf. Installation on either one should
be very simple, as in, download the package, put it in a subdirectory,
read the documentation, and start.

I use fpdf constantly for printing invoices, reports, etc. Once you've
built a PDF (by following the instructions for the specific package),
dump it in a subdirectory and provide a link to it on a webpage. The
user can then simply click on the link and their browser will open it
and provide the native (usually Adobe Reader) interface for viewing and
printing it.

Paul

-- 
Paul M. Foster
http://noferblatz.com
http://quillandmouse.com

--- End Message ---
--- Begin Message ---
If I am not mistaken, that is only for printing ON the SERVER... not on the
client.   If you're printing, then you're trying to print to a locally
connected printer on your server.

PHP runs server side, and therefore doesn't know anything about your locally
attached printers.


I did notice that you started a new thread about printing from PDF's, and if
you're trying to create a document to print on your client machine, then
creating a PDF is much easier.

http://fpdf.org


Steven Staples


> -----Original Message-----
> From: Jim Giner [mailto:jim.gi...@albanyhandball.com]
> Sent: January 5, 2012 10:55 AM
> To: php-gene...@lists.php.net
> Subject: Re: [PHP] Printing
> 
> >
> 
> I can't tell you much on this, because I don't use windows. You have
> to get the source at http://pecl.php.net/printer and compile it. I
> don't know the procedure, etc.
> 
> --
> Nilesh Govindarajan
> http://nileshgr.com
> 
> That was a short trip.  Clicked on the link for documentation and it takes
> me right back to the php manual pages that I'd already read.  Clicked on
> the
> link to download the latest and it's a dead link.
> 
> Does anyone print from their php websites??
> 
> 
> 
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 
> -----
> No virus found in this message.
> Checked by AVG - www.avg.com
> Version: 2012.0.1901 / Virus Database: 2109/4724 - Release Date: 01/05/12


--- End Message ---
--- Begin Message ---
In a large application that I am tasked with maintaining (vBulletin)
there is a particular class that is used:
vB_ProfileBlock_VisitorMessaging. I know the file that it is defined
in, but I cannot find the file that actually creates a
vB_ProfileBlock_VisitorMessaging object. I tried the brute-force grep
approach, but the only place where I see the class mentioned is in the
class declaration itself:
[dev@localhost forum]$ grep -ir "vB_ProfileBlock_VisitorMessaging" *
includes/class_profileblock.php:class vB_ProfileBlock_VisitorMessaging
extends vB_ProfileBlock

I know that this class is used as there is a page that is obviously
using it. I have tried playing be-the-PHP-parser with that file, but
it goes on to include() about a dozen other files, each of which
include() another dozen files! This server does not and cannot have a
debugger. What else can I do to find where this class object is
created?

Thanks.

-- 
Dotan Cohen

http://gibberish.co.il
http://what-is-what.com

--- End Message ---

Reply via email to