469,589 Members | 2,167 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,589 developers. It's quick & easy.

Printing without a document

Well, hopefully that title get someones attention.

In this old gwbasic program I've converted I *have* sucessuflly converted
it to print to a file and the output is acceptable. From there I have
printPreview and (what is it) PrinDocument working.

All of the references I've found (to include several books) show that
method of printing ... my question - is it not possible to print the
document 'on the fly' to allow proper paging, page numbers, etc. What
I've seen just flows the document to the printer and divil take the
hindmost as far as widows / orphans are concerned and page numbers - hah!
Again I'm obviously missing something here.

Point me toward something if you would please. thanks //al

--
Using Opera's revolutionary e-mail client: http://www.opera.com/mail/
Nov 21 '05 #1
4 1746
Check out this page http://www.startvbdotnet.com/controls/printdialog.aspx.
There's a pretty good article in this PDF document, with sample code, for
handling the "PrintPage" event of the PrintDocument, at
http://www.itcourseware.com/Webpdfs/webap-advvbnet.pdf. It also has sample
code and explanations for adding headers and footers, page numbers, etc.

Thanks,
Michael C#
"Al Jones" <al**********@shotmail.com> wrote in message
news:opslbrhaiyxhg4go@aljones...
Well, hopefully that title get someones attention.

In this old gwbasic program I've converted I *have* sucessuflly converted
it to print to a file and the output is acceptable. From there I have
printPreview and (what is it) PrinDocument working.

All of the references I've found (to include several books) show that
method of printing ... my question - is it not possible to print the
document 'on the fly' to allow proper paging, page numbers, etc. What
I've seen just flows the document to the printer and divil take the
hindmost as far as widows / orphans are concerned and page numbers - hah!
Again I'm obviously missing something here.

Point me toward something if you would please. thanks //al

--
Using Opera's revolutionary e-mail client: http://www.opera.com/mail/

Nov 21 '05 #2
And you're an apprecciated fount of knowledge. The second looks (at quick
glance) exactly like what I'm looking for .... thank you sir //al

On Fri, 28 Jan 2005 14:20:42 -0500, Michael C <me@mine.com> wrote:
Check out this page
http://www.startvbdotnet.com/controls/printdialog.aspx.
There's a pretty good article in this PDF document, with sample code, for
handling the "PrintPage" event of the PrintDocument, at
http://www.itcourseware.com/Webpdfs/webap-advvbnet.pdf. It also has
sample
code and explanations for adding headers and footers, page numbers, etc.

Thanks,
Michael C#
"Al Jones" <al**********@shotmail.com> wrote in message
news:opslbrhaiyxhg4go@aljones...
Well, hopefully that title get someones attention.

In this old gwbasic program I've converted I *have* sucessuflly
converted
it to print to a file and the output is acceptable. From there I have
printPreview and (what is it) PrinDocument working.

All of the references I've found (to include several books) show that
method of printing ... my question - is it not possible to print the
document 'on the fly' to allow proper paging, page numbers, etc. What
I've seen just flows the document to the printer and divil take the
hindmost as far as widows / orphans are concerned and page numbers -
hah!
Again I'm obviously missing something here.

Point me toward something if you would please. thanks //al

--
Using Opera's revolutionary e-mail client: http://www.opera.com/mail/



--
Using Opera's revolutionary e-mail client: http://www.opera.com/mail/
Nov 21 '05 #3
No problem. I remember the old GW-BASIC days myself :) Let me know if I
can help out with anything else, or if you run into any more problems with
printing your document.

Thanks,
Michael C#, MCDBA

"Al Jones" <al**********@shotmail.com> wrote in message
news:opslbu46mvxhg4go@aljones...
And you're an apprecciated fount of knowledge. The second looks (at quick
glance) exactly like what I'm looking for .... thank you sir //al

On Fri, 28 Jan 2005 14:20:42 -0500, Michael C <me@mine.com> wrote:
Check out this page
http://www.startvbdotnet.com/controls/printdialog.aspx.
There's a pretty good article in this PDF document, with sample code, for handling the "PrintPage" event of the PrintDocument, at
http://www.itcourseware.com/Webpdfs/webap-advvbnet.pdf. It also has
sample
code and explanations for adding headers and footers, page numbers, etc.

Thanks,
Michael C#
"Al Jones" <al**********@shotmail.com> wrote in message
news:opslbrhaiyxhg4go@aljones...
Well, hopefully that title get someones attention.

In this old gwbasic program I've converted I *have* sucessuflly
converted
it to print to a file and the output is acceptable. From there I have
printPreview and (what is it) PrinDocument working.

All of the references I've found (to include several books) show that
method of printing ... my question - is it not possible to print the
document 'on the fly' to allow proper paging, page numbers, etc. What
I've seen just flows the document to the printer and divil take the
hindmost as far as widows / orphans are concerned and page numbers -
hah!
Again I'm obviously missing something here.

Point me toward something if you would please. thanks //al

--
Using Opera's revolutionary e-mail client: http://www.opera.com/mail/



--
Using Opera's revolutionary e-mail client: http://www.opera.com/mail/

Nov 21 '05 #4
I'm stuck in the same old rut and can't see out of it. If I create a
variable strToPrint, how do I pass that to anything to get it to print. I
see where the lines of text are being read from files and printed, but
can't (and I'm glad my life isn't hanging on this) see how to pass my
strToPrint into it ....

This whole logic escapes me .... I'd like to be able to give him the
option of selecting a printer to print to - probably off the file menu
(logically). I think I see how to do that, but inside the program loop
I've got set up now, I'm not sure [I know, it's off the menu and outside
my loop].

obviously I (taking this from the advvbnet.pdf you reference):
pdReport = New PrintDocument to set up the document that I'm going to be
printing into.
prReport.printpage (...) to print the text ...

again obviously I have to 'print' the document before giving him the
option to print preview it. (Is print preview *really* reading the spooler
to display it's preview?) But if he decides that he doesn't like it and I
need to 'reprint it' (let's say he wants to adjust printer margins) I have
to call my calc and print routine again?? I can see him printing it,
previewing it, changing the printer settings and then grousing that it
didn't affect anything because it didn't get reprinted after his changes
.... ???

I can see myself going around in some sorry circles here if I'm not real
careful.

Sorry if I'm really dense, OM but I'm just not seeing the 'forest for the
trees I'm in the mUddle of!

thanks //al

On Fri, 28 Jan 2005 14:38:28 -0500, Michael C <me@mine.com> wrote:
No problem. I remember the old GW-BASIC days myself :) Let me know if I
can help out with anything else, or if you run into any more problems
with
printing your document.

Thanks,
Michael C#, MCDBA

"Al Jones" <al**********@shotmail.com> wrote in message
news:opslbu46mvxhg4go@aljones...
And you're an apprecciated fount of knowledge. The second looks (at
quick
glance) exactly like what I'm looking for .... thank you sir //al

On Fri, 28 Jan 2005 14:20:42 -0500, Michael C <me@mine.com> wrote:
> Check out this page
> http://www.startvbdotnet.com/controls/printdialog.aspx.
> There's a pretty good article in this PDF document, with sample code, for > handling the "PrintPage" event of the PrintDocument, at
> http://www.itcourseware.com/Webpdfs/webap-advvbnet.pdf. It also has
> sample
> code and explanations for adding headers and footers, page numbers,

etc.
>
> Thanks,
> Michael C#
>
>
> "Al Jones" <al**********@shotmail.com> wrote in message
> news:opslbrhaiyxhg4go@aljones...
>> Well, hopefully that title get someones attention.
>>
>> In this old gwbasic program I've converted I *have* sucessuflly
>> converted
>> it to print to a file and the output is acceptable. From there I

have
>> printPreview and (what is it) PrinDocument working.
>>
>> All of the references I've found (to include several books) show that
>> method of printing ... my question - is it not possible to print the
>> document 'on the fly' to allow proper paging, page numbers, etc.

What
>> I've seen just flows the document to the printer and divil take the
>> hindmost as far as widows / orphans are concerned and page numbers -
>> hah!
>> Again I'm obviously missing something here.
>>
>> Point me toward something if you would please. thanks //al
>>
>> --
>> Using Opera's revolutionary e-mail client: http://www.opera.com/mail/
>
>


--
Using Opera's revolutionary e-mail client: http://www.opera.com/mail/



--
Using Opera's revolutionary e-mail client: http://www.opera.com/mail/
Nov 21 '05 #5

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

9 posts views Thread by Tony Williams | last post: by
5 posts views Thread by Stefania Scott | last post: by
2 posts views Thread by ACaunter | last post: by
3 posts views Thread by John Peterson | last post: by
8 posts views Thread by Rick Lederman | last post: by
7 posts views Thread by Iain Wilson | last post: by
reply views Thread by suresh191 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.