Print ONLY selected text from webpage

Dean M

Registered
Hi. I'm fairly new to iMac, but with Windows XP, if you wanted to print only a paragraph or two from a webpage, you just highlighted it and hit 'print'.
So far with my 17" flat screen G4, when ever I do that I get the whole webpage no matter what.
As a workaround I highlight the text in the webpage, copy it to the clipboard and then open 'text edit', copy it to there and then 'print'.
This is Mac ! There must be a better way to do this. Can anyone clue me in ? Thanks so much. Dean M
 
I achieve this by using Services.

Select the text you want to print then go to the application's Services menu, ie: in Safari, go to:

Safari ~> Services ~> TextEdit ~> New Window Containing Selection.

TextEdit will open and automatically paste the text into a new document and all you need do is hit Command +P to print the selection.

That's how Safari does it anyway. There is a 3rd Party solution which places the Print Selection into the Services Menu if you prefer.

You can select text and graphics in any cocoa application (safari, mail.app, etc.), go to the services menu and go to "Print Selection" and the selected stuff will be printed.
 
There is a sample script at http://www.biterscripting.com/SS_WebPageToText.html . It removes all formating, tags, etc from a web page and extracts just the plain text. Download this script to some local .txt file. Then, you call this script as follows.

script SS_WebPageToText.txt page("http://www.somesite.com/somepage.html") > "out.txt"

It will write the output to file out.txt.

You can start with that script. You can modify the script to meet your requirements, and extract just the text you want.

Randi
 
Back
Top