DOS Application Printing issues

Hello experts,

this has been doing my head in for a while but heres what i've got

Terminal services client running some old DOS based applications which can only print to LPT1.
I have a generic/text only printer which is mapped as LPT1 and using PRN2FILE.COM to redirect the output to a text file.

however the output is too wide for one page.
What i need is to be able to modify the output font somehow to be either narrower or smaller so it cna fit wide

the output is a text based table and if its not on one line per record it looks completely wrong

I've tried shrinking the text to 8pt and making the page landscape but its still stupid.

it used to work when it had a physical printer connected to it however the issue is now it doesn't but a soft-copy is required.

Please let me know if you need more information
@echo off
:program path
net use f: \\sydsvr03\public\warranty\shared\wr
:printer output
c:\prn2file.com f:\printo~1\op-%random%.rtf /P1
f:
wr.exe
net use f: /delete

Open in new window

LVL 3
Tim PalmerLevel 3 Support TechnicianAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

BALMUKUND KESHAVCommented:
What do you mean by generic/text only printer , is it dot-matrix printer, or line printer, pl.explain col.size supported by your printer on which you are printer this text file and also width/max.col size of your file which you want to print.
Pl.let me know does your printer support condensed mode printer, generally all dot-matrix printer support this. If your printer on another laser/deskjet printer pl.provide the paper size your printer support so that i can find out any proper sol.for you.

Think if there is a problem there must be a solution and i.s. IT.
Best of luck.

Bm Keshav
0
Steve KnightIT ConsultancyCommented:
How wide is it trying to print.  I understand what you are trying to do, but unless it was designed to print to wide paper an A4 printer certainly would only have had maybe 160 characters wide.  In notepad on my 22" monitor at 8pt Courier new I can get 220 characters wide... I say courier because I assume the output will be line up so needs to be a fixed pitch one.

Are you jsut trying to read this on the screen, or to print it out again afterwards?  I wonder if changing the paper size to A3 in the generic print driver (advanced buton under pritner preferences) might give you enough cpl?

Can you post a sample text file of what it is producing at all?
Steve
0
Steve KnightIT ConsultancyCommented:
What I am getting at is the printer driver may be wrapping the text at the end of it's A4 lines...
0
HTML5 and CSS3 Fundamentals

Build a website from the ground up by first learning the fundamentals of HTML5 and CSS3, the two popular programming languages used to present content online. HTML deals with fonts, colors, graphics, and hyperlinks, while CSS describes how HTML elements are to be displayed.

Steve KnightIT ConsultancyCommented:
Hmm, I've just sent a 250 character wide text file to lpt1: mapped to a generic printer printing to file.... and the text file that came out of the generic printer is exactly the same as the text I sent with no wrapping etc... and that was with it set to A4.

That was just by sharing the generic text printer and then net use lpt1: \\pcname\genericshare mind not with con2print
0
Tim PalmerLevel 3 Support TechnicianAuthor Commented:
@BMKESHAV
Generic/Text only is a printer driver in Windows that allows you to print to a file. It is not a physical printer

@dragon

unfortuately I'm not allowed to post a sample of the text file as its confidential company information.

on our old system it used to print on A4 and be very squished, like a narrow font?
the output needs to go into a document (most likely printed) to go to the top boss in the company.
The old printer was just a standard Canon printer but it was in place for so long the guy who set it up is long gone and forgotten so I can't even draw on him.

when I try mapping lpt1 to a shared generic/text only printer the application tells me that the printer isn't ready
0
BALMUKUND KESHAVCommented:
@Phreakwently :
If your output is being sent to file first and col.width is >A4 size, then there is two methods to get proper printout :
1) Arrange a Dot-Matrix Printer of 132 Col. (B/c these type of text files is being desigend for these printers)
or
2) Modify (Change the font size of your text file/adjust col. manually in any word processr/spread sheet, its depends on format of your file)

As i think option 1) is permanent solution.

Bm keshav
0
Tim PalmerLevel 3 Support TechnicianAuthor Commented:
for point 1, do you mean a physical printer? if so, thats out of the question

if not, how do you propose i configure my printers for that?
0
BALMUKUND KESHAVCommented:
Yes, Physical printer.
If you are unable to procure a printer try to do as advised in option 2.
B/c u are not showing your text file ( how can i guess the format of the text file) and until i don't know the format i am unable to provide you any solution. If you cann't put your original text file, put a sample/dummy with exact format.

Bm keshav



0
Tim PalmerLevel 3 Support TechnicianAuthor Commented:
well the output is text and putting a sample up isn't an option since its confidential output.

The output at the moment is an RTF using PRN2FILE and using a shared generic/text printer isn't working
0
Steve KnightIT ConsultancyCommented:
If you can't supply us with information to look at it is difficult to help you unless you are prepared to look at the files yourself.  What I am trying to identify is in the file whether it already has carriage return/line feeds in at a certain point across in the output for instance or whether there are other codes in there.

I'm sure it wouldn't take much to take half a dozen lines of the output in Notepad and remove anything incrimentating and post.  My email address is in my profile (click dragon-it link above) if you prefer to send direct rather than post publically... I assure you would not go anywhere dodgy!

For A4 landscape laser output if the app was designed for that (and I was doing so from DOS apps around 18 years ago... you could get 132 or160 characters across depending upon the mode chosen. Some printers could do, I think, 220.  This was sending raw text to the printers though and I imagine what is happening here is you are capturing the data using the generic printer and then opening it in a windows app and using that to print?  

Once you have the raw text file it would be perfectly possible to load it into Notepad and ajust printer settings there or just add PCL codes, say, to control a printer to put into Landscape small fonts mode etc. if you did want to print.  Without seeing the output you are getting or knowing what you are viewing this in it is a trifle difficult.

Another possible option is to use pdfcreator.  You can setup pdfcreator on a pc (it is possible to put it on a server as a service but for this purpose on a normal PC), share it and therefore connect lpt1: to it as you are at the moment.  You can configure that to AutoSave as PDF or one of many other fonts.

Where are you in the world btw?

Steve
0
Tim PalmerLevel 3 Support TechnicianAuthor Commented:
I'm in Sydney.

email sent to you dragon.

I had tried mapping cutepdf to lpt1 but that was a failure.
Is PDFcreator the name of the application you're suggesting?
0
Steve KnightIT ConsultancyCommented:
yes that is a free app that will produce pdf or various other fomats from print output.  Have got your email and will look later...
0
Steve KnightIT ConsultancyCommented:
Tim,

Those look fine to me... only problem is they are called RTF so if opened in Word by default they end up looking rubbish.  Just changed the extension to .TXT and opened in Notepad.  make sure word wrap is turned off (format | word wrap) and change the font to something smaller (format | font).  The "Terminal" font is good for this being a nice small font tha is still readable at 6pt for example.

With that shows fine though need to scroll right a little still to see on my 15" 1024x768 laptop screen, should fit fine on a 1280x1024 bigger monitor...

I don't THINK i'm missing something else, give it a try?
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Tim PalmerLevel 3 Support TechnicianAuthor Commented:
Yeah i'll definately give that a try at work tomorrow - will let you know
0
Tim PalmerLevel 3 Support TechnicianAuthor Commented:
Got me on a line of thought

Process I ended up doing is:
copying the paste from notepad to Word 2007
changing the font to 6pt Courier New (not 100% accurate but acceptable)
changing the margins to narrow
and changing the paragraph spacing

passes muster in a word document which means it can be put into a report easily for its ultimate PDF destination.

Thanks for your assistance
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft DOS

From novice to tech pro — start learning today.