[comp.sys.next] printing .wn files

hitt@Neon.Stanford.EDU (Daniel Hitt) (05/04/90)

There's a command line program wn2rtf (which is on the directory
/NextApps/WriteNow.app) which converts files from the .wn format
(WriteNow) to rtf (Rich Text Format).

It would be very nice to have a similar program that converts files
to PostScript format---such a program, to be useful, could be invoked
from a terminal window by typing
    the-program < the-file.wn > the-file.ps

This way, when you are remote-logged onto a NeXT machine, you could
produce a PostScript file, and then print it on a nearby printer.  It
would be very helpful to do this when looking for documentation for
some NeXT item which only has documentation in the .wn format.

I'm sure such a program must exist, or there must be some way to
get PostScript versions of .wn documents without being at the NeXT
console.  I'd be much obliged if someone could post or e-mail to me
pointers on where such a program is.

dan

rogerj@batcomputer.tn.cornell.edu (Roger Jagoda) (05/09/90)

In article <1990May4.101750.5205@Neon.Stanford.EDU> hitt@Neon.Stanford.EDU (Daniel Hitt) writes:
>There's a command line program wn2rtf (which is on the directory
>/NextApps/WriteNow.app) which converts files from the .wn format
>(WriteNow) to rtf (Rich Text Format).
Really! You got this to work?! How!!????
 
The usage line reads:
 
Usage: /NextApps/WriteNow.app/wn2rtf filename
 
So we've tried:
 
/NextApps/WriteNow.app/wn2rtf <fn>.wn
--> nothing produced, no errors, no <fn>.rtf file made
 
and:
 
/NextApps/WriteNow.app/wn2rtf < <fn>.wn > <fn>.rtf
--> no errors, nothing produced.
 
What's the magic incantation? It sure would be nice if there were a man page or an entry in the DL for utilities like this...Perhaps some kind soul who
go the utility working can post how to the net....:-). Thanks in advance!
 
>
>It would be very nice to have a similar program that converts files
>to PostScript format---such a program, to be useful, could be invoked
>from a terminal window by typing
>    the-program < the-file.wn > the-file.ps
>
Agreed! There are just some time when you can't get the NeXTStep
window on whatever window you're remote accessing from (straight VT100,
Sun, HP, etc...). Even better would be a way to do something like:
 
lpr -P<printer> FILENAME.wn
 
Don't laugh, lpr has -t -d -n flags for roff and tex files, why not
.wn and .rtf??!! Just MHO, but the wn2ps piece is REALLY needed now
for the afore-mentioned reasons.
 
>This way, when you are remote-logged onto a NeXT machine, you could
>produce a PostScript file, and then print it on a nearby printer.  It
>would be very helpful to do this when looking for documentation for
>some NeXT item which only has documentation in the .wn format.
>
>I'm sure such a program must exist, or there must be some way to
>get PostScript versions of .wn documents without being at the NeXT
>console.  I'd be much obliged if someone could post or e-mail to me
>pointers on where such a program is.

Me too, thanks in advance double plus too good!
 

-- 
------------------------------------------------------------------------------
Roger Jagoda                          -- My employers don't even like paying
Cornell University                         me, let alone accept responsibility
fqoj@cornella.cit.cornell.edu              for anything I say or do! --

hitt@Neon.Stanford.EDU (Daniel Hitt) (05/09/90)

After reading Roger Jagoda's response i tried to do wn2rtf again and for
a while it looked like it wouldn't work.

But if you're careful to use a ``plain file'' such as
/NextLibrary/Documentation/Ariel/Bug56Reference.wn/WNDocument.wn,
then typing
/NextApps/WriteNow.app/wn2rtf plain-file-name.wn > rtf-output.rtf
will produce an output file (in the case of the Bug 
reference above, the file consists of 124508 characters, 
303 of them non-ASCII, according to vi, at least---the original 
document had 104089 bytes).

(Some directories have the extension .wn and on those i also got
empty output.)

It would still be nice to have a program to convert .wn files to
PostScript.  Furthermore, somebody (say at NeXT) who has access to the 
source code might be able to write such a program without too much
effort:  George Drapeau has pointed out that it is possible to 
convert from .wn to PostScript by opening
a .wn document with WriteNow, then choosing ``print'' from the menu,
then choosing ``save'' from the requestor box that comes up (and
then cancelling the print).  The problem with this approach is that
you have to be at the console in order to do it.  But someone with
access to the sources could perhaps ``glue'' them together in
a way that there could be easy access to this via a terminal.

Thanks to Roger Jagoda and Joe St Sauver for responding.

dan