LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
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 09-14-2005, 12:36 AM   #1
cigarstub
Member
 
Registered: Sep 2005
Posts: 145

Rep: Reputation: 15
How can I do these with GNU/FSF ?


I would like to print all html files (without need to print each file individually) in directory A and in subdirectories of A the way that each html file do not take a blank page but the whole printing of all these files is just like the printing of a big document. Each html file should not take each page but should follow each other in a page. (I want to print a book)
 
Old 09-14-2005, 01:09 AM   #2
Dark_Helmet
Senior Member
 
Registered: Jan 2003
Posts: 2,786

Rep: Reputation: 374Reputation: 374Reputation: 374Reputation: 374
Code:
find /path/to/A/directory -type f -iname "*.html" | xargs html2ps | lpr
You will need to alter the command if you do not use lpr for printing.

Also, if there is a specific order you want the pages printed in, there's no guarantee they will be found in the order you want. There's no easy way around that, because the computer's not psychic. The most straightforward way to enforce page order is to give all the files in the order you want to html2ps, which means you get rid of the find command and the xargs parts, but that takes away virtually all of the automation.

If you don't have html2ps, you can download it from the author's website. All it is is a Perl script. It has a lot of options to control how things are rendered, but the basic out-of-the-box defaults may work for what you need.

Lastly, you could bypass html2ps altogether if you like, and just cat all the files, but that would give you un-rendered output. In other words, plain text with the HTML embedded in the text.
 
  


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
about fsf? nazib Linux - General 1 03-03-2005 02:12 PM
TheAge.com: FSF raises doubts over two open source licences thegeekster General 4 03-04-2004 03:23 PM
Geek Gear to benefit the FSF and EFF KingofBLASH General 3 02-04-2004 06:56 PM
GNU Pascal calls GNU C chris.hicks Programming 0 11-13-2003 11:18 AM
GNU C calls GNU Pascal? chris.hicks Programming 1 11-13-2003 08:48 AM

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

All times are GMT -5. The time now is 12:41 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