I'm trying to print the necessary values in the predefined document for an example, in a Bill name in the left side and date on top right. I already had that documents with empty name and dates . how can i print the name and date to corresponding location in bill from my program. Please suggest.

use a template file with place holders for what you want to replace and load the file into memory and do your replacements or you cound use the velocity framework for Java :)

a template file with place holders for what you want to replace and load the file into memory and do your replacements or you cound use the velocity framework for Java :)

its simply a text document with empty fields.

Mark the field positions in the document with codes, eg $1, $2 etc.
Read the whole file into a StringBuffer (including \n chars).
Replace the $ codes with the appropriate data values

OR

Read the file into an array of Strings, one per line.
Create variables for the row & column numbers for each data field
Overwrite the appropriate colsumns in the appropriate rows (array elements) for each data field.

OR

.. any number of similar kinds of approach

I don't know from where to start. Actual i want to print this type of bill as given below. i need the data to be printed in the correct position as it should be.Please tell give me some examples.
untitled30

i mean to say a paper. sorry for my bad english is it possible to do that. How please suggest

This article has been dead for over six months. Start a new discussion instead.