0

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

2
  • What have you tried? I describe a way to accomplish this at stackoverflow.com/a/18218654/425871 You would have to play around with the control positioning to get it to print how you like. You'll have to know at least something about WPF, though. Your question is a pretty big one that isn't really right for stackoverflow.com. Commented Nov 22, 2013 at 13:16
  • I am able to send data to printer(Printing the simple text) But not able how to position elements and apply styles like bold,italic n so on Commented Nov 22, 2013 at 13:45

1 Answer 1

1

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

Sign up to request clarification or add additional context in comments.

2 Comments

I cant use third party application.
ok, you should add that into the question as it really does affect any suggestions ;) good luck with the quest

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.