Supplied CEL examples for AFP Enhancer

Eight examples of Content Expression Language (CEL) are supplied with the AFP Enhancer mode of RICOH Visual Workbench. These examples define the content of barcodes and text.

Document account number, current page in document

fmt("%08d", Doc.AccountNbr) fmt("%02d", cur_page_in_mp)

This example creates a 10-digit barcode or 10 digits of text.

  • The first 8 digits specify the value of the Doc.AccountNbr document property.
  • The last 2 digits specify the page in the document on which the barcode or text is placed.

If a value has fewer digits, RICOH Visual Workbench adds leading zeroes.

The pre-defined keyword cur_page_in_mp specifies the current page in the document (mailpiece).

Current sheet in document, total sheets in document

fmt("%02d",cur_sheet_in_mp) fmt("%02d",total_sheets_in_mp)

This example creates a 4-digit barcode or 4 digits of text.

  • The first 2 digits specify the sheet in the document on which the barcode or text is placed.
  • The last 2 digits specify the total number of sheets in the document.

If a value has fewer digits, RICOH Visual Workbench adds leading zeroes.

The pre-defined keywords cur_sheet_in_mp and total_sheets_in_mp specify the current sheet in the document (mailpiece) and the total number of sheets in the document.

Text

'My literal text'

This example creates a line of text that reads: My literal text

Job number, current document in job

fmt("%06d", print_job_id) fmt("%06d", cur_mp_in_pj)

This example creates a 12-digit barcode or 12 digits of text.

  • The first 6 digits specify the job number.
  • The last 6 digits specify the document in the job on which the barcode or text is placed.

You can use this example to create a barcode for the Automated Verification feature.

If a value has fewer digits, RICOH Visual Workbench adds leading zeroes.

The pre-defined keywords print_job_id and cur_mp_in_pj specify the job number and the current document (mailpiece) in the job.

    Note:
  • If you use the Job number (Job.ID) job property and the Sequence in child job (Doc.SequenceInChild) document property, you get the same results:

    fmt("%06d", Job.ID) fmt("%06d", Doc.SequenceInChild)

Job number, Document number, Insert sequence, current sheet in document, total sheets in document, and Document inserts

fmt("%08d",Job.ID) fmt("%08d",Doc.ID) fmt("%03d",Doc.Insert.Sequence%1000) fmt("%02d",cur_sheet_in_mp) fmt("%02d",total_sheets_in_mp) fmt("%01d",Doc.Custom.Inserts)

This example creates a 24-digit barcode or 24 digits of text.

  • The first 8 digits specify the value of the Job number (Job.ID) job property.
  • The next 8 digits specify the value of the Document number (Doc.ID) document property.
  • The next 3 digits specify the value of the Insert sequence (Doc.Insert.Sequence) document property.
  • The next 2 digits specify the sheet in the document on which the barcode or text is placed.
  • The next 2 digits specify the total number of sheets in the document.
  • The final digit specifies the value of the Document inserts (Doc.Custom.Inserts) document property.

You can use this example to create a barcode for the Inserter feature.

If a value has fewer digits, RICOH Visual Workbench adds leading zeroes.

The pre-defined keywords cur_sheet_in_mp and total_sheets_in_mp specify the current sheet in the document (mailpiece) and the total number of sheets in the document.

Job number, Sequence in child job

substr('000000000000000' Job.ID, -15) fmt("%04d", cur_mp_in_pj)

This example creates a 19-character barcode or 19 characters of text.

  • The first 15 characters specify the Job number (Job.ID) job property. The parameter –15 specifies that the job number ends on the 15th character. Job numbers with fewer than 15 characters are padded with zeroes. For example, the 11–character job number 10000001.12 is padded with 3 zeroes: 000100000001.12.
  • The last 4 digits specify the document in the job on which the barcode or text is placed.

You can use this example to create a barcode for the Automated Verification feature.

If a value has fewer digits, RICOH Visual Workbench adds leading zeroes.

The pre-defined keyword cur_mp_in_pj specifies the current document (mailpiece) in the job. The value of the cur_mp_in_pj keyword is the same as the value of the Sequence in child job (Doc.SequenceInChild) document property.

    Note:
  • You get the same results using the Sequence in child job (Doc.SequenceInChild) document property:

    substr('000000000000000' Job.ID, -15) fmt("%04d", Doc.SequenceInChild)

Sequence in child job, Job number

fmt("%04d", cur_mp_in_pj) substr('000000000000000' Job.ID, -15)

This example creates a 19-character barcode or 19 characters of text. The example has the same values as the previous example, but the order of the values is reversed.

Digits, Mailer ID, Zip code, more digits

'04260' Job.Postal.MailerID fmt("%05d",Doc.Address.ZipCode) '00'

This example creates a barcode or text with either 18 or 21 digits.

  • The first 5 digits are 04260.
  • The next 6 or 9 digits specify the value of the Mailer ID (Job.Postal.MailerID) document property.
  • The next 5 digits specify the value of the Zip code (Doc.Address.ZipCode) document property.
  • The final 2 digits are 00.
You can use this example to create an Intelligent Mail barcode. For 04260, substitute your 2-digit Barcode ID and your 3-digit Service type ID.

If a value has fewer digits, RICOH Visual Workbench adds leading zeroes.