Another printing problem 
Author Message
 Another printing problem

I am using Visual Basic for DOS and have an application that uses the
Print Dialog. My problem is that when I print, the text goes over the
bottom of the page without a page break. I am ussing a Dot Matrix printer
but this program needs to be able to print properly using most other
printers. Is there a counter I can create that counts the number of lines
and sends a NEWPAGE? I am trying to print from a textbox that has
wordwrap capability.

--
Mike Ballard
Santa Clarita, California, United States of America

Web Page address - http://www.*-*-*.com/ ~mapmaker

Way to go MTA! Dig that subway all the way to North Hollywood.



Sun, 19 Jul 1998 03:00:00 GMT  
 Another printing problem
Help!  I am trying to figure out how to print graphics files (WMF) in
Visual Basic to the printer.  So far, I have had no luck.  I have tried
using Window's APIs with both the printer object's hdc and with an hdc
created with CreateDC.  Neither worked.  In fact, I couldn't properly
"close" the hdc created by CreateDC.  I can get some graphics output,
but it is all out of proportion, and requires that I send something to
the printer through the printer object's methods.  The things sent
through this way come out on a different page.  The problem isn't in
the WMF either.  I can display that to a window using mostly the same
APIs and have it come out perfectly.  I can also view the WMF in a
graphics viewing program.  I just can't send it to the printer through
the printer object, and I can't seem to go around the printer object
with APIs.

My ultimate goal is to print a graph with additional text information
to the printer.  Telling the graph to print to the printer won't work
either.  The graph always ejects the page printed on when it is done.

What can I do?
I just can't beleive that Microsoft would leave out some way of sending
graphics files to the printer!



Sun, 19 Jul 1998 03:00:00 GMT  
 Another printing problem

Quote:
>I am using Visual Basic for DOS and have an application that uses the
>Print Dialog. My problem is that when I print, the text goes over the
>bottom of the page without a page break. I am ussing a Dot Matrix printer
>but this program needs to be able to print properly using most other
>printers. Is there a counter I can create that counts the number of lines
>and sends a NEWPAGE? I am trying to print from a textbox that has
>wordwrap capability.

Thats the way I have always handled it using PDS.  Problem is you need to know
the number of lines of the printer you are using.  Generally 66 or 70 (tractor
or A4).  Best way is to write a test routine that the user can run and then
configure the number of lines re an initiallization file. You will need to
wite the lines you want to print to an array and then code like:
     COMMON SHARED  lineCount%   (in the declarations)
          for x% = 1 to ubound(array)
             If x% =< lineCount then
               PRINT  array(x%)
             else
               NewPage
             end if
          next x
Well, that is the pseudo code for it, anyway.  I am not familiar with VB DOS
so hope I have not confused you.    Cheers         Harry   :-{>


Mon, 20 Jul 1998 03:00:00 GMT  
 Another printing problem

Quote:

>Help!  I am trying to figure out how to print graphics files (WMF) in
>Visual Basic to the printer.  So far, I have had no luck.  I have tried

>What can I do?
>I just can't beleive that Microsoft would leave out some way of sending
>graphics files to the printer!

I'm sure there is some way that they "intended" for printing.
However, I don't know of it.  I use PaintPicture and send that to the
printer.  It allows almost full control of the WMF.  Since you have to
send the EndDoc separately, you add on whatever you want.

JC



Mon, 20 Jul 1998 03:00:00 GMT  
 Another printing problem

Quote:


>Subject: Re: GRAPHICS PRINTING PROBLEMS.
>Date: Thu, 01 Feb 1996 19:24:50 GMT

>>Help!  I am trying to figure out how to print graphics files (WMF) in
>>Visual Basic to the printer.  So far, I have had no luck.  I have tried

>>What can I do?
>>I just can't beleive that Microsoft would leave out some way of sending
>>graphics files to the printer!
>I'm sure there is some way that they "intended" for printing.
>However, I don't know of it.  I use PaintPicture and send that to the
>printer.  It allows almost full control of the WMF.  Since you have to
>send the EndDoc separately, you add on whatever you want.
>JC


There is an excellent atricle on printing Metafiles in the knowledge base,
look at article number Q113682.

Word of Warning: Don't fall in to the trap of positioning graphics on the
page using 'pixels' with the above function.  This ties your app to work with
only one printer resolutions (eg 300 DPI), on a different DPI printer all hell
breaks loose.

You need to work out the number of pixels per mm for your particular printer
at run-time... sorry I dont have the API details with me for doing that.

Cheers

RiCH



Sat, 01 Aug 1998 03:00:00 GMT  
 
 [ 8 post ] 

 Relevant Pages 

1. Printing problem : several prints at same time

2. Printing problem : several prints at same time

3. Urgent printing problem to generic print driver

4. Printing problem several prints at same time

5. Printing problems when repeating to print the same report from VB6.0

6. Print preview OKAY, printing PROBLEM, Help !

7. DoCmd. printing problem

8. Print problem

9. Print Problem

10. printing problem

11. Printing problems (revisited)

12. A record printing problem after conversion from Access95 to Access97

 

 
Powered by phpBB® Forum Software