Re: text to dark pdf
Re: text to dark pdf
- Subject: Re: text to dark pdf
- From: "Stockly, Ed" <email@hidden>
- Date: Tue, 06 Oct 2009 14:03:08 -0700
- Thread-topic: text to dark pdf
>>>sorry, i don't know javascript. If someone can write it, then i can use it.
But i can't write it myself. I simply want to change the entire background color
to gray.
If you¹d prefer to do it without JavaScript, here¹s a pure AppleScript
method...
HTH,
ES
----------
set myText to "Hello World"
PlaceTextIntoNewWindow(myText)
on PlaceTextIntoNewWindow(myText)
set HTMLheader to "<html>
<body bgcolor=\"#aaaaaa\">
<div id='text'>"
set HTMLfooter to "</div>
</body>"
set tempFolder to path to temporary items
set tempDoc to (tempFolder as text) & "tempDoc"
set tempDoc to POSIX path of tempDoc
try
set openFile to open for access tempDoc with write permission
on error
close access tempDoc
set openFile to open for access tempDoc with write permission
end try
set eof of openFile to 1
write HTMLheader & myText & HTMLfooter to openFile
close access openFile
tell application "Safari"
open tempDoc
end tell
end PlaceTextIntoNewWindow
>>>>>
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden