![]() |
|
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Resident Grouch
![]() ![]() ![]() ![]() ![]() ![]() Join Date: Jun 2005
Posts: 6,453
Rep Power: 10
![]() |
"Printer friendly" output
What would you use? Pros? Cons?
__________________
Abstraction doesn't make it impossible to write bad code; it makes it possible to write superior code. Contributor's Corner: Grumpy on C++ Exceptions DaWei on Pointers |
|
|
|
|
|
#2 |
|
Expert Programmer
|
I'm not sure that this is really helpful, but I think if you are goign to make any site with tutorials or guides, or a page with over a page of text, it is best to make it printable.
I found it really annoying that i had to read all of the cprogramming.com tutorial on screen, because it wouldn't print out properly. PDFs are quite cool, but it takes a while to load abobe reader in the browser on my computer.
__________________
Join us at #programmingforums @ irc.freenode.net! My software never has bugs. It just develops random features.
|
|
|
|
|
|
#3 |
|
Professional Programmer
Join Date: May 2005
Location: Bad Nauheim, Germany
Posts: 436
Rep Power: 4
![]() |
SAVE OUR TREES! Get an LCD and read electronic!
__________________
-Steven "Is this a piece of your brain?" - Basil Fawlty |
|
|
|
|
|
#4 |
|
Programming Guru
![]() Join Date: Oct 2004
Location: namespace std
Posts: 1,246
Rep Power: 5
![]() |
i like the portability and stability of pdf documents, i HATE how damn long acrobat takes to load up. maybe i should try an OSS pdf thingie. yeah, this is important for web design, i went to www.progressive.com to go print out an insurance policy declaration so i could get my plates changed from NC to KS. their fu**ing "printer friendly" thing formatted it so the page was about the size of my damn house. i ended up having to write all this crap down with a pencil and look like a disorganized dumbass when i went to the courthouse. one may argue that i was already a disorganized dumbass for not having these documents in the first place, but my wife had inadvertantly thrown them away.
__________________
i put on my robe and wizard hat... Have you ever heard of Plato, Aristotle, Socrates?...Morons. |
|
|
|
|
|
#5 |
|
Troll
Join Date: Apr 2005
Location: Texas
Posts: 732
Rep Power: 4
![]() |
I'm not as much for printer friendly links as I am for selecting the text and printing the selection. That also removes the annoying banners that they push on you. If it's too big, put it into a plain-text editor or change the size in a word processor.
__________________
MD5(sig) = bcef75433db02e9ad9bf81d6f7c5c270 |
|
|
|
|
|
#6 |
|
Programming Guru
![]() Join Date: Oct 2004
Location: namespace std
Posts: 1,246
Rep Power: 5
![]() |
i don't think that's what he's asking, albeit a good idea.
__________________
i put on my robe and wizard hat... Have you ever heard of Plato, Aristotle, Socrates?...Morons. |
|
|
|
|
|
#7 |
|
Programming Guru
![]() |
DaWei, most sites now have some type of page build that look something like this:
[php] <?php $title = "WhateveR"; include("header.php"); include("sidebar.php"); ?> Page content <?php include("footer.php"); ?> [/php] And this is personally what i would use for creating a site. this makes it possible for each of the included files to check for a "page=printable" variable in the URL or something and show a slimmer version to the browser that's designed at a smaller resolution to fit on one page...
__________________
|
|
|
|
|
|
#8 |
|
Resident Grouch
![]() ![]() ![]() ![]() ![]() ![]() Join Date: Jun 2005
Posts: 6,453
Rep Power: 10
![]() |
For those who need to do what I needed to do (print good-looking reports or summaries of page content), you might want to try pdf-php. This prepares .pdf pages in a VERY simple manner, using objects. You download this thing, unzip it, and put it in a directory. There is no need for "installation" on a server, or even for modifying the php .ini file. In other words, you can move this up to a site you have no server control over, and use it. It's free. You can find it here. The attached images show the original portion of the web page containing the data, and the resulting pdf output. Here's what the code looks like (disregarding the DB query and other PHP code):
$doc =& new Cezpdf ();
$doc->selectFont('pdf/fonts/Helvetica.afm');
$doc->ezSetMargins(30, 60, 30, 30);
$doc->ezStartPageNumbers (300,15,10,'','',1);
$doc->ezText ($letterhead, "16", array ("justification" => "center"));
$doc->ezSetDy (-5);
$doc->ezText ($header, "14", array ("justification" => "center"));
$doc->ezText ($reportdate, "10", array ("justification" => "center"));
$doc->ezSetDy (-5);
$doc->ezText ($title, "14", array ("justification" => "center"));
$doc->ezText ($sort, "12", array ("justification" => "center"));
$doc->ezSetDy (-10);
$doc->ezColumnsStart();
$doc->ezTable ($theArray, $cols, "", array ('width' => '250',
'cols' => array ('ytdnew' => array ('justification' => 'right'),
'ytdused' => array ('justification' => 'right'),
'ytdtotal' => array ('justification' => 'right'))));
$doc->ezStream ();
__________________
Abstraction doesn't make it impossible to write bad code; it makes it possible to write superior code. Contributor's Corner: Grumpy on C++ Exceptions DaWei on Pointers |
|
|
|
|
|
#9 |
|
Resident Grouch
![]() ![]() ![]() ![]() ![]() ![]() Join Date: Jun 2005
Posts: 6,453
Rep Power: 10
![]() |
@steven: One of my clients wouldn't mind taking an LCD into a board meeting, but the other one doesn't want to toss an LCD into the box as a packing list.
__________________
Abstraction doesn't make it impossible to write bad code; it makes it possible to write superior code. Contributor's Corner: Grumpy on C++ Exceptions DaWei on Pointers |
|
|
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|