Labels (spec)

From RPM Wiki

Table of contents

Summary

This expands on the Labels reference.

This is functionality to print labels of agency, customer, or form information. Ease of use and development is currently more important than power of customization and flexibility.

  • The format of each category of label is set in the settings including what information is included and the label size. The available label sizes will be preset in the application.
  • Users print the labels by clicking the new "Labels" print link that shows up in the top frame on the view and details pages for the various categories. Example: Printing labels from the "Select an agency" page will print a label for each agency in the view, using as many pages as needed. Printing labels from the details page on an agency will print 1 page of labels of that agency. The link leads to a print preview page.
  • For form labels the form number may be printed as a barcode.
  • There are default label settings so this feature can be used without any setup required.

Goal

Easily click a button to print labels for the agencies, customers, or forms I’m looking at.

Content options

For each category there is a list of information that can be shown. One of the options is a custom field (agency & customer) or data field (form).

  • Items with an * are checked by default for new subscribers / processes.
  • Description, label, link, line, and text area fields are not shown as options.

Agency

  • Agency name *
  • Primary contact
  • Contact info (select a phone number type or "Email")
  • Street *
  • City *
  • State *
  • Zip code *
  • Field (select a custom field or "Added")

Customer

  • Customer name *
  • Primary contact
  • Contact info (select a phone number type or "Email")
  • Street *
  • City *
  • State *
  • Zip code *
  • Field (select a custom field or "Added")

Process

  • Form number (includes process name) *
  • Form number as barcode *
  • Field (select a data field or "Started" or "Owner" or "Status")

Preview

The settings page shows a preview of what the label will look like using made up data. Use the selected label size.

  • Agency/customer name: "Some Company, Inc."
  • Street: "123 Anystreet"
  • City: "Anytown"
  • State: "Anystate"
  • Zip code: "12345"
  • Primary contact: "John Doe"
  • Phone number: "(123) 555-1234"
  • Email: "johndoe@anydomain.com"
  • Field: "a field value"
  • Form number: "{process}: 123456". Example: "Order: 123456".
  • Barcode: "123456"

Layout

Rows

The layout of the label is based around rows.

  • The different information that can be included in the label have set rows.
  • If that information isn’t selected then the row is hidden.
  • For some rows more than one piece of information may be shown. If both pieces are selected to be shown they are separated by a comma and a space.
  • The rows together are centered vertically in the label.
  • Each row is centered horizontally.
  • Agency & customer
    1. {agency/customer name} (bold)
    2. {primary contact}{, }{phone number/email}
    3. {street}
    4. {city}{, }{state}{, }{zipcode}
    5. {field name}: {field value}
  • Process
    1. {process}: {form number} (bold)
    2. {number as barcode} (takes up about 3 rows)
    3. {field name}: {field value}

Font

The font and size used depends on the row. The font is the same for both label sizes since they are both the same height.

  • Barcode: 36pt "3 of 9". The barcode is actually an imagine generated by a custom barcode rendering tool we wrote. The barcode will be rendered at quad resolution which means 144pt (size=144) shown at 42px (height="42").
  • Other rows: 8pt "Courier New". This is a fixed-width font.

Null values

If a piece of information is selected to be shown, but that particular agency, customer, or form has a null value, the space is still there but left blank. In other words, the blank space is still counted when determining font size, but it’s left empty on the print. This is so the overall layout still matches labels printed that have the values.

  • This is done by outputting a non-breaking space, " ".
  • This is done instead of showing "n/a" or hiding the row.
  • Example: In our agency labels we’ve selected to show the address. For one agency the address information is all blank. Their label will have a large blank area where the address would have been printed, in other words, the agency name was not made larger to take advantage of the extra space.

Truncate

Some of the data intended to be displayed may be longer than will fit on the label. This is handled by truncating the data before the HTML to be printed is generated.

  • When determining if truncation is needed, the length of the whole row including any inserted commas and spaces, is taken into account.
  • If the length is longer than allowed then trim to two under the maximum length and add "...". Example: If the maximum length is 12: "Mycity, Mystate" would become "Mycity, My..."
  • The first exception is the first row of process labels where the process + number is shown.
    • If the total length exceeds the limit and the process name is longer than 3 characters then first try rebuilding the line with the process name truncated to 3 characters (don’t add "…"). Example: "This huge processes name: 123" becomes "Thi: 123".
    • Next, if the total is still too long or the process was already 3 characters or less, remove the process name, colon, and space. Example: "This huge processes name: 123" becomes "123".
    • Finally, if the number on its own is still too long, truncate the number except chop off leading numbers first (and add "…" to the front). Example: "123456789012345" becomes "…6789012345"
  • The second exception is the barcode. The number used to generate the barcode also has a maximum length. If the number is longer, truncate the number except chop off leading numbers first (don’t add "…"). Example: "123456789012345" becomes "6789012345"
  • Limits
    • 1" x 2.625"
      • Barcode: 10
      • Other rows: 36
    • 1" x 4" (2 columns, 20 per page)
      • Barcode: 18
      • Other rows: 56

The print page

  • Links from. The link to the print page is shown in the toolbar.
    • Views. Print one label per item in the view. This means all pages of the views (like download does).
    • Details page. Print one page where each label is the same.
  • The page. Unlike most pages in RPM, this page is not contained within the regular frameset.
    • Controls & instructions. The top of the page contains a "print" link and instructions for setting the proper margins. There is also a link for the user to return to the previous page when they’re done. This section also includes the page title and other common controls. The styles for the page will insure this part isn’t printed.
    • The table. The labels themselves are contained in one large table. Each cell is a label. The styles in the page make the formatting correct and the style block included in the HTML depends on the label size.
  • Limits. A maximum of 100 pages of labels will be shown & printed.
  • This page was last modified 16:59, 26 Sep 2006.
  • This page has been accessed 1355 times.