| re: PaperSource setting in VB.NET Print Application
I tested mine on a 5 feeder tray printer and set my paper source to
automatic feeder, and then my paper SIZE to the envelope. Honestly, who has
an envelope feeder anymore?
Thats right... no one...
[expect many replies of 'we use one']
So, set your paper size, your feeder (esepically if its pro/copier/printer
super machine like it sounds like with 3 trays) will take care of the rest.
Thats what I did at least. =)
-CJ
"Fred Nelson" <fred@smartybird.com> wrote in message
news:%23GZYcOu2DHA.3468@TK2MSFTNGP11.phx.gbl...[color=blue]
> CJ:
>
> Thanks again for your help. If you have a second could you check to see[/color]
if[color=blue]
> I have this set up correctly (I'm not in the office with the 3 tray[/color]
printer[color=blue]
> or I'd test it.)
>
> If I needed to print a document to an envelope then I would perform the
> following AFTER selecting the printer:
>
> --------------
> Dim papSource As System.Drawing.Printing.PaperSource
>
> For Each papSource In PrintDocument1.PrinterSettings.PaperSources
>
> If papSource.Kind = PaperSourceKind.Envelope Then
> PrintDocument1.DefaultPageSettings.PaperSource = papSource
> Exit For
> End If
>
> Next
> ------------
>
> If the user had selected a printer without an envelope feeder then it[/color]
would[color=blue]
> just default to the main tray - that is what I want it to do.
>
> Am I correct or still missing something!
>
> Thanks,
>
> Fred
>
>
> "CJ Taylor" <nospam@blowgoats.com> wrote in message
> news:100b90c5pp08eac@corp.supernews.com...[color=green]
> > It's really really confusing... here are some samples... ignroe the
> > iPrinterType (this is something that I use specifically in the program.[/color]
> but[color=green]
> > you actually have to check for the enumeration type and set it to that[/color]
> based[color=green]
> > on the printers availiblity.
> >
> > for Each papSource In _printDoc.PrinterSettings.PaperSources
> >
> > If papSource.Kind = Printing.PaperSourceKind.AutomaticFeed Then
> >
> > _printDoc.DefaultPageSettings.PaperSource = papSource
> >
> > Exit For
> >
> > End If
> >
> > Next
> >
> > If (iPrintertype = 0) Then
> >
> > For Each papSize In _printDoc.PrinterSettings.PaperSizes
> >
> > If papSize.Kind = Printing.PaperKind.Letter Then
> >
> > _printDoc.DefaultPageSettings.PaperSize = papSize
> >
> > Exit For
> >
> > End If
> >
> > Next
> >
> > ElseIf (iPrintertype = 1) Then
> >
> > For Each papSize In _printDoc.PrinterSettings.PaperSizes
> >
> > If papSize.Kind = Printing.PaperKind.Ledger Or papSize.Kind =
> > Printing.PaperKind.Standard11x17 Then
> >
> > _printDoc.DefaultPageSettings.PaperSize = papSize
> >
> > Exit For
> >
> > End If
> >
> > Next
> >
> > End If
> >
> > "Fred Nelson" <fred@smartybird.com> wrote in message
> > news:OY2KFgt2DHA.2032@TK2MSFTNGP09.phx.gbl...[color=darkred]
> > > Hi:
> > >
> > > I'm trying to write a program that will print envelopes using a HP[/color]
> > Laserjet[color=darkred]
> > > 4 that has three trays. In the future this program will work with[/color][/color][/color]
other[color=blue][color=green][color=darkred]
> > > printers so I don't want to "hard code" (or send raw output) to[/color][/color]
> accomplish[color=green][color=darkred]
> > > this.
> > >
> > > I'm trying to figure out how to set the PaperSource property and[/color][/color][/color]
haven't[color=blue][color=green]
> > had[color=darkred]
> > > any luck! I've searched MSDN and Google and can't find a single[/color][/color]
> example.[color=green][color=darkred]
> > >
> > > If anyone knows how to do this I would GREATLY appreciate it - I've[/color][/color]
> tried[color=green][color=darkred]
> > > everything!
> > >
> > > Thanks,
> > >
> > > Fred
> > >
> > >[/color]
> >
> >[/color]
>
>[/color] |