Welcome to the Java Programming Forums


The professional, friendly Java community. 21,500 members and growing!


The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


>> REGISTER NOW TO START POSTING


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 4 of 4

Thread: Save form as .pdf file?

  1. #1
    Junior Member
    Join Date
    Nov 2010
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Exclamation Save form as .pdf file?

    Hey everyone!

    So I'm new to programming and I'm making a form with NetBeans using Swing and ultimately I want to know if there is any way to save the form as a .pdf file? It can look like an image. I just need it to print it. After i save the fine, I want go back and use it again? Is this at all possible? What criteria must I meet to do this?

    this is an application i'm making that's only supposed to be ran on the desktop. so idk if i need a database for it? any help is appreciated.


  2. #2
    Administrator copeg's Avatar
    Join Date
    Oct 2009
    Location
    US
    Posts
    5,318
    Thanks
    181
    Thanked 833 Times in 772 Posts
    Blog Entries
    5

    Default Re: Save form as .pdf file?

    Is there a requirement for the PDF file format? If not, you could theoretically just save the form in some other easy file type (one example could be through serialization), and print the form when necessary (Printing). If a requirement is to use a PDF, then you will have to resort to 3rd party libraries, such as PDFBox

  3. #3
    Member Darryl.Burke's Avatar
    Join Date
    Mar 2010
    Location
    Madgaon, Goa, India
    Posts
    494
    Thanks
    8
    Thanked 48 Times in 46 Posts

    Default Re: Save form as .pdf file?

    This thread has been cross posted here:

    http://www.java-forums.org/awt-swing/34716-save-form-pdf-file.html#post156389

    Although cross posting is allowed, for everyone's benefit, please read:

    Java Programming Forums Cross Posting Rules

    The Problems With Cross Posting

    db


  4. #4
    Junior Member
    Join Date
    Nov 2010
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Re: Save form as .pdf file?

    Darryl, sorry for not posting the link here. I wasn't too sure on the rules. I'll be sure to do it next time.

    Copeg, I don't think there is a requirement as to what file type to save it, but my friend preferred PDF. I'll take a look at the 3rd party program. Thank You!! I'll post here if I have more questions.

Similar Threads

  1. How and where do you save user settings?
    By snytkine in forum AWT / Java Swing
    Replies: 3
    Last Post: October 12th, 2010, 05:46 AM
  2. Can't get it to save stuff with JFileChooser
    By javapenguin in forum What's Wrong With My Code?
    Replies: 35
    Last Post: August 11th, 2010, 04:13 AM
  3. Java Swing :Back Button from one form to another form
    By srinivasan_253642 in forum AWT / Java Swing
    Replies: 1
    Last Post: December 26th, 2009, 09:51 AM
  4. Arraylist Save and Load
    By frankycool in forum Collections and Generics
    Replies: 1
    Last Post: November 14th, 2009, 06:48 AM
  5. Saving .jsp page as .pdf file while generating report for struts based web application
    By ravindra_kumar_tiwari in forum JavaServer Pages: JSP & JSTL
    Replies: 3
    Last Post: August 12th, 2008, 09:32 AM