Loading... Please wait.
 Livio.net Home Page
  Users online:   36  
Home Web Design Sitemap Contact
 Go to Home Page  Printer Friendly version of this page  Bookmark this page
     
Web  Livio.net
  
Thursday, September 02, 2010   »» 
ASP Scripts
ASP Functions Library
Weather Forecast
Paragliding fly sites
Live Web Cams
Image Gallery
Online Road Maps
Online Translations
Currency Conversion
IP Geolocation Tool
Online Feed Reader
Freeware Software
Friend sites
ASP Links Reference

 Cool Links

 Cool Links

 Cool Links

 Cool Links

 Cool Links



Join the Mailing List
Mailing List: privacy policy


   Asp Scripts
   PrinterFriendly     

Author: Livio Siri
Size: 3 kb
Downloads: 4625
Revision: 2.0
Date: 29/01/2006
Category: Code Snippets
   View Demo    DEMO

 View Info    INFO

 View License Agreement    LICENSE

 Download   DOWNLOAD
 

Back to the category: Code Snippets
Back to scripts home page
Description:
This code snippet shows how to implement a "printer friendly" version link for your pages.

The "Printer Friendly" version select the main content of your page, removing the menu, header graphics, advertising and foot content. The script performs the HTTP "get" method via the XMLHTTP object to retrieve the page to be printed. Using the XMLHTTP object instead of something like FSO means that the ASP page is actually executed and not just 'read' as a stream of characters.

ASSUMES THAT YOUR PAGE HAS PRINTABLE CONTENT WITHIN TWO COMMENTS:
<!-- content_starts_here //-->
............
<!-- content_ends_here //-->

You can find a live example in this page, follow the printer link.
The code is commented in the script.
(Needs MSXML 3.0 and VBScript version 5 or above installed on Server)

REVISION HISTORY:

V 2.0:
Problem with special characters ä, ö, å, æ, ø etc. now fixed
 

Rated:
by Aspin.com users
What do you think?
 
Rate this script
@ HotScripts.com
Simpleforum: Functions Generic Forum (Total 27 Messages)
» Post New MessageView Mode : Full   Preview  Titles Refresh
Page 1 of 2  First | Previous | Next | Last
Message
Font is largerGus'07 Jul 29, 05:29
I found your Print.asp script great, but I have one problem. All the fonts are a ... (more)
Message
NT rightsMichael Borup'07 Jun 27, 11:38
Hi
When I use print.asp on a site closed for Anonymous Acces i get an error ... (more)
Message
cache problemKen Hackenberg'06 Nov 10, 00:18
I seem to have a problem with the first test page I tried to keep reappearing no ... (more)
Message
buttonPalmeet'06 Mar 27, 12:47
hello sir,
I have used this code in my own page.But when i click on button ... (more)
Message
RE: buttonLivio'06 Mar 27, 22:43
If you have correctly included the special comments in your page, check that you ... (more)
Message
VariablesSunita'06 Mar 27, 07:23
Hello sir,
I am using this code snippet to generate the printer friendly pa ... (more)
Message
RE: VariablesLivio'06 Mar 27, 22:36
When you call for the printer friendly page a new instance of the page is execut ... (more)
Message
RE: RE: Variablessunita'06 Mar 28, 07:15
Hello sir,
Thanks for replying
Sir as you have said that it is difficu ... (more)
Message
Problem with menu's,header bannersArchana'06 Mar 21, 06:48
Hello sir,

I have tried the code but it is not removing the menu's,he ... (more)
Message
RE: Problem with menu's,header banners(anonymous)'06 Mar 21, 16:14
The script takes everything between the special comments, including the content ... (more)
Message
RE: RE: Problem with menu's,header bannersArchana'06 Mar 22, 06:03
sir
Thanks for replying.
You have said that the contents which i want ... (more)
Message
RE: RE: RE: Problem with menu's,header bannersLivio'06 Mar 22, 09:40
Special comments you should include into your page are:


....... ... (more)
Message
RE: RE: RE: RE: Problem with menu's,header bannersArchana'06 Mar 23, 12:08
Hello Sir
Thanks for replying with sample code.
I tried the same code ... (more)
Message
RE: RE: RE: RE: RE: Problem with menu's,header bannersLivio'06 Mar 23, 15:39
Verify your system for these requirements:
MSXML 3.0 and VBScript version 5 ... (more)
Message
RE: RE: RE: RE: RE: RE: Problem with menu's,header bannersarchana'06 Mar 25, 08:16
Hello sir,
I tried all you said, and am now able to get the printer friendl ... (more)
Visit Livio.net for more OpenSource ProjectsPowered by SimpleForum V2.0

CATEGORIES:


Applications   (5)   (ASP Applications Collection)
  ImageThumbs
This application let you show a nice thumbnail images presentation on your web pages, with autoresize.

  WEB Calendar
Database driven daily, weekly and montly event web or intranet calendar with event add, edit and delete.

  dbList
 Planet Source Code Superior Coding Contest Winner Database management grid with record edit, delete, add, search, filter and export to excel, database and table dropdown selection, pages navigation, field sort and search in page.

  Active Users
Show active users and who is online on your web pages without global.asa.

  Security Login
Protect your ASP pages with password access.



Code Snippets   (1)   (ASP Code Snippets Collection)
  PrinterFriendly
This code snippet shows how to implement a "printer friendly" version link for your pages.



Functions   (3)   (ASP Functions Collection)
  getFileName
Given a file path either physical or virtual with this function you can obtain the file name or the file dir

  okEmail
ASP function to check proper email input

  PageNav
Function to easily navigate through pages.

 

Top 10 Downloads:
  WEB Calendar  (29111)
  ImageThumbs  (19954)
  dbList  (19628)
  PrinterFriendly  (4625)
  PageNav  (4440)
  Security Login  (3165)
  Active Users  (2906)
  okEmail  (1082)
  getFileName  (864)

Total downloads: 85775

Total Resources:
9 downloads available.

Script Search:


Make a donation:
If you find the code useful, then please help supporting the development and update of these and future scripts by a small donation:



Powered by:
 Livio.net




 

Page rendered in: 297 ms  
Copyright © Livio.net MM-MMX. All rights reserved.

 Get Firefox!
   This Page Is Valid HTML 4.01 Transitional!
   This page is CSS validated
   livio.net page rank
   Help beat spam!
  HAM Radio  I K 1 H S L
    Site Stats
 
Privacy License Terms of Use Report Errors Link to Livio.net