473,372 Members | 830 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,372 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 1880
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: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
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...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

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.