LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 11-24-2010, 10:58 AM   #1
mchoquette
LQ Newbie
 
Registered: Nov 2010
Posts: 3

Rep: Reputation: 0
printing an html document


i have an htm document generated by code, and i will like to print it before sending it via email.
How do i do it ?
Thank you.
 
Old 11-24-2010, 11:17 AM   #2
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405
Hi,

Am I assuming correctly thet you want to remove all the html tags and print what is left?

If so, have a look at this thread here at LQ. It deals with stripping html code from files. Once you have a stripped version you can send it to the printer as you always do.

Hope this helps.
 
Old 11-24-2010, 11:17 AM   #3
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 26,685

Rep: Reputation: 7971Reputation: 7971Reputation: 7971Reputation: 7971Reputation: 7971Reputation: 7971Reputation: 7971Reputation: 7971Reputation: 7971Reputation: 7971Reputation: 7971
Quote:
Originally Posted by mchoquette View Post
i have an htm document generated by code, and i will like to print it before sending it via email.
How do i do it ?
Thank you.
Open the file in your web browser, and clicking "print" not work?

You don't give many details, so it's hard to say. Do you want to print the raw HTML code, or the finished rendered page? Version/distro of Linux?
 
Old 11-24-2010, 11:34 AM   #4
mchoquette
LQ Newbie
 
Registered: Nov 2010
Posts: 3

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by TB0ne View Post
Open the file in your web browser, and clicking "print" not work?


opening file in web browser and print do work (this is not a problem, the question that i had was to print it through the comnmade line)
thank you.


You don't give many details, so it's hard to say. Do you want to print the raw HTML code, or the finished rendered page? Version/distro of Linux?

I want to print in a fonished rendered page Linux version RedHat5.0

Last edited by mchoquette; 11-24-2010 at 11:50 AM.
 
Old 11-24-2010, 11:45 AM   #5
colucix
LQ Guru
 
Registered: Sep 2003
Location: Bologna
Distribution: CentOS 6.5 OpenSuSE 12.3
Posts: 10,509

Rep: Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983
You did not answer the main question by TB0ne: Open the file in your web browser, and clicking "print" not work?. If you want to stick with the command line, take a look at html2ps, convert it to PostScript and print using the lpr command. Anyway, I would prefer the TBOne's advice, since it can easily resolve URLs for in-line images (if any).
 
Old 11-24-2010, 12:39 PM   #6
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 26,685

Rep: Reputation: 7971Reputation: 7971Reputation: 7971Reputation: 7971Reputation: 7971Reputation: 7971Reputation: 7971Reputation: 7971Reputation: 7971Reputation: 7971Reputation: 7971
Quote:
Originally Posted by mchoquette View Post
I want to print in a fonished rendered page Linux version RedHat5.0
Ok...follow these steps CLOSELY:
  1. Open your web browser
  2. Click FILE
  3. Select OPEN FILE
  4. Choose the .HTML file you want to print
  5. Click OK
  6. Click FILE
  7. Click PRINT
 
  


Reply



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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
sed with html document jpgauvin Linux - Newbie 4 12-22-2008 06:54 PM
html; character encoding per document tag, not whole document TheLinuxDuck Programming 0 08-14-2008 11:12 AM
how to create an html object from an XML document mohtasham1983 Programming 2 12-20-2007 02:58 AM
Saving part of a html document bruno buys Programming 2 07-17-2007 11:15 AM
Fooling a HTML document? eantoranz Programming 11 11-11-2004 07:42 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 03:39 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration