I want to develop an application in Java which takes data (ex.name of person, Amount) from excel-sheet and print it on cheque. I can able to access data from excel-sheet but don't know how to print that data on cheque. Data must get print on appropriate location on cheque (ex. name should get print where blank space is given for name). please give me a guideline for this. Thank you in advance. I am not native English speaker so kindly ignore my mistakes.
You can use a reporting tool. You can see examples here: http://www.dynamicreports.org/
I would create a PNG image for each record, with a transparent background and data at the right place. Then I would launch the printing of these images .
That sounds hacky and someone might have a better idea.
Related
I have been working on a java console application and I've got a lot of data to print in a tabular way,
and I am wondering if there is any good way to do it instead of hard coding it which sometimes doesn't work for some data according to the data size.
Need to print a table like this one
enter image description here
I have read some articles regarding how we can implement BDD with cuuumber but i am not able to understand fully.
Lets say i have a service
/v1/picture?viewer=1&viewed=2&flag=1
For these 3 input i am looking for output as "1.jpg"
I am looking for
How can we implement above ? -- i.e output based on input
How can we build data ? -- mysql data basically stubs
Please help with examples and good links.
Thanks
It's hard to answer your question as there's not a lot of detail about what you're trying to achieve, but I'll give it a go.
You've got 3 different inputs there:
- The viewer
- Whether it's been viewed or not
- A flag.
So those inputs provide different contexts (Givens) for the scenarios.
Given a .jpg viewer
Given I have already viewed the image twice
Given the image has been flagged
How you set up the data for these givens is entirely up to you. You can hard-code it, use mysql data or input real data using an admin console, etc.. It shouldn't matter. The behaviour you're interested in is what happens when you apply the event (When):
When I retrieve the v1 picture
Presumably, the input provided in your contexts is relevant, and will provide different outcomes (Thens) depending on that input.
Then I should see a .jpg file
Then I should see the "Image flagged" banner
Then I should see the message "Viewed 2 times"
So I might have scenarios like:
Given a .jpg viewer
And an image that's been viewed 3 times
When I retrieve the v1 picture
Then the service should give me 1.jpg
And I should see the message "Viewed 3 times"
Given a .png viewer
When I retrieve the v1 picture
Then the service should give me 1.png
etc.
I don't know what your real service is doing, but hopefully this helps you see the pattern. Try to keep different aspects of the behaviour separated in the scenarios (more like the 2nd than the 1st) unless there are combinations you need to exemplify.
I already have a ui that collects all the information I need to print over a Pre-printed paper (invoices). And I need to print collected informacion in specific places of the paper. So far I've been generating from the program, an excel file that is used for this purpose. I would like to know if there is a way to avoid the excel file, and print directly from the ui.
Thanks in advance.
When I google "how to make a dictionary", it gives me a great measure of the explanation of "make", which is very helpful. But I need something else, so I put this question here.
I want to make a small project. I want to make a dictionary with java or android. But I don't know how should I organize the words. I have considered a JSON file, a XML file or I can also simply output all the words as ojbects into a file. Could anyone please give me some adivce?
Assuming that you want to be able to read (quickly) values from your dictionary, and maybe update values or create new values then I suggest that you store your dictionary in a Database. For a simple Java database I suggest that you use an embedded Derby Database.
see http://db.apache.org/derby/
I m working on a application which has a form with a space for photo. I want to fill this blank space with photo which is stored in the database (MS Access) but the problems are-
1) I dont know how to store photo in MS Access
2) I dont know which method uses to retrieve the photo from database.
I m using Netbeans IDE and Java for gui making.
Please help me to do this job
Thanks in advance
I think it depends on what you're going to use. We can use 2 approaches such as saving path address or save the image onto the Binary Data but based on my opinion I would like to save the data using path address so it can optimize performance.
Hope it helps you.
http://www.daniweb.com/software-development/java/threads/250763/image-to-ms-access
or
How to get image absolute path?