NISUS Archives

March 2010

NISUS@LISTSERV.DARTMOUTH.EDU

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
Reply To:
Date:
Sat, 27 Mar 2010 00:40:39 +0900
Content-Type:
text/plain
Parts/Attachments:
text/plain (45 lines)
On Mar 27, 2010, at 12:10 AM, Hamid Haji wrote:

> When they did not see any blue text they probably did not try to click the display text of the links.
> 
> Save As PDF... from NWP preserves the link but not the colour.

I tend to think sooner or later Apple will update their PDF producer so that url/mailto links have blue colour and underline. In the meantime, you can use a macro like this to make it easy to colourize links.
<http://www2.odn.ne.jp/alt-quinon/files/NWPro/select/SelectAllLinks_nwm.zip>

It will select all hyperlinks in the document. Then, you can apply a colour, underline, etc. on them at once. Alternatively, you can quasi-automate the process by adding, for example, ":Format:Text Color:Dark Bleu", etc. at the end of the macro. Actually, there is no macro command for setting underline colour.


Kino

--

### Select All Links ###

$doc = Document.active
if $doc == undefined
	exit
end

$sels = Array.new
foreach $text in $doc.allTexts
	$i = 0
	while $i < $text.length
		$attr = $text.displayAttributesAtIndex $i
		$range = $text.rangeOfDisplayAttributesAtIndex $i
		if Defined $attr.link
			$sel = TextSelection.new $text, $range
			$sels.appendValue $sel
		end
		$i = $range.bound
	end
end

if ! $sels.count
	exit 'No link found, exiting...'
end

$doc.setSelections $sels

### end of macro ###

ATOM RSS1 RSS2