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 3 of 3

Thread: Print custom invoice of page size (20.5 x 14 cm) using jasper report or iText for Java

  1. #1
    Junior Member
    Join Date
    Jul 2014
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Print custom invoice of page size (20.5 x 14 cm) using jasper report or iText for Java

    I want to print data on invoice receipt size of 20.5 x 14 cm(hard copy). In which I try to put text at some absolute location. I tried iText first. In that I try to set page size by following code.
        // here what is unite used in bracket of rectangle?
     
        Document document = new Document(new Rectangle(552,377));
     
     
        PdfWriter.getInstance(document, new FileOutputStream("report.pdf"));
        document.open();
        ...
        ...
        ...
        document.close();

    Second I tried Jasper report. In that I set page size to 20.5 x 14 cm. But how can I take value from my java application's textfield and put it in to some absolute location in iReport.

    As I know jasper report take value from database but how can I take value from java application's textfiled?

    I am more familiar with iText.

    I will be thankful to any developer who can guide me how can I print custom invoice using iText or Jasper Report.I am developing java application using netbeans.
    Last edited by vsvankhede; July 4th, 2014 at 10:51 AM.


  2. #2
    Super Moderator
    Join Date
    Jun 2013
    Location
    So. Maryland, USA
    Posts
    6,310
    My Mood
    Mellow
    Thanks
    253
    Thanked 780 Times in 765 Posts

    Default Re: Print custom invoice of page size (20.5 x 14 cm) using jasper report or iText for Java

    Welcome to the forum! Please read this topic to learn how to post code in code or highlight tags and other useful info for new members.

  3. #3
    Junior Member
    Join Date
    Jul 2014
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Re: Print custom invoice of page size (20.5 x 14 cm) using jasper report or iText for Java

    Thank you GregBrannon for guideline.

Similar Threads

  1. Replies: 0
    Last Post: April 16th, 2014, 06:51 AM
  2. xfa.host.print: print a page + some page range.
    By gammaman in forum Totally Off Topic
    Replies: 2
    Last Post: May 10th, 2012, 09:07 AM
  3. Replies: 0
    Last Post: May 8th, 2012, 11:51 PM
  4. Jasper Report
    By zurich91 in forum AWT / Java Swing
    Replies: 0
    Last Post: September 25th, 2011, 02:35 PM
  5. Dynamic Jasper report
    By manojkp in forum Web Frameworks
    Replies: 0
    Last Post: April 6th, 2011, 06:41 AM

Tags for this Thread