LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
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, 11: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, 12:17 PM   #2
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2387Reputation: 2387Reputation: 2387Reputation: 2387Reputation: 2387Reputation: 2387Reputation: 2387Reputation: 2387Reputation: 2387Reputation: 2387Reputation: 2387
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, 12:17 PM   #3
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 17,916

Rep: Reputation: 3689Reputation: 3689Reputation: 3689Reputation: 3689Reputation: 3689Reputation: 3689Reputation: 3689Reputation: 3689Reputation: 3689Reputation: 3689Reputation: 3689
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, 12:34 PM   #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 12:50 PM.
 
Old 11-24-2010, 12:45 PM   #5
colucix
LQ Guru
 
Registered: Sep 2003
Location: Bologna
Distribution: CentOS 6.5 OpenSuSE 12.3
Posts: 10,509

Rep: Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976
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, 01:39 PM   #6
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 17,916

Rep: Reputation: 3689Reputation: 3689Reputation: 3689Reputation: 3689Reputation: 3689Reputation: 3689Reputation: 3689Reputation: 3689Reputation: 3689Reputation: 3689Reputation: 3689
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


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 07:54 PM
html; character encoding per document tag, not whole document TheLinuxDuck Programming 0 08-14-2008 12:12 PM
how to create an html object from an XML document mohtasham1983 Programming 2 12-20-2007 03:58 AM
Saving part of a html document bruno buys Programming 2 07-17-2007 12:15 PM
Fooling a HTML document? eantoranz Programming 11 11-11-2004 08:42 AM


All times are GMT -5. The time now is 10:43 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration