Ankith
Ankith

Reputation: 277

formatting and printing data using C# (NO DATABASE)

I have following data in variables 1) Patient Name,Age,Sex,Referred by Doctor. 2) TestName,Parameters(As an array) and its results There are some variables which will be computed using formulas.

I need to send data to printer in the following format http://www.orthoclinical.com/en-us/Documents/Sample%20lab%20report.pdf

Please point me how to implement the same.

PS: 1) I cant display data directly from Database. There are many derived parameters which will be calculated using formulas. 2)I'm newbie to C# and printing application. Please help me with pseudocode/code

Upvotes: 0

Views: 330

Answers (1)

jim tollan
jim tollan

Reputation: 22483

have a look at itextsharp. This is a server side pdf library that uses a document object model to allow you to add your text and styling in a pretty easy manner.

main features:

  • itext is an open source library that allows you to create and manipulate PDF documents.
  • It enables developers looking to enhance web- and other applications with dynamic PDF document generation and/or manipulation.

iText is available in Java as well as in .Net and Android.

usages:

  • Serve PDF to a browser
  • Generate dynamic documents from XML files or databases
  • Use PDF's many interactive features
  • Add bookmarks, page numbers, watermarks, etc.
  • Split, concatenate, and manipulate PDF pages
  • Automate filling out of PDF forms
  • Add digital signatures to a PDF file

available via nuget: Install-Package iTextSharp

Upvotes: 1

Related Questions