Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Billing/Invoiceing Program

Status
Not open for further replies.

carlg

Programmer
Jun 23, 2004
88
US
I am writing a billing/invoicing program using C on a Fedora Linux system.

Everything is going well and just about finished (calculations, updating database, etc.)

I am now to the part where I need to generate the images of the invoices.

This seems like it may be a little tricky. Did anyone ever do this before?

My initial thoughts were to have my C program write the image out as a text file and then I could convert it outside of the C program to other formats such as .doc, .html, .pdf.

If I do this how can I draw a vertical line to the text file using C programming? Pipe (|) seems to be the only way I can think of but it seems really sloppy.

I way need to be able to draw boxes around certain pieces of text (like a bill image).

My other idea is to have the C program output the image in HTML format and then maybe I can convert that to other formats.

My goal is to have the images of the invoices in all of the formats that I mentioned above.

Any advice or help is appreciated.

Thanks!!

 
Simple text is going to be a very poor starting point for conversions to other formats.

I think HTML would be one way to go. For starters, it knows what tables are to being with so you get a nicer presentation without you having to worry about the detail of formatting longer lines within a table cell.

Its also pretty easy to produce - table rows and table cells flow naturally from the loops you would use to just print the data to the terminal screen.

HTML also allows you to store comments, which you could use to store additional information for other conversions later on, if that's what you wanted to do.

OpenOffice (for example) will read HTML, and from there you can export .PDF and .DOC format files if you want.

--
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top