text: Q:
  
  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.
  
  A:
  
  The size of a page in PDF is defined by the MediaBox (required). The visible area is defined by the CropBox (optional). The measurement unit in PDF is the user unit. By default 1 user unit coincides with 1 point. In other words: 1 inch = 72 user units.
  However, one can define a UserUnit value between 1 and 75,000. You won't find that much PDFs that change the default and as you're creating a PDF from scratch, you are using the default user unit. In your case, a page that measures 552 by 377 user units, is 7.66 by 5.24 inch or 19.47 by 13.30 cm. You need a Rectangle of 581.10 by 396.85 user units:
  new Rectangle(581.1f, 396.85f);
  
  I am not at all familiar with JasperReports, so I can only answer the first part of your question regarding the measurement system. Maybe you can post a second question that focuses on the JasperReports part of your question.
  
  