Question

DOS Application Printing issues

Asked by: Phreakwently

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

                                  
1:
2:
3:
4:
5:
6:
7:
8:

Select allOpen in new window

This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.

Subscribe now for full access to Experts Exchange and get

Instant Access to this Solution

  • Plus...
  • 30 Day FREE access, no risk, no obligation
  • Collaborate with the world's top tech experts
  • Unlimited access to our exclusive solution database
  • Never be left without tech help again

Subscribe Now

Asked On
2009-07-01 at 23:07:32ID24538721
Topic

MS DOS

Participating Experts
2
Points
500
Comments
15

Trusted by hundreds of thousands everyday for fast, accurate and reliable tech support.

  • "The time we save is the biggest benefit of Experts Exchange to Warner Bros. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange." Mike Kapnisakis, Warner Bros.
  • "Our team likes having a resource that is more secure than just using Google and most experts using this service really know their stuff. It's nice to look here first versus using Google." Dayna Sellner, Lockheed Martin
  • "Anytime that I've been stumped with a problem, 9 out of 10 times Experts Exchange has either the accepted solution or an open discussion of the potential solution to the problem." Kenny Red, eBay Inc.

See what Experts Exchange can do for you.

Got a question?

We've got the answer.

Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.

Screenshot of Experts Exchange Knowledgebase

Need individual assistance?

Our experts are ready to help.

If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.

Screenshot of Experts Exchange Knowledgebase

Want to learn from the best?

Read articles from industry experts.

Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.

Screenshot of an Article

Working on a long term project?

Store your work and research.

Save solutions to your questions, answers you’ve discovered through searching plus helpful articles in your personal knowledgebase for easy future access.

Screenshot of Experts Exchange Knowledgebase

Access the answers to your technology questions today.

Subscribe Now

30-day free trial. Register in 60 seconds.

What Makes Experts Exchange Unique?

Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Trusted by the world's most respected brands.

image of each brand's logo

Faithfully serving IT professionals since 1996.

Experts Exchange Logo

Try it out and discover for yourself.

Subscribe Now

30-day free trial. Register in 60 seconds.

Related Solutions

  1. slow landscape printing 560c with zip drive
    Am using a HP 560C with a zip drive daisy-chained to the parallel port, and it seems landscape printing is especially slow (portrait works ok). Have searched HP w/o finding anything or any suggested drive updates. Normal, or is there a fix? Thanx.
  2. Printing directly to LPT1 from access VB
    I am on Win98 MSaccess2000 How within the visual basic application can I print directly to LPT1 I have a thermal reciept printer I want to send print information to on LPT1, I do not want it to be spooled first. I also have to be able to send it ASKII characters to get i...
  3. Lost LPT1
    1.I'm on a 333 W98SE with an HP2200D. I just uninstalled program called System Suite. Afterwards printer stopped working: Got the usual *error writing to LPT1* messege. 2. The printer works. I also installed a USB driver and have the machine connected with both cables, USB...
  4. Printing Landscape
    I have a print button defined on my ASP Page as follows: <td><INPUT type="button" value="Print Work Order" Onclick="print()";></td> I would like the page to automatically printed out in landscape form. Is this possible? Thanks
  5. Terminal server: Printing to LPT1 as LPT1, not TSXXX
    I have a workstation with a local label printer attached to LPT1. When I log this station into the terminal server (as a remote desktop client), it creates a print session for the client in the form TSXXXX COMPUTER NAME PRNXX -- well and good, that's what it's evidently suppo...

Free Tech Articles

  1. WARNING: 5 Reasons why you should NEVER fix a computer for free.
    It is in our nature to love the puzzle. We are obsessed. The lot of us. We love puzzles. We love the challenge. We thrive on finding the answer. We hate disarray. It bothers us deep in our soul. W...
  2. SCCM OSD Basic troubleshooting
    SCCM 2007 OSD is a fantastic way to deploy operating systems, however, like most things SCCM issues can sometimes be difficult to resolve due to the sheer volume of logs to sift through and the dispe...
  3. Migrate Small Business Server 2003 to Exchange 2010 and Windows 2008 R2
    This guide is intended to provide step by step instructions on how to migrate from Small Business Server 2003 to Windows 2008 R2 with Exchange 2010. For this migration to work you will need the fo...
  4. Create a Win7 Gadget
    This article shows you how to create a simple "Gadget" -- a sort of mini-application supported by Windows 7 and Vista. Gadgets can be dropped anywhere on the desktop to provide instant information, ...
  5. Outlook continually prompting for username and password
    There have been a lot of questions recently regarding Outlook prompting for a username and password whilst using Exchange 2007. There are a few reasons why this would happen and I will try to cover t...
  6. Backup Exchange 2010 Information Store using Windows Backup
    There seems to be quite a lot of confusion around the ability to backup Exchange 2010 using the built in Windows Backup feature. This stems from the omission of this feature prior to Exchange 2007 s...

Cloud Class Webinars

  1. Avoiding Bugs in Microsoft Access
    Alison Balter takes and in-depth look at avoiding bugs in Access. In this webinar you will learn about using the immediate window to debug your applications, invoking the debugger, using breakpoints to troubleshoot, stepping through code, setting the next statement to execute, ...
  2. Top 10 Best New Features in Visio 2010
    Scott Helmers gives live demonstrations of the top 10 new features in Visio 2010. This webinar will teach you how to create compelling diagrams by adding shapes to the page with a single click, linking the shapes in a diagram to data in Excel (or SQL Server, or SharePoint), ...
  3. IT Consultant Business Secrets Revealed
    Michael Munger, Experts Exchange tech pro and IT consultant, pulls back the curtain on his very successful businesses and answers question on every IT consultant and business owner should know about. He shares secrets on what he did to solve the 5 most common problems in IT, ...
  4. Disaster Recovery and Business Continuity
    Quest CTO, Mike Billon, gives an overview of the steps involved in building a dunamic disaster recovery plan. Through case studies and an examination of software/hardware tooles for monitoring and testing, you'll gain a better understandin of where you are, where you want ...
  5. Organize Your Visio Diagrams with Containers and Lists
    Scott Helmers uses cross functional flowcharts, wireframe diagrams, data graphic legends and seating charts to teach you: how to ustilize all three new structured diagram components in Visio 2010, the best practices for organizeing shapes in previous version of Visio, how to organize ...
  6. How to Us Objects, Properties, Events and Methods in Microsoft Access
    Alison Dalter gives an in-depbth look at objects, properties, events and methods in Microsoft Access. In this webinar you will learn about using the object browser, referring to objects, working with properties and methods, working with object variables, understanding the ...

Join the Community

Give a Little. Get a Lot.

Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.

Join the Community

Answers

 

by: BMKESHAVPosted on 2009-07-01 at 23:22:57ID: 24760827

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

 

by: dragon-itPosted on 2009-07-02 at 00:03:31ID: 24760972

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

 

by: dragon-itPosted on 2009-07-02 at 00:04:36ID: 24760978

What I am getting at is the printer driver may be wrapping the text at the end of it's A4 lines...

 

by: dragon-itPosted on 2009-07-02 at 00:10:35ID: 24761004

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

 

by: PhreakwentlyPosted on 2009-07-02 at 15:45:38ID: 24768517

@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

 

by: BMKESHAVPosted on 2009-07-02 at 20:47:59ID: 24769656

@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

 

by: PhreakwentlyPosted on 2009-07-02 at 20:57:24ID: 24769678

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?

 

by: BMKESHAVPosted on 2009-07-02 at 21:14:12ID: 24769743

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



 

by: PhreakwentlyPosted on 2009-07-02 at 21:57:12ID: 24769957

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

 

by: dragon-itPosted on 2009-07-02 at 23:00:00ID: 24770226

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

 

by: PhreakwentlyPosted on 2009-07-02 at 23:14:14ID: 24770291

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?

 

by: dragon-itPosted on 2009-07-03 at 00:51:12ID: 24770668

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...

 

by: dragon-itPosted on 2009-07-06 at 02:19:38ID: 24783587

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?

 

by: PhreakwentlyPosted on 2009-07-06 at 03:47:17ID: 24783916

Yeah i'll definately give that a try at work tomorrow - will let you know

 

by: PhreakwentlyPosted on 2009-07-07 at 16:13:28ID: 31600884

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

20120131-EE-VQP-002

3 Ways to Join

30-Day Free Trial

The Experts

98% positive feedback on 31,087 answers since March 2000. angeliii is a Microsoft Most Valuable Professional for his work with MS SQL Server & Develoment.

He has also proven his knowledge of Visual Basic Programming, PHP Scripting and Oracle Databases.

The Experts

97% positive feedback on 10,752 answers since July 2000. lrmoore has more than 18 years experience in the networking industry.

The six-time Mircosoft MVPs specialties include firewalls, virtual private networking, and network management.

Testimonials

"...and excellent source for support... Kind of like having your very own IT dept." Electriciansnet

Testimonials

"I was apprehensive at signing up at first. However... it has already made my life as an IT administrator much easier." JaCrews

Testimonials

"WOW! You guys have great, active, and knowledgeable people on here." moore50

Business Clients

Business Clients

In the Press

"If you’ve got a question... Experts Exchange can supply an answer.”

In the Press

"...an invaluable aid for both IT professionals and those who require tech support."

In the Press

"where IT professionals provide quick answers on just about any topic"

Business Account Plans

Loading Advertisement...