Mombu the Php Forum

Go Back   Mombu the Php Forum > Php > Printing Question
User Name
Password
REGISTER NOW! Mark Forums Read




Reply Bookmark and Share
1 11th November 16:32
tasmaniac
External User
 
Posts: 1
Default Printing Question



OK this is very general.

Whats the best way to do formatted printing via php?

In my case I have a postgre database that I connect to with a
php(naturally seeing as this is the php list).

My aim is to convert an Access db to php/postgre.

In this access db there are several reports that require landscape
printing.

So the question is how to replace this via php/whatever.

(I did say it was a vague question)

Oh and I'm aiming for a unix/windows outcome.

any links welcome.

TIA

Peter
  Reply With Quote


 


2 11th November 16:32
faulkes
External User
 
Posts: 1
Default Printing Question



There are a few options I can think of, the first being setting up a
specific css file which formats your output into a printable page.

The other more portable / useful option would be to use one of the
available php pdf classes to generate your report in a pdf file which
would
allow you to better control printing options across multiple platforms. Michael
  Reply With Quote
3 11th November 16:32
floort
External User
 
Posts: 1
Default Printing Question


You could try PDFlib().
Draw your reports to landscape formated pdf's and print them.


pdf is platform independent.

I hope this is what you meant.

Floor
  Reply With Quote
4 11th November 16:32
robert
External User
 
Posts: 1
Default Printing Question


I recently had a request from a client to create a button on client
search results that would generate page that could print off a mailing
envelope for each selected client. They wanted to run a print batch on a
couple of thousand clients. So I used HTML, CSS. Specifically to force
page breaks while printing I used the following:
<div style="page-break-after: always"></div>

Note that you can't use a span for the above css attribute. Then for
various dimensions of the envelope and return address etc, I used CSS
attributes defined by the inches unit. I'll admint I whipped it up quick
and dirty using tables (sorry, tables are just simpler for generating
quick layouts than divs are... talk to the hand smelly purists
So something like the following:

table.envelopeLayout
{
width: 13in;
}

table.envelopeLayout td.returnAddress
{
height: 3in;
}

So this looked nice in the browser, but when they went to print it got
all borked when they told IE to use landscape mode. So I told them to
upgrade to a real browser (Firefox (though I prefer Opera ). After
that they told me it worked perfectly. So, to make the point... you do't
need PDF, HTML will do. BTW, I did this all remotely and someone on-site
did a couple of print tests to give me feedback. I never even got to see
their new fancy schmancy printer

I've done other print stuff via the browser before too... such as state
driving certificates for presentation in court. Never had a problem once
the layout and print configuration were refined.

Cheers,
Rob.
--
..------------------------------------------------------------.
| InterJinn Application Framework - http://www.interjinn.com |
:------------------------------------------------------------:
| An application and templating framework for PHP. Boasting |
| a powerful, scalable system for accessing system services |
| such as forms, properties, sessions, and caches. InterJinn |
| also provides an extremely flexible architecture for |
| creating re-usable components quickly and easily. |
`------------------------------------------------------------'
  Reply With Quote
Reply


Thread Tools
Display Modes


Some other forums that might be of your interest : Php 5 forum, Apache forum, Iis forum, Functions forum, Classes forum, Librarys forum, Bugs forum, Postgres forum, Mysql forum, Paradox forum, Ms sql forum, Configurations forum, Php.ini forum, Problems forum, Scripting forum, Css forum, General forums, Off-topic talk, Links, Extra forums, Php


Copyright © 2006 SmartyDevil.com - Dies Mies Jeschet Boenedoesef Douvema Enitemaus -
666