AFP Facelift

Add color to text, image, background, and white space

The AFP technology has evolved for more than a couple of decades, and many output produced from earlier technology lack the refinedness of modern documents. Typical symptoms included: black and white throughout; use of low-resolution raster fonts; bitmap images; lack of vector graphics; pattern fills that simulate shades; crowded or unorganized page layout design; etc. As electronic delivery is becoming ever popular, companies can be less burdened by the cost of printing, and more vivid and decent designs can be added on top of originals, to make the PDF replacement more than a mere carbon copy but augmented with new layers of communication.

On the basic level colors can be added to enhance user friendliness. That includes page template design such as background gradient, header and footer design, regional highlight for content of most interest to the customers. Certain text can be rendered in color, too. With a little advanced technique, full or partial of a monocolor raster image can also be “painted” in a given color. The latter would be very useful for full-page images that cannot be split into small ones. Another situation is to make certain text displayed in reverse video, for which the original text can be pained in white color over newly added black background.

Moreover, white spaces on page can be a good place for promotional images. We have two distinct technical advantages in this kind of applications. First, we can resize or move the other parts of text to enlarge the white space; second, we can add Flash animation inside PDF instead of a single image. The animation can be designed with a transparent background so that it fuses well with the page content.

Even more beautifications can be done. For example, bitmap patterns that are used to simulate shades can be replaced by true colors; raster fonts can be replaced with outline fonts for best viewing and printing effects; even specified images can be replaced with other better choices.

All of these fantastic enhancements can be freely mixed and matched using our DocEvents Processing XML, which defines the selection criteria of pages or contents, and the necessary actions to be executed when such conditions are met. An actual use case could be described like the following; keep in mind that everything is doable with our XML framework — For each page in the input AFP document, if there is text like “MNMN” near a given position, then draw a pink-filled rectangle at a specified location and render text within that ared red, plus, catch the text for later use; if the page is second in a batch, then delete all text like a predefined pattern, replaced with black rectangles; if last page, then display a predefined image at the page center; finally, name the output after the text caught earlier. This gives you an idea of what DocEvents is capable of. In fact, it provides a way for user to naturally describe a set of program logic, and the translate that logic into programs and runs them, without forcing the user to ever write any program. To find out more, please visit the corresponding page.

 

Example 1: Add color background to certain area on page

color-a1 color-a2

Example 2: Add color to monocolor text or one-bit image

color-b1 color-b2

 

About the Author: Cyphia