0

I'm writing a .NET web project that prints W2 forms, but I'm not sure how to accomplish the printing. I'm unsure if I have to first create a PDF or can I use Microsoft Reporting Services to accomplish this (the database is SQL Server). I've went through some examples of Reporting Services, but have yet to see anything like a simple a form like a W2, which only has one row of detail and isn't column based.

I think I've narrowed it down to either using iTextSharp to create a PDF or Reporting Services. I hear Reporting Services can create PDFs as well, but is there some magical technology it uses that allows you to print directly over the web without PDF?

Just looking for a step in the right direction.

I see I can use QuickPDF as well as iTextSharp to create a PDF, but does anyone have any experience with Reporting Services? Eventually I am going to create other reports as well. Is PDF the way to go on the web or is there a better solution?

Jeff Stock
  • 3,796
  • 12
  • 46
  • 61
  • What's a W2 form? Web 2.0 Form? – John Saunders Oct 18 '11 at 16:33
  • W2 is a common tax form in the United States. – Dan Oct 18 '11 at 16:42
  • I see I can use QuickPDF as well as iTextSharp to create a PDF, but does anyone have any experience with Reporting Services? Eventually I am going to create other reports as well. Is PDF the way to go on the web or is there a better solution? – Jeff Stock Oct 18 '11 at 17:25

1 Answers1

2

Here is a Related iTextSharp Question.

Create the blank W2 form first then fill in the blanks. We use QuickPDF for this.

The process with QuickPDF is to load the blank pdf then simply locate each textbox's position, then populate with:

Dim pdf As New QuickPDF.Client
pdf.UnlockKey("yourkeygoeshere")
pdf.LoadFromFile("c:\forms\W2.pdf")

pdf.SetOrigin(1)
pdf.SelectPage(1)
pdf.SetTextAlign(TextAlign.Left)
pdf.SetTextSize(12)
pdf.DrawText(left, top, text)
Community
  • 1
  • 1
Dan
  • 593
  • 8
  • 16
  • QuickPDF looks good. However, I think I'm going to use iTextSharp since it appears to be the more popular choice and is free. – Jeff Stock Oct 21 '11 at 13:45
  • There is a free version of QuickPDF called QuickPDfLite, All of the functions in this post are available in the free version, On the other hand iTextSharp is using the Affero License which is very restrictive, Unless you use version 4.1.6 (available from itextsharp.svn.sourceforge.net) which used the GPL license – yoel halb Aug 02 '12 at 16:11