Results 1 to 4 of 4
  1. #1
    eggy524 is offline Member
    Join Date
    Sep 2010
    Posts
    2
    Rep Power
    0

    Question Printing labels to A4

    Hi, I'm creating a java application that will take customer details (name, address, contact number etc) and print each set on information to sticky labels. There are 21 labels per A4 sheet in a 3 x 7 matrix and I would like to print on a per sheet basis.

    I was wondering if anyone would have any idea on how to do this?

    I've tried using html and tables but there is too much variation in printing from different web browsers. I've also though about creating PDF's for this task but I can't find any PDF API's without a steep learning curve.

    Does anyone know if there are other java API's out there designed specificly for printing?

    Thanks for your help

  2. #2
    JosAH's Avatar
    JosAH is online now Moderator
    Join Date
    Sep 2008
    Location
    Voorschoten, the Netherlands
    Posts
    13,365
    Blog Entries
    7
    Rep Power
    20

    Default

    Quote Originally Posted by eggy524 View Post
    Hi, I'm creating a java application that will take customer details (name, address, contact number etc) and print each set on information to sticky labels. There are 21 labels per A4 sheet in a 3 x 7 matrix and I would like to print on a per sheet basis.

    I was wondering if anyone would have any idea on how to do this?

    I've tried using html and tables but there is too much variation in printing from different web browsers. I've also though about creating PDF's for this task but I can't find any PDF API's without a steep learning curve.

    Does anyone know if there are other java API's out there designed specificly for printing?

    Thanks for your help
    I'd use a GridLayout on a JPanel and to each grid element I'd stick another JPanel representing the individual labels. A bit of trial and error would give me the size of one printed page of labels ...

    kind regards,

    Jos

  3. #3
    eggy524 is offline Member
    Join Date
    Sep 2010
    Posts
    2
    Rep Power
    0

    Default

    If I were to use Gridlayout's and JPanel's would they change depending on the resolution that the monitor was set to?

  4. #4
    JosAH's Avatar
    JosAH is online now Moderator
    Join Date
    Sep 2008
    Location
    Voorschoten, the Netherlands
    Posts
    13,365
    Blog Entries
    7
    Rep Power
    20

    Default

    Quote Originally Posted by eggy524 View Post
    If I were to use Gridlayout's and JPanel's would they change depending on the resolution that the monitor was set to?
    No, I don't think so but better test it yourself; AFAIK the Graphics object for printing has nothing to do with the screen resolution.

    kind regards,

    Jos

Similar Threads

  1. size och swt labels
    By larsk in forum SWT / JFace
    Replies: 0
    Last Post: 10-04-2009, 12:01 PM
  2. How do I sent font of labels in an array?
    By Exhonour in forum New To Java
    Replies: 9
    Last Post: 01-14-2009, 03:48 PM
  3. Display of tables and labels in the same pane
    By Karanam in forum AWT / Swing
    Replies: 6
    Last Post: 10-20-2008, 08:34 AM
  4. Working with Labels on Panels.
    By vargihate in forum AWT / Swing
    Replies: 2
    Last Post: 01-04-2008, 04:09 AM
  5. Aligning Labels
    By Java Tip in forum Java Tip
    Replies: 0
    Last Post: 01-02-2008, 06:26 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •