473,320 Members | 1,746 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

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 1879
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

9
by: Tony Williams | last post by:
I have an Access database that we use as a document index system. The documents can be Word, Excel, pdf's etc I have a command button on a form that opens the document in whatever program is...
5
by: Stefania Scott | last post by:
I am trying to print a word document from Access. The code I've written works well in my computer but does not in the one were it is needed. Here the piece of code: 'doc path strObjectPath =...
2
by: ACaunter | last post by:
Hi all, i was wondering if there was a way to directly print a document to the user's printer, without having to download it first... I needed something like a button, and when the user clicks the...
1
by: Pedro | last post by:
Hi all; I have one small app. written in vb.net and somewhere i create one document which can be printed using one printdialog. Before printing it, i want to advise user's from the number of...
3
by: John Peterson | last post by:
Hello all! I'm at my wits end trying to search for what I assumed to be a relatively straightforward task. I have a Web application written in C#, and I have a button on the form that I want to...
6
by: Siv | last post by:
Hi, I am getting into printing with VB.NET 2005 and want to implement the usual capability that a user can select a selection of pages. I have a report that is generated by my application that if...
8
by: Rick Lederman | last post by:
I am using a PrintDocument and PrintDialog to print. The first time that I print it works, but when I try to print a second time without exiting the entire program I get an...
8
by: Neo Geshel | last post by:
Greetings. BACKGROUND: My sites are pure XHTML 1.1 with CSS 2.1 for markup. My pages are delivered as application/xhtml+xml for all non-MS web clients, and as text/xml for all MS web...
7
by: Iain Wilson | last post by:
I am pulling my hair out trying to print various objects from a .net web page My apologies for cross posting but I need an answer and my previous post has attracted no interest. ASP.Net 2.0...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.