0

I am generating PDF document using iTextSharp (winforms), now i need to print this generated PDF document using a Label Printer.

I have multiple Printers installed on my machine, so with VB.net I need to Select a certain Thermal printer.

Once the Printer is Selected I need to Specify Shipping Label Size (width & height).

So Once Label Printer is selected and I specified custom Label dimensions, I would like the label to be printed without any user action (Like skip the Confitm box to print).

I dont need the full code, I just need someone to put me into right direction.

Thanks

highwingers
  • 1,649
  • 4
  • 21
  • 39

1 Answers1

1

You can use the PrintDocument object. Use the Print method, and do the actual printing in the PrintPage handler. To do this, you can output to the graphics object of the parameter PrintPageEventArgs in your PrintPage handler.

xpda
  • 15,585
  • 8
  • 51
  • 82
  • Here's one: http://msdn.microsoft.com/en-us/library/system.drawing.printing.printdocument.printpage.aspx?cs-save-lang=1&cs-lang=vb#code-snippet-2 – xpda Jan 02 '13 at 20:42
  • unfortunately I cant find any sample where it shows how to print a PDF file using PdfDocument Object. it shows how to print a string. my Labels are designed in PDF, I cant print strings. – highwingers Jan 02 '13 at 21:18
  • Sorry, I assumed iTextSharp would have something like graphics.draw... using a graphics object in the PrintPage handler. Here's a similar question that might have an answer for you: http://stackoverflow.com/questions/6097747/itextsharp-pdf-printing – xpda Jan 02 '13 at 21:32