Printing without a document

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Al Jones

    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/
  • Michael C

    #2
    Re: Printing without a document

    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" <alfredmjones@s hotmail.com> wrote in message
    news:opslbrhaiy xhg4go@aljones. ..[color=blue]
    > 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/[/color]


    Comment

    • Al Jones

      #3
      Re: Printing without a document

      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:
      [color=blue]
      > 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" <alfredmjones@s hotmail.com> wrote in message
      > news:opslbrhaiy xhg4go@aljones. ..[color=green]
      >> 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/[/color]
      >
      >[/color]



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

      Comment

      • Michael C

        #4
        Re: Printing without a document

        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" <alfredmjones@s hotmail.com> wrote in message
        news:opslbu46mv xhg4go@aljones. ..[color=blue]
        > 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:
        >[color=green]
        > > Check out this page
        > > http://www.startvbdotnet.com/controls/printdialog.aspx.
        > > There's a pretty good article in this PDF document, with sample code,[/color][/color]
        for[color=blue][color=green]
        > > 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" <alfredmjones@s hotmail.com> wrote in message
        > > news:opslbrhaiy xhg4go@aljones. ..[color=darkred]
        > >> 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/[/color]
        > >
        > >[/color]
        >
        >
        >
        > --
        > Using Opera's revolutionary e-mail client: http://www.opera.com/mail/[/color]


        Comment

        • Al Jones

          #5
          Re: Printing without a document

          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:
          [color=blue]
          > 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" <alfredmjones@s hotmail.com> wrote in message
          > news:opslbu46mv xhg4go@aljones. ..[color=green]
          >> 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:
          >>[color=darkred]
          >> > Check out this page
          >> > http://www.startvbdotnet.com/controls/printdialog.aspx.
          >> > There's a pretty good article in this PDF document, with sample code,[/color][/color]
          > for[color=green][color=darkred]
          >> > 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,[/color]
          >> etc.[color=darkred]
          >> >
          >> > Thanks,
          >> > Michael C#
          >> >
          >> >
          >> > "Al Jones" <alfredmjones@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[/color]
          >> have[color=darkred]
          >> >> 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.[/color]
          >> What[color=darkred]
          >> >> 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/
          >> >
          >> >[/color]
          >>
          >>
          >>
          >> --
          >> Using Opera's revolutionary e-mail client: http://www.opera.com/mail/[/color]
          >
          >[/color]



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

          Comment

          Working...