Results 1 to 7 of 7
- 09-20-2011, 12:06 PM #1
Member
- Join Date
- Sep 2011
- Posts
- 14
- Rep Power
- 0
how to save a pdf file as named in a Jtextbox.
I am writing a small standalone applicationwhere I need to save the report generated in pdf using Itext.
1st part: I am using JtextBox in which
users enters the name of village.
2nd Part: and I want to automatically sa ve the pdf file as the name of t he village entered in Jtextbox.
how to accomplish the 2nd part in itext?
help needed.
note:: no use of servlets. only a stand alone app.
- 09-20-2011, 12:46 PM #2
Moderator
- Join Date
- Apr 2009
- Posts
- 10,438
- Rep Power
- 16
Re: how to save a pdf file as named in a Jtextbox.
How would you normally provide a filename to iText?
However you do that, then simply get the String from the JTextBox and use that instead.
- 09-20-2011, 12:46 PM #3
Member
- Join Date
- Sep 2011
- Posts
- 14
- Rep Power
- 0
dfWriter writer = PdfWriter.getInstance(document, new FileOutputStream("example.pdf")
PdfWriter writer = PdfWriter.getInstance(document, new FileOutputStream("example.pdf"));
The above underlined "example.pdf" should be variable at runtime and should be able to be saved by desire of users.
how to do?
- 09-20-2011, 01:28 PM #4
Member
- Join Date
- Sep 2011
- Posts
- 14
- Rep Power
- 0
Re: how to save a pdf file as named in a Jtextbox.
would u please post some write ups.
- 09-20-2011, 01:44 PM #5
Moderator
- Join Date
- Apr 2009
- Posts
- 10,438
- Rep Power
- 16
Re: how to save a pdf file as named in a Jtextbox.
I've never used iText, and I am not currently doing Swing, and I also tend not to post "teh codez".
Find out how iText saves files (and weher it gets the name for the file from), then use the value in the text field instead...
- 09-20-2011, 02:22 PM #6
Re: how to save a pdf file as named in a Jtextbox.
seredi, don't start more than one thread for the same question. I've merged your two threads here.
db
- 09-20-2011, 03:27 PM #7
Similar Threads
-
Complex GUI 60 JComboBox + 40+ JTextBox
By Paul_White in forum New To JavaReplies: 8Last Post: 05-12-2011, 07:51 PM -
JCreator problem; class Exercise1 is public, should be declared in a file named Exerc
By JehanMustafa in forum New To JavaReplies: 1Last Post: 10-08-2010, 02:19 AM -
How to show or open a file download or file save dialog box
By java_bond in forum New To JavaReplies: 0Last Post: 03-05-2010, 04:21 AM -
Jtextbox with dropdown list
By vijay_s in forum AWT / SwingReplies: 1Last Post: 05-08-2008, 10:17 PM -
Jtextbox with dropdown list
By vijay_s in forum AWT / SwingReplies: 3Last Post: 05-08-2008, 06:26 AM


LinkBack URL
About LinkBacks
Reply With Quote

Bookmarks