Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to view .prn file

Status
Not open for further replies.

girishpde

Programmer
Dec 2, 2001
13
0
0
IN
Hi all,

I have few reports from Ms-Word and before printing the front end tool will convert it to .prn format

I tried to view the prn files with different viewers
( Escapee from redtitan,
swiftview,
Ghost view is certainly out of question
since it's not PCL tool )

but alas none works.

I hope somebody will suggest some good tool.

Thanks in Advance
Girish
 
What level of PCL is WORD generating, and does the viewer support it?

What does "doesn't work" mean exactly?

I have had pretty good success with Swiftview here. I only use PCL5.


Jim Asman
 
I use windows and wordpad works well for me to view .prn file.

Peixin
 
I use SwiftView, and (version 7) will render most PCL5 and PCL6 jobs satisfactorily.

Note that SwiftView doesn't support PCL5 colour or PCL3 (used for inkjets), but it does support colour in PCL6.

 

Thanks for all the suggestions.
I am using IBM Infoprint 40 PCL printer driver. The word files have different type of contents from plain text, to tables, grids, barcodes etc.

All I can see in Swiftview/Ecapee is same if I open the .prn file from notepad ( text editor ): plain text with some ascii codes.
 
Which implies that your printer driver is not generating standard PCL sequences.

Just what is being generated I can't tell from the minimum description given above. Can you post a small sample of the output (showing hex codes for unprintables)? Provide the first hundred bytes of the file, at least.

 
Hi,
here's first few lines which are viewable from any text editor/PCL Editor,
Hope it helps to investigate.
It is from Xerox Docuprint 135 EPS Driver, It shows PS Adobe, But I can't view this file from Ghostscript either.


%!PS-Adobe-3.0
%%Title: Microsoft Word - batchctr_20040729_001.doc
%%Creator: PScript5.dll Version 5.2
%%CreationDate: 8/4/2004 1:19:45
%%For: localadm
%%BoundingBox: (atend)
%%Pages: (atend)
%%Orientation: Portrait
%%PageOrder: Special
%%DocumentNeededResources: (atend)
%%DocumentSuppliedResources: (atend)
%%DocumentData: Clean7Bit
%%TargetDevice: (Xerox DocuPrint 135 EPS) (3015.102) 504
%%LanguageLevel: 3
%%EndComments

%%BeginDefaults
%%PageBoundingBox: 0 0 595 842
%%ViewingOrientation: 1 0 0 1
%%EndDefaults


%%BeginProlog
%%BeginResource: file Pscript_WinNT_ErrorHandler 5.0 0
/currentpacking where{pop/oldpack currentpacking def/setpacking where{pop false
setpacking}if}if/$brkpage 64 dict def $brkpage begin/prnt{dup type/stringtype
ne{=string cvs}if dup length 6 mul/tx exch def/ty 10 def currentpoint/toy exch
def/tox exch def 1 setgray newpath tox toy 2 sub moveto 0 ty rlineto tx 0
rlineto 0 ty neg rlineto closepath fill tox toy moveto 0 setgray show}bind def
/nl{currentpoint exch pop lmargin exch moveto 0 -10 rmoveto}def/=={/cp 0 def
typeprint nl}def/typeprint{dup type exec}readonly def/lmargin 72 def/rmargin 72
def/tprint{dup length cp add rmargin gt{nl/cp 0 def}if dup length cp add/cp
exch def prnt}readonly def/cvsprint{=string cvs tprint( )tprint}readonly def
/integertype{cvsprint}readonly def/realtype{cvsprint}readonly def/booleantype
{cvsprint}readonly def/operatortype{(--)tprint =string cvs tprint(-- )tprint}
readonly def/marktype{pop(-mark- )tprint}readonly def/dicttype{pop
(-dictionary- )tprint}readonly def/nulltype{pop(-null- )tprint}readonly def
/filetype{pop(-filestream- )tprint}readonly def/savetype{pop(-savelevel- )
tprint}readonly def/fonttype{pop(-fontid- )tprint}readonly def/nametype{dup
xcheck not{(/)tprint}if cvsprint}readonly def/stringtype{dup rcheck{(\()tprint
tprint(\))tprint}{pop(-string- )tprint}ifelse}readonly def/arraytype{dup rcheck
{dup xcheck{({)tprint{typeprint}forall(})tprint}{([)tprint{typeprint}forall(])
tprint}ifelse}{pop(-array- )tprint}ifelse}readonly def/packedarraytype{dup
rcheck{dup xcheck{({)tprint{typeprint}forall(})tprint}{([)tprint{typeprint}
forall(])tprint}ifelse}{pop(-packedarray- )tprint}ifelse}readonly def/courier
/Courier findfont 10 scalefont def end errordict/handleerror{systemdict begin
$error begin $brkpage begin newerror{/newerror false store vmstatus pop pop 0
ne{grestoreall}if errorname(VMerror)ne{showpage}if initgraphics courier setfont
lmargin 720 moveto errorname(VMerror)eq{userdict/ehsave known{clear userdict
/ehsave get restore 2 vmreclaim}if vmstatus exch pop exch pop PrtVMMsg}{
(ERROR: )prnt errorname prnt nl(OFFENDING COMMAND: )prnt/command load prnt
$error/ostack known{nl nl(STACK:)prnt nl nl $error/ostack get aload length{==}
repeat}if}ifelse systemdict/showpage get exec(%%[ Error: )print errorname
=print(; OffendingCommand: )print/command load =print( ]%%)= flush}if end end
end}dup 0 systemdict put dup 4 $brkpage put bind readonly put/currentpacking
where{pop/setpacking where{pop oldpack setpacking}if}if
%%EndResource
userdict /Pscript_WinNT_Incr 230 dict dup begin put
%%BeginResource: file Pscript_FatalError 5.0 0
userdict begin/FatalErrorIf{{initgraphics findfont 1 index 0 eq{exch pop}{dup
length dict begin{1 index/FID ne{def}{pop pop}ifelse}forall/Encoding
{ISOLatin1Encoding}stopped{StandardEncoding}if def currentdict end
/ErrFont-Latin1 exch definefont}ifelse exch scalefont setfont counttomark 3 div
cvi{moveto show}repeat showpage quit}{cleartomark}ifelse}bind def end
%%EndResource
 
Your extract is definitely PostScript; why GhostScript won't recognise it as such, I don't know.

As it is PostScript, PCL viewers such as SwiftView and EscapeE will not recognise it either.

I'm a bit confused about which driver(s) you are using: in an earlier post you mentioned:
using IBM Infoprint 40 PCL printer driver
but your last post indicates that your output is:
from Xerox Docuprint 135 EPS Driver
 
sorry dasdaduk,
Actually we have one system deployed to two places one place uses IBM Infoprint 40 PCL printer driver, the print files generated can be viewed through siwftviewer.

The other place uses Xerox Docuprint 135 EPS Driver. It's PS format and looks like I can't use Ghostview to view the file it gives me following error:


exec

ehsave restore

%%Pages: 2

(%%[LastPage]%%) =

%%EOF

%XRXbegin: 001.0300
%XRXPDLformat: PS-Adobe
%XRXtitle: Microsoft Word - dispatch_20031121_001.d
%XRXsenderName: administrator
%XRXrecipientName: administrator
%XRXcopyCount: 1
%XRXbookletMaker:
--- End offending input ---
file offset = 22016
gsdll_execute_cont returns -15


Anyway I agree that this is PCL forum, I will check it out at other place.

Thanks a Lot

Girish
 
Girish

The %XRX statements (which were not shown in your earlier post) are Xerox Job Ticket statements; these are Xerox defined, which is presumably why GhostView and GhostScript don't like them.

I think that most Xerox driver dialogues include an option which allows you to switch off these job ticket headers (although doing so might have some effect if the streams are actually sent to a printer rather than to file).
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top