473,856 Members | 1,666 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 1904
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**********@s hotmail.com> wrote in message
news:opslbrhaiy xhg4go@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**********@s hotmail.com> wrote in message
news:opslbrhaiy xhg4go@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**********@s hotmail.com> wrote in message
news:opslbu46mv xhg4go@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**********@s hotmail.com> wrote in message
news:opslbrhaiy xhg4go@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.printp age (...) 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**********@s hotmail.com> wrote in message
news:opslbu46mv xhg4go@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**********@s hotmail.com> wrote in message
> news:opslbrhaiy xhg4go@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
2333
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 relevant. The code I use is Private Sub Cmdstart_Click() On Error GoTo Err_Handler Dim strPath As String If IsNull(DocURLtxt.Value) Then strmsg = "You must enter the Document URL to use this function
5
3359
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 = "P:\2004worksheets\IIS_WS.doc" Set oWord = New Word.Application oWord.Documents.Add (strObjectPath) oWord.PrintOut
2
1703
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 button, a print preview window , or adobe, whatever.. will open up and allow the user to see what the document looks like, then have the open to close it or print it... is that possible?? -- AdamPC@hotmail.com
1
2685
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 pages of the document giving them a chance to cancel the printing operation if they want to. How can it be done? I've tryed searching in PrintDialog,
3
3771
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 print the current contents of the browser without bringing up the print dialog. At first I thought it was a simple matter to have the button's "onclick" attribute set to "window.print();". However, that always brings up the print dialog box. ...
6
4096
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 the user wants all pages will produce 3 pages. I want to offer the user the ability to select via the print dialog that only pages 1 and 2 of it are printed or possibly pages 1 and 3 but not 2. At the moment I can produce all three pages...
8
2415
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 "InvalidPrinterException was unhandled" error. The error happens in the third line below. The details of the error are below my signature. Help? PrintDialog1.PrinterSettings.PrinterName = sLabelPrinterDeviceName PrintDialog1.Document = PrintDocument1
8
5920
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 clients (Internet Explorer). My flash content was originally brought in via the “flash satay” method, but I have since used some server-side magic do deliver one <objecttag
7
2574
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 using C# This is a simple web page on our intranet (written as a test) and all I am trying to do is print a document to a named printer. If I use a StreamReader then I get an output to the printer. This
0
9920
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, well explore What is ONU, What Is Router, ONU & Routers main usage, and What is the difference between ONU and Router. Lets take a closer look ! Part I. Meaning of...
0
9764
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
1
10790
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10390
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9535
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development projectplanning, coding, testing, and deploymentwithout human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7932
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new presenter, Adolph Dupr who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
7098
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5762
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
4580
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

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.