Programming Forums
User Name Password Register
 

RSS Feed
FORUM INDEX | TODAY'S POSTS | UNANSWERED THREADS | ADVANCED SEARCH

Reply
 
Thread Tools Display Modes
Old Oct 8th, 2005, 12:48 PM   #1
DaWei
Resident Grouch
 
DaWei's Avatar
 
Join Date: Jun 2005
Posts: 6,453
Rep Power: 10 DaWei is on a distinguished road
"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
DaWei is offline   Reply With Quote
Old Oct 8th, 2005, 1:06 PM   #2
coldDeath
Expert Programmer
 
coldDeath's Avatar
 
Join Date: Aug 2005
Location: UK
Posts: 862
Rep Power: 3 coldDeath is on a distinguished road
Send a message via AIM to coldDeath Send a message via Yahoo to coldDeath
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.
coldDeath is offline   Reply With Quote
Old Oct 8th, 2005, 1:35 PM   #3
stevengs
Professional Programmer
 
stevengs's Avatar
 
Join Date: May 2005
Location: Bad Nauheim, Germany
Posts: 436
Rep Power: 4 stevengs is on a distinguished road
SAVE OUR TREES! Get an LCD and read electronic!
__________________
-Steven
"Is this a piece of your brain?" - Basil Fawlty
stevengs is offline   Reply With Quote
Old Oct 8th, 2005, 3:40 PM   #4
bl00dninja
Programming Guru
 
bl00dninja's Avatar
 
Join Date: Oct 2004
Location: namespace std
Posts: 1,246
Rep Power: 5 bl00dninja is on a distinguished road
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.
bl00dninja is offline   Reply With Quote
Old Oct 8th, 2005, 4:29 PM   #5
Dameon
Troll
 
Dameon's Avatar
 
Join Date: Apr 2005
Location: Texas
Posts: 732
Rep Power: 4 Dameon is on a distinguished road
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
Dameon is offline   Reply With Quote
Old Oct 8th, 2005, 4:31 PM   #6
bl00dninja
Programming Guru
 
bl00dninja's Avatar
 
Join Date: Oct 2004
Location: namespace std
Posts: 1,246
Rep Power: 5 bl00dninja is on a distinguished road
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.
bl00dninja is offline   Reply With Quote
Old Oct 8th, 2005, 4:36 PM   #7
tempest
Programming Guru
 
tempest's Avatar
 
Join Date: Oct 2004
Posts: 1,041
Rep Power: 5 tempest is on a distinguished road
Send a message via ICQ to tempest Send a message via AIM to tempest Send a message via Yahoo to tempest
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...
__________________

tempest is offline   Reply With Quote
Old Oct 30th, 2005, 11:36 AM   #8
DaWei
Resident Grouch
 
DaWei's Avatar
 
Join Date: Jun 2005
Posts: 6,453
Rep Power: 10 DaWei is on a distinguished road
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 ();
I am suitably impressed.
Attached Images
File Type: jpg webpage.jpg (15.1 KB, 35 views)
File Type: jpg report.jpg (12.7 KB, 35 views)
__________________
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
DaWei is offline   Reply With Quote
Old Oct 30th, 2005, 12:36 PM   #9
DaWei
Resident Grouch
 
DaWei's Avatar
 
Join Date: Jun 2005
Posts: 6,453
Rep Power: 10 DaWei is on a distinguished road
@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
DaWei is offline   Reply With Quote
Reply

Bookmarks

« Previous Thread in Forum | Next Thread in Forum »

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump




DaniWeb IT Discussion Community
All times are GMT -5. The time now is 10:57 PM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC