[Last Call] Learn about multicloud storage options and how to improve your company's cloud strategy. Register Now

x
?
Solved

I need ideas to print to paper in C#

Posted on 2012-03-31
3
Medium Priority
?
338 Views
Last Modified: 2012-03-31
My client would like a function in his program to click a button, have the program ask for the number of labels to print, and then send the command to the printer (or display the windows system print window).

First, I know how to set up buttons and ask the user for variables; that's not the problem. My problem is that I don't know the right questions to even ask Google when it comes to printing to a sheet of paper in c#.

I will try and break down the problem as best I can.

1) How do I format a page(in c#) for multiple columns and multiple rows before I send it to the printer? The paper will be standard 8.5 x 11 in size, and it will be printed from a standard printer. The type of paper is that Avery Label Paper where it has individual labels on each sheet. An example layout would be something like this: Example Label Template
2) How would I be able to use text from textbox's as items to place on the label when printing it?

3) How would I send that to the print window?


Any ideas, advice, and/or tutorials would be greatly appreciated.

Thank you.
0
Comment
Question by:Sirjacksinurbox
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 5

Expert Comment

by:Aruiz04
ID: 37791768
You could benefit from Crystal Reports in Visual Studio, first create a typed dataset and from there design the report based on the fields  that you want from your dataset's table. Once you have that setup, fill the dataset's table with the information you need, call the report and bind it's datasource to the dataset you just filled. I know that there are other ways but to me this is by far the easiest and the one i have used in the past for this purposes.
0
 
LVL 20

Accepted Solution

by:
Daniel Van Der Werken earned 2000 total points
ID: 37791787
I would look into Word automation via the Primary Interop Assemblies. You will be able to access the Print menu this way too. Here is a good starter article:
http://www.c-sharpcorner.com/UploadFile/amrish_deep/WordAutomation05102007223934PM/WordAutomation.aspx

But here is an article on Stack Overflow that may be more useful:
http://stackoverflow.com/questions/5810238/c-sharp-winform-printpreviewdialog-print-preview-to-display-multiple-labels-per
0
 
LVL 2

Author Closing Comment

by:Sirjacksinurbox
ID: 37792445
That information was right on the money.

Within a couple of hours. I had everything exactly how I want it.

Thank you very much.

If you ever come across another user needing help with this, I found an excellent article that walked me right through an example of how to do this.

Pass it along if you want: Word File

Thanks again.
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Calculating holidays and working days is a function that is often needed yet it is not one found within the Framework. This article presents one approach to building a working-day calculator for use in .NET.
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
Please read the paragraph below before following the instructions in the video — there are important caveats in the paragraph that I did not mention in the video. If your PaperPort 12 or PaperPort 14 is failing to start, or crashing, or hanging, …
In a question here at Experts Exchange (https://www.experts-exchange.com/questions/29062564/Adobe-acrobat-reader-DC.html), a member asked how to create a signature in Adobe Acrobat Reader DC (the free Reader product, not the paid, full Acrobat produ…

650 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question