Let me start off with this disclaimer: This scenario is completely contrived. The scenario proposed is analogous to an actual problem that I am trying to solve.
Problem: I'm going to cheat on a test that uses Scan-tron style cards. I've stolen the test before it was handed out and written a program that solves every question. After writing 100 KLOC, my hands are too tired to fill out the 500 bubbles on the Scan-tron card before I need to sneak back into the class to hand in the Scan-tron card.
Solution: Add a print function to the program that will print to a Scan-tron style sheet and fill in only the bubbles that correspond to the correct answer.
So hopefully it's blatantly obvious that this is not realistic. The more realistic part of this problem is that, although I'm very comfortable writing code and designing programs, I've reached one of those dark corners that every coder fears - I have a problem and absolutely no idea where to start. The gist of the problem is that I have a fixed, non-standard form that needs to be filled out by my program. I know in advance (or can get in advance) all of the paper sizes and locations on the page that need to be printed. The core problem is that I have no idea where to start. This is where I would really appreciate anyone's help with this problem.
Basically, what I'm looking for is a starting point. The background for the real application is that it is a Linux based, terminal application that must print to Scan-tron style cards (I'll be happy to elaborate on "Scan-tron" for those unfamiliar with the term, just tell me). The target language is C because the algorithms and overall design fit a procedural model perfectly.
If anybody has written/designed a custom printing routine for a Linux application, I would really love to hear where you started and how you broke the problem down. I'm still consulting Dr. Google, but so far all of my research has turned up empty hits about how to configure print servers on Linux - nothing yet on how to invoke the printer in a program. Thanks for any input!
Target OS: Ubuntu Linux Kernel- 2.6.32-22
Target Printer: HP Officejet 6500A Plus
Target Language: C
Target Page Layout: Scan-tron format (n rows by 5 columns of selections)
*If there is a better forum for this question on DaniWeb, let me know. I guessed CS would be the most involved with software design.