MACSCRPT Archives

October 2006

MACSCRPT@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:
Barry Wainwright <[log in to unmask]>
Reply To:
Macintosh Scripting Systems <[log in to unmask]>
Date:
Mon, 23 Oct 2006 21:22:16 +0100
Content-Type:
text/plain
Parts/Attachments:
text/plain (61 lines)
I already tried piping outputText through tr, that didn't solve the problem
(the lines weren't all overlayed, but they just ran into one another in a
continuous stream of text, without paragraphs)

Or, did you mean you pipe the output of groff through tr before it hits
pstopdf? Surely not? ...

 ... Nope just tried that and, as expected, that destroys the format of the
ps stream and pstopdf chokes.

-- 
Barry


> From: Mark Lively <[log in to unmask]>
> Reply-To: Macintosh Scripting Systems <[log in to unmask]>
> Date: Mon, 23 Oct 2006 16:07:09 -0400
> To: <[log in to unmask]>
> Subject: Re: Groff oddity - no line feeds?
> 
> pstopdf isn't happy if you have both returns and newlines.  I pipe it
> through tr \\r \\n and that seems to fix a lot of the problems.
> 
> On Oct 23, 2006, at 3:55 PM, Barry Wainwright wrote:
> 
>> Išve been trying to output a file to PDF and have tried both groff and
>> enscript, followed by pstopdf, but they both produce pdfs with all
>> the lines
>> superimposed on one another at the top of the page.
>> 
>> Here's the shell script call I'm using:
>>         set shellCommand to "echo " & quoted form of outputText & "|
>> enscript
>> -B -n r -o -|pstopdf -o " & quoted form of (folderName & fileName)
>> & " -i"
>> 
>> or:
>>     set shellCommand to "echo " & quoted form of outputText --& "|
>> groff -T
>> ps -i |pstopdf -o " & quoted form of (folderName & fileName) & " -i"
>> 
>> Followed by
>>         do shell script shellCommand
>> 
>> 'outputText' contains several (mac formatted) paragraphs of text. I
>> have
>> tried running the results of the echo command through a 'tr' pipe
>> to change
>> line endings, without any success. I have also tried writing the
>> data to a
>> temporary file with either mac or unix line endings, but again, no
>> change in
>> the output.
>> 
>> Any clues on how to use either of these commands effectively would be
>> appreciated.
>> 
>> -- 
>> Barry
>> 

ATOM RSS1 RSS2