Creating text with AFP Enhancer

You can create text on a specified page of each page group in an AFP file and specify its font and size. For example, you can add page numbers or you can add text so that the information in a barcode is also printed as readable text.

To determine the position of the new text, work from a copy of the sample AFP file printed on the production printer. Measure where you want to place the top-left corner of the text area (X and Y positions) on the printed page from the top-left corner of the logical page.

Note: In RICOH Visual Workbench you can display measurement units in inches or millimeters. To change the measurement unit, click View Units.
To create text:
  1. In RICOH Visual Workbench, open a sample AFP file.
  2. If the file does not contain page groups, use AFP Indexer to create page groups.
  3. Click Mode AFP Enhancer.
  4. Navigate to the page where you want to create the text:
    • To place text on the same page in every page group, navigate to that page in any page group.
    • To place text on multiple pages (for example, on even pages in every page group), navigate to one of the pages in any page group.
  5. Position your cursor at the top-left corner of the text area. While pressing the left mouse button, draw a box the approximate size of the text area.

    In a later step, you specify the exact position and size of the text area.

  6. Right-click anywhere in the AFP file and click Create Text.
  7. On the Text tab, type a name for the text.
  8. Specify the text using Content Expression Language (CEL).

    AFP Enhancer provides several CEL examples for you to select and modify. For more information, see the related reference topic on supplied CEL examples in the RICOH ProcessDirector information center.

      Note:
    • You can type carriage return control characters in the Content area. The carriage returns are removed when you export your enhancements to an EnhanceAFP control file.

    • You can copy CEL expressions from other sources and paste them into the Content area.

    • AFP Enhancer does not validate CEL syntax.

  9. Click the Font tab and select the type of font:
    • Inline Fonts
      • For Select Character set and Code Page, select a character set and code page from the drop-down lists.
      • For Coded Font, select an option from the drop-down list.
    • Core Fonts
      • From the drop-down lists, select the character set and code page, and, if the font is an outline font, the point size in the Font Information section.
    • External Fonts
      • Type a character set and code page pair, a coded font name, or all three. For double-byte character set (DBCS) fonts, use the coded font name only.
      • Note: If you enter a code page that is part of a DBCS-coded font, you see an error message that suggests you use the coded font name instead.
    You see the Character Set Description and Font Resource fields change for the font you selected. Font Resource is "Outline" for core fonts and "Raster" for external fonts.
    Note: If the character names do not match between a character set and code page, the job goes into an error state in RICOH ProcessDirector and the printer issues an error. To correct the error, change the character set and code page to a valid pair and process the job again.
  10. Click the Location tab.
  11. Specify the location of the text:
    • In the Location fields, specify the X and Y positions of the top-left corner.

      X
      The horizontal distance of the left side of the text measured from the left side of the logical page (not the physical sheet of paper). Decimal values (such as 2.5) are allowed. The X position cannot be greater than the width of the page.
      Y
      The vertical distance of the top of the text measured from the top of the logical page (not the physical sheet of paper). Decimal values (such as 2.5) are allowed. The Y position cannot be greater than the height of the page.

      The initial values of these fields are the X and Y distances of the top-left corner of the box that you drew.

    • In the Right Location fields, specify the X and Y positions of the top-left corner on right-hand pages.
        Note:
      • If you do not specify values for the Right Location fields, AFP Enhancer uses the values in the Location fields for all pages.

      • Use values in both the Location and Right Location fields if 2–up is enabled and the Page Placement value is All Fronts Left And Right.

    AFP Enhancer lets you specify decimal values for the X and Y positions or use CEL expressions. For example, a CEL statement can position text to the right of indexed data that varies in each document.

    Note: To specify an orientation of 90, 180, or 270 degrees, you edit the EnhanceAFP control file manually after you save the text in the Visual Workbench control file. Then you export the EnhanceAFP control file.

  12. Specify the pages on which to place the text in each page group.
  13. Optional: Specify a trigger using a CEL expression.

    Examples:

    • You want to place text on every document with two or more pages. Use this expression:

      total_pages_in_mp != 1

    • You want to place text on each document sent to California that has yes as the value of the Doc.Custom.PolicyDiscount document property. Use this expression:

      and(Doc.State == CA, Doc.Custom.PolicyDiscount == yes)

  14. Click the Preview tab and type text in the Sample Text field.

    The text you type on the Preview tab is used to display the text in RICOH Visual Workbench. The text is saved in the Visual Workbench control file. Only the information in the Content (CEL) field is exported to the EnhanceAFP control file and used to place the text on the documents in the AFP file.

  15. Optional: Change the X position and Y position values.

    The Origin of area values show the X and Y positions of the upper-left corner of the text area you drew.

    Note: The values on the Preview tab are used to display the text in RICOH Visual Workbench. They do not change when you change the values on the Location tab. The values on both tabs are saved in the Visual Workbench control file. Only the values on the Location tab are exported to the EnhanceAFP control file and used to place the text on the documents in the AFP file.

  16. Click OK.

    Preview displays the text on the same relative page in each page group. If you drew the text area on page 1 of one document, Preview displays the text on page 1 of all the documents. The page placement and trigger values on the Location tab specify text placement on the pages of the documents in jobs in the workflow.

  17. Click File Save Control File to save the text in the Visual Workbench control file.
  18. When you are ready to use the enhancements in the Visual Workbench control file (including the new text) in your workflow, click Tools Export EnhanceAFP Control File and choose a directory for the exported file.
  19. To specify an orientation of 90, 180, or 270 degrees, add this line to the EnhanceAFP control file with a text editor:

    #Afp.InsertText.Orientation[text_name]=Degrees90

    where text_name is the name that identifies a text insertion.

    For example:#Afp.InsertText.Orientation[Sample-Text]=Degrees90

    Note: When you edit an EnhanceAFP control file manually, the edits are not saved in the Visual Workbench control file. If you make additional enhancements and save them in the Visual Workbench control file, you must export the EnhanceAFP control file to make the new enhancements available to the workflow. Then you must manually edit the new EnhanceAFP control file to add the edits that you made in the original EnhanceAFP control file.