afp2pdf transform user’s guide

64
MakeAFP AFP2PDF Transform User’s Guide Version V4.0

Upload: others

Post on 23-Oct-2021

8 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: AFP2PDF Transform User’s Guide

MakeAFP

AFP2PDF Transform  

User’s Guide  

 

 

 

Version V4.0 

Page 2: AFP2PDF Transform User’s Guide

 

 

 

 

This edition applies to AFP2PDF Transform. 

 

 

MakeAFP welcomes your comments and suggestions. You can send your comments and suggestions to:  

 

[email protected] 

 

When you send information to MakeAFP, you grant MakeAFP a non‐exclusive right to use or distribute the 

information in any way it believes appropriate without incurring any obligation to you. 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

© MakeAFP 2020. All Rights Reserved

Page 3: AFP2PDF Transform User’s Guide

 

 

 

 

   Contents 

  

 

 

Preface ................................................................................................................................................. 1 

About this User’s Guide ..............................................................................................................................1 

Conventions Used in This User’s Guide....................................................................................................1 

Chapter 1. Overview......................................................................................................................... 3 

Benefits ...........................................................................................................................................................3 

Functions at a Glance ...................................................................................................................................5 

Chapter 2. Installing AFP2PDF Transform for Windows ......................................................... 7 

AFP2PDF for Windows Prerequisites........................................................................................................7 

Installing AFP2PDF on Windows...............................................................................................................7 

Applying License of AFP2PDF Transform for Windows........................................................................7 

Chapter 3. Installing AFP2PDF Transform for Linux ................................................................ 8 

Installing AFP2PDF on Linux .....................................................................................................................8 

Applying License of AFP2PDF Transform for Linux ..............................................................................8 

Uninstalling AFP2PDF on Linux ................................................................................................................8 

Chapter 4. AFP2PDF Configurations for Windows.................................................................... 9 

Mapping AFP Fonts .....................................................................................................................................9 

Mapping AFP Object Resources ...............................................................................................................12 

Defining Text Watermarks, Static Objects...............................................................................................14 

Defining Configuration files for Linux ....................................................................................................17 

Chapter 5. AFP2PDF Command ................................................................................................... 18 

AFP2PDF Command Syntax .....................................................................................................................18 

AFP2PDF Command Examples................................................................................................................23 

AFP2PDF Command for IBM Content Manager OnDemand..............................................................25 

i

Page 4: AFP2PDF Transform User’s Guide

Chapter 6. AFP2PDF Transform Server for Windows ............................................................. 26 

Configuration of AFP2PDF Transform Server........................................................................................26 

Managing Service of AFP2PDF Transform Server.................................................................................28 

Log File of AFP2PDF Transform Server ..................................................................................................29 

Chapter 7. AFP2PDF Tools ............................................................................................................ 30 

MakeAFP Form Designer ..........................................................................................................................30 

MakeAFP Workbench ................................................................................................................................32 

Sniff Tool ................................................................................................................................................34

Measure Tool .........................................................................................................................................34 

Magnification Tools ..............................................................................................................................35 

Color Picker ...........................................................................................................................................36 

Copy AFP Pages to File ........................................................................................................................37 

Extract Resources ..................................................................................................................................37 

View AFP Page Group Level Indexing Tags.....................................................................................38 

MakeAFP Fonter .........................................................................................................................................38 

Chapter 8. AFP2PDF Application Programming Interfaces.................................................... 41 

AFP2PDF APIs Libraries and Examples..................................................................................................41 

AFP2PDF APIs Functions..........................................................................................................................41 

A2PCancelTransform Function...........................................................................................................41

A2PCloseTransform Function.............................................................................................................41 

A2PGetError Function..........................................................................................................................41 

A2PGetErrorCount Function...............................................................................................................42 

A2PInitTransform Function.................................................................................................................42 

A2PInitTransStream Function.............................................................................................................42 

A2PQueryState Function .....................................................................................................................43 

A2PStartTransform Function ..............................................................................................................43 

AFP2PDF APIs for IBM Content Manager OnDemand ........................................................................43 

Appendix A. PDF File Size Optimization .................................................................................. 44 

Relevant Factors of Image Resources.......................................................................................................44 

Relevant Factors of Font Resources..........................................................................................................44 

Optimize Font Resource Size ....................................................................................................................45 

Appendix B. AFP Resources Basic Concepts ............................................................................. 46 

OpenType/TrueType Fonts .......................................................................................................................46 

AFP FOCA Fonts ........................................................................................................................................46 

AFP Page Segments....................................................................................................................................47 

Data‐object Container Resources..............................................................................................................48 

ii

Page 5: AFP2PDF Transform User’s Guide

iii

AFP Overlays ..............................................................................................................................................48 

Transferring AFP Files and Resources.....................................................................................................49 

Appendix C. AFP Font Basic Concepts ....................................................................................... 50 

AFP Font Structure .....................................................................................................................................50 

Coded Font.............................................................................................................................................50

Character Set..........................................................................................................................................50 

Codepage ...............................................................................................................................................51 

AFP Font Naming Convention .................................................................................................................52 

Appendix D. ASCII/EBCDIC AFP Codepages Summary ....................................................... 54 

Appendix E. SBCS/DBCS/UTF‐16BE AFP Codepages Summary .......................................... 58 

 

 

 

 

 

 

Page 6: AFP2PDF Transform User’s Guide

‐ 1 ‐ 

 

Preface  

This User’s Guide describes the functions, commands, and parameters associated with 

AFP2PDF Transform.  

 

About this User’s Guide  

This Userʹs Guide provides information about using AFP2PDF Transform, it helps you:  

Plan for transforming data from AFP (Advanced Function Presentation) format to 

Adobe PDF (Portable Document Format). 

Install and configure AFP2PDF Transform. 

How to use the AFP2PDF command. 

Configure AFP2PDF Transform Server for Windows. 

Using application programming interfaces (APIs). 

 

The information in this userʹs guide is for users who install, configure, and use AFP2PDF  

Transform.  

Conventions Used in This User’s Guide  

 

This User’s Guide uses consistent conventions for the following:  

Highlighting  

Syntax notation  

Highlighting   

This User’s Guide uses the following highlighting conventions:   

Bold   Identifies commands, keywords, and other items, whose names or values 

are predefined by AFP2PDF Transform or must be entered as‐is.   

Italic   Identifies parameters whose actual names or values you supply.  

 

Syntax Notation   

This User’s Guide uses the following syntax notation:   

Italics within a command represent variables for which you must supply a value. 

For instance:             -r reslib

Page 7: AFP2PDF Transform User’s Guide

‐ 2 ‐ 

 

means that you need to replace the variable reslib with a value that represents 

any valid resource library pathname.  

Do not enter the following symbols as part of the command:   

   Vertical bar  |  

   Braces   { }  

   Brackets  [ ]  

   Underscore   _    Ellipsis …  

The above symbols have the following meanings:   

- A vertical bar, |, between values, indicates that you can only enter one of 

the values with the command.   

- Braces, { }, around values indicate a required value, you must select one 

of the mutually exclusive values.  

- Brackets, [ ], around parameters indicate that they are optional.              

- An underscore, _, indicates the default value, which AFP2PDF uses if 

you do not specify the parameter with a non‐default value.   

- An ellipsis, …, following command or set of commands indicates the 

command or set of commands can be repeated. 

      

Page 8: AFP2PDF Transform User’s Guide

‐ 3 ‐ 

 

 

Chapter 1. Overview 

AFP2PDF Transform is a super‐fast solution for the high‐volume AFP to PDF 

transformation as well as PDF splitting on the fly for e‐Statements requirements, 

providing excellent transform quality from both legacy and the latest advanced AFP 

color data streams to the smallest PDF.  

AFP2PDF Transform enables you: 

Leverage the benefits and advantage of AFP, protect your significant investment on 

AFP, enables your business to grow and thrive consistently.  

Enable you to instantly transform and deliver the billing statements to your 

customers with significant cost savings.   

Accurately and efficiently transform your AFP to PDF with the highest fidelity & 

speed.   

Support the latest advanced AFP features, such as full color, using data‐object containers (GIF, JPEG, TIFF, PDF) directly in AFP.   

Support complex AFP documents encoded in a variety of text encodings, such as 

ASCII, EBCDIC, DBCS‐PC, DBCS‐HOST, UTF‐8, and UTF‐16.   

Substitute the legacy AFP FOCA fonts with TrueType/ OpenType fonts and able to 

precisely control text width.   

Extract index data from AFP indexes or on‐page contents, for PDF, bookmarking, or 

splitting.   

Support PDF encryption, by the owner and user‐open password protection and 

digital signatures.   

Provide graphical user interfaces to help you quickly define the font and resource mappings, watermarks, and templates.  

Designed to integrate easily with your mission‐critical document delivery systems 

and document archiving systems. 

Benefits  

Advanced AFP2PDF Transform provides the following benefits to AFP business users 

and clients: 

Documents On‐Demand 

Presenting e‐Statement on‐demand via the internet is your efficient, cost‐effective 

route to expand your business and enhance the communication with your customers, 

allowing them to access and view statements and invoices online when and where 

they want instantly, you can gain much better competitive, customer relationships 

Page 9: AFP2PDF Transform User’s Guide

‐ 4 ‐ 

and satisfaction, adherence to legal regulations, yet generating significant cost 

reductions.   

AFP2PDF Transform enables you to quickly migrate to electronic delivery of 

statements, invoices, and documents in secured PDF format, so your customers can 

easily and quickly search and retrieve the information they want within the multi‐

page PDF document.  

Business Protection 

AFP2PDF Transform leverages the benefits and advantage of AFP, an industry‐standard high‐performance open presentation architecture for statements and 

documents, protects your significant investment in AFP, enables your business to 

grow and thrive consistently.   

AFP2PDF Transform supports 40‐bit, 128‐bit, and 256‐bit encryption, as well as high‐

security protection with a user‐supplied digital signature, boosting your PDF 

document security by defining an owner password to control whether or not an end‐

user can modify the document’s contents, copy text or graphics from the document, 

add or modify text annotations or print the document, and you can also specify an 

end‐user password, only the authorized user can open the document.  

Productivity and Accuracy 

Inherits the advantage and capabilities of the most powerful MakeAFP Viewer, 

AFP2PDF Transform accurately and efficiently transforms your existing AFP data 

stream streams into PDF with the highest fidelity in extremely fast performance.   

Whatever your needs, AFP2PDF Transform provides a flexible solution that is 

typically up to 20 times faster than competitive products, with the highest 

transformation quality.   

AFP2PDF Transform uses sophisticated object‐to‐object transformations that deliver 

the highest fidelity and the smallest PDF data stream, enabling your organization 

and your customers to achieve the best performance with PDF document delivering, 

archiving, retrieving, and viewing. 

Easy Integration 

With the AFP2PDF Transform, you can quickly enable electronic delivery with very 

minimal changes to your existing production environment, significantly simplify and 

streamline the documents management and deliveries throughout your enterprise.   

AFP2PDF Transform is designed to integrate easily with your mission‐critical 

document delivery systems and document archiving systems; provides both 

command‐line interfaces and APIs in C/C++, C#, and Java, to manage the workflow 

operations of documents transformation.   

The AFP2PDF Transform Server supports the full automation of simple and complex 

production transforms. 

 

Page 10: AFP2PDF Transform User’s Guide

‐ 5 ‐ 

Functions at a Glance  

AFP2PDF Transform provides the following advanced features, functions, and 

capabilities to AFP business users/clients: 

Extremely fast AFP to PDF transformation speed, able to achieve AFP to PDF 

transformation speed of more than 30,000 PPM with a single PDF output file, and 

more than 20,000 PPM with multiple PDF output files by the per page‐group 

splitting.  

Small footprint, high‐performance. 

Support AFP using TrueType /TrueType Collection/OpenType Fonts directly. 

Support font mapping from the legacy AFP FOCA bitmap and outline fonts to the 

new generation of TrueType/OpenType fonts, and able to control text width 

precisely. 

Transform AFP legacy outline/bitmap fonts to Type‐1/Type‐3 PDF fonts dynamically, 

able to handle AFP texts encoded in custom non‐standard 1‐byte/2‐byte encoding. 

Support PDF fonts sub‐setting. 

Support AFP texts encoded in ASCII, EBCDIC, DBCS‐PC, DBCS‐HOST, and UTF‐8/  

UTF‐16, and rotated texts. 

Support new AFP Extended codepage (ECP) to quickly map the custom user‐defined 

characters.  

Import AFP page‐group level indexes and also able to extracts AFP index values 

from on‐page contents of non‐Indexed AFP. 

Support legacy AFP page‐segment monochrome and color images in FS10, FS11, 

FS42, and FS45 formats.  

Support new generation of data‐object containers, such as PDF, GIF, JPEG, and TIFF images in RGB or CMYK mode. 

Support multi‐page data‐object containers in PDF, TIFF formats. 

Support image substitution with a new color image or AFP overlay, image resolution 

reduction, and able to convert image objects in high‐performance and high color 

fidelity by the ICC profile‐based color management. 

Support all of the linear and 2D barcodes defined in the latest IBM AFP BCOCA standard, including the new USPS OneCode® (USA Postal Intelligent 4‐State 

Barcode). 

Fully support AFP GOCA vector graphic drawings, as well as the legacy lines, boxes, 

and shading patterns.   

Split PDF document by the AFP page‐group level indexes. 

Generate the PDF page‐group level bookmarks by AFP indexes. 

Export AFP page‐group level indexes to CSV format files. 

Support 40‐bit, 128‐bit, and 256‐bit encryption, as well as high‐security protection 

with a user‐supplied digital signature. 

Support text watermarks, and BMP, GIF, JPEG, PNG, TIFF, AFP page‐segment 

images, AFP overlays, or PDF objects, as the watermarks, static images, and overlays. 

On Windows platforms, provide graphical user interfaces to help you quickly define 

the font mapping from the legacy AFP bitmap/outline to OpenType/TrueType fonts, 

Page 11: AFP2PDF Transform User’s Guide

‐ 6 ‐ 

import AFP font names from AFP file to assist you to define the font mapping, define 

the image substitutions, define the font typeface, size, style, and color of the text 

watermarks, and define the text watermarks, static objects in image or PDF formats.  

Provide both command‐line and GUI interfaces for Windows platforms. 

Provide command‐line for Linux platforms. 

Provide Application Programming Interfaces (APIs), for C/C++, C#, and Java 

application programs, to quickly transform AFP documents from a file or memory 

buffer to PDF documents. 

Provide command‐line and Java APIs for the integration with IBM Content Manager 

OnDemand seamlessly. 

On Windows platforms, provide AFP2PDF Transform Server to auto pull multiple 

input hot‐folders and outputs to multiple folders, auto dispatch the transformation of 

the document, fully automate the production transformations in multitasking high‐

performance. 

Page 12: AFP2PDF Transform User’s Guide

‐ 7 ‐ 

 

  

 

 

Chapter 2. Installing AFP2PDF Transform for Windows  

This chapter provides information on the Windows prerequisites, and installation of the 

AFP2PDF Transform for Windows.  

 

AFP2PDF for Windows Prerequisites   

Here are the prerequisites to run AFP2PDF Transform for Windows:  

1. Windows 7 or above, 64‐bit.  

2. Windows Server 2008 or above, 64‐bit. 

3. Microsoft Visual C++ 2010 Service Pack 1 Redistributable Package, 64‐bit.  

 

Installing AFP2PDF on Windows   

To install AFP2PDF Transform on a Windows server or workstation:  

1. Log on to the Windows system as an administrator.  

2. Run AFP2PDF Transform setup package you received. 

3. Follow the instructions on the installation screens to install the package, the 

destination folder is c:\AFP2PDF.   

Applying License of AFP2PDF Transform for Windows   

Installing Soft‐license Key   

1. Click the Start button, and then select Programs, MakeAFP Software, AFP2PDF 

Transform, and AFP2PDF Configurator and Manager. 

2. On AFP2PDF Transform Licensing GUI, select MakeAFP Software License Key, 

copy the Serial Number, and then paste it into an email to be sent to MakeAFP 

Support at [email protected] to request a software license key for your 

system.  

3. Once an AFP2PDF Transform License key is received, you need to run AFP2PDF 

Configurator and Manager GUI to apply the license key.   

Page 13: AFP2PDF Transform User’s Guide

‐ 8 ‐ 

 

 

Chapter 3. Installing AFP2PDF Transform for Linux  

This chapter provides installation information of the AFP2PDF Transform for Linux.  

 

 

 

 

 

 

Installing AFP2PDF on Linux   

To install AFP2PDF Transform on a Linux server: 

 

If install on the AFP2PDF default installation path /usr/share/afp2pdf, type the 

following command: 

       sudo sh afp2pdf_install.bin

 

If install on a user‐defined specific path, type the following command: 

        sudo sh afp2pdf_install.bin your_afp2pdf_path_name  

Applying License of AFP2PDF Transform for Linux   

AFP2PDF Transform for Linux provides the soft‐license key.  

Installing Soft‐license Key   

1. Type command afp2pdf, copy the Serial Number generated, and then paste into 

an email to be sent to MakeAFP Support at [email protected] to request a 

software license key for your system.  

2. Once your AFP2PDF Transform License key was received, copy it into your 

AFP2PDF installation path, the default path is:  

 

/usr/share/afp2pdf

Uninstalling AFP2PDF on Linux   

To uninstall AFP2PDF Transform on a Linux server: 

 

If installed AFP2PDF on the default installation path /usr/share/afp2pdf, type the 

following command: 

       sudo sh afp2pdf_install.bin --uninstall

 

If installed AFP2PDF on a user‐define specific path, type the following command: 

        sudo sh afp2pdf_install.bin your_afp2pdf_path_name --uninstall

Page 14: AFP2PDF Transform User’s Guide

‐ 9 ‐ 

 

 

 

 

Chapter 4. AFP2PDF Configurations for Windows  

This chapter describes AFP2PDF Configurations and their Graphical User Interfaces.  

 

By default, AFP2PDF configuration files are resided in the AFP2PDF sub‐path 

<install_path>/config/ on Windows platforms. 

 

AFP2PDF Configuration files are in XML format with syntaxes that are very simple and 

easy to understand, editing such XML configuration files directly is quite 

straightforward. As these XML files are encoded in Unicode UTF‐8 encoding, make sure 

the text editor you are using supports Unicode encoding texts, like the powerful freeware 

Notepad++ is one of them. You may use an Internet Browser to verify XML file edited.  

Mapping AFP Fonts  

With AFP2PDF, you can substitute the legacy AFP fonts with the new generation 

OpenType(OTF), TrueType (TTF), and TrueType Collection(TTC) fonts, to achieve a 

high‐quality PDF document with a smaller file size, AFP2PDF can sub‐set the 

OTF/TTF/TTC fonts embedded within the PDF output documents. 

 

By default AFP2PDF Transform on Windows platforms, AFP FOCA font mapping 

configuration file is <install_path>/config/fontMap.xml, you can override the default by 

the AFP2PDF command flag parameter ‐mf. 

 

AFP2PDF Font Mapping configuration file is in XML format with the syntaxes which are 

very simple and easy to understand, editing such XML configuration file directly is quite 

straightforward.  

 

AFP2PDF provides a user‐friendly GUI to help you quickly define and update the AFP 

font mapping configurations. 

 

Click the Windows Start button, select Programs, MakeAFP Software, AFP2PDF 

Transform, AFP2PDF Configurator and Manager, and then Font Mapping, to start the 

Font Mapping GUI. 

 

With AFP2PDF Configurator and Manager GUI, you can:  

1. Define the filename of the AFP font mapping configuration. 

2. Define the PDF font libraries, where TrueType, TrueType Collection, OpenType, 

Postscript fonts are stored. For better performance, only add the font paths and 

store the fonts required. 

3. Define the default PDF font by its typeface name. 

Page 15: AFP2PDF Transform User’s Guide

‐ 10 ‐ 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

  

 

4. Define the PDF texts encoding codepage, cp1252 is for Latin 1 languages only, 

Unicode need to be defined for other universal languages. 

5. Add, edit or remove a font mapping item.   

6. Quickly import the AFP font names from the AFP sample file to assist you in 

defining the AFP font mappings.   

Click on Edit or Add button to open the AFP Font Mapping GUI:   

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

  

With the AFP Font Mapping Item GUI, you can:  

1. Define the AFP coded‐font name, AFP character‐set name, AFP character‐set 

name with codepage name, IBM defined FGID(Font Global ID) number, or an 

OpenType/TrueType font name being used by AFP as the data‐object font 

resource. 

Page 16: AFP2PDF Transform User’s Guide

‐ 11 ‐ 

2. Define the AFP standard codepage name to be used to map AFP text encoding to 

Unicode, you need to select it from the AFP codepage name list according to 

your AFP text encoding, this is required if your AFP is formatted by using non‐

standard AFP codepages.   

The default ʺAFP Std codepage or ECP embedded in AFP file” can be selected, if 

AFP is formatted by using AFP standard codepages and AFP fonts are 

embedded inline within AFP documents. 

3. Define the corresponding PDF font either by the font typeface name, or actual 

TrueType, TrueType Collection, OpenType, and Postscript font file name. 

4. Define the corresponding PDF font size, for may define it as 0 for an AFP FOCA 

outline font or OpenType/TrueType font. 

5. Define the PDF texts encoding codepage, cp1252 is for Latin 1 languages only, 

Unicode need to be defined for other universal languages. 

6. Define the corresponding PDF font style. AFP2PDF is capable of applying your 

Bold/Italic font style to the Normal style font; you may only store the normal 

style fonts in the AFP2PDF font libraries to force reducing of the PDF fonts to 

be embedded for achieving a smaller PDF file size.   

7. Define whether to embed the PDF fonts. All supported font formats can be 

embedded as long as font embedding is not restricted by the font copyright. 

8. Define whether to apply PDF text fidelity control to the corresponding font. 

Only select this option if you need to control specific PDF text widths 

accurately according to original AFP texts, AFP FOCA bitmap fonts are required 

by AFP2PDF, so that the AFP FOCA bitmap font width information can be 

parsed by AFP2PDF for the precise control of the PDF texts width fidelity.   

By click on Import AFP Font List From AFP… button to open the Import AFP Font List 

GUI, with which you can quickly import the AFP font information from your AFP 

document.  

 

To let AFP2PDF detect the AFP font properties information, AFP fonts are required 

either embedded inline in AFP document or pre‐stored in AFP2PDF font resource 

libraries.  

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Page 17: AFP2PDF Transform User’s Guide

‐ 12 ‐ 

 

Mapping AFP Object Resources  

With AFP2PDF, you can substitute AFP legacy pattern shading with a solid‐color, 

substitute a legacy AFP image with a new type of image, AFP overlay, or PDF object, and 

substitute an AFP overlay with a new type of object, enable you to achieve a high‐quality 

PDF document with smaller file size.   

MakeAFP Form Designer is a recommended advanced AFP overlay design tool, with 

which you can quickly redesign a nice AFP color overlay, in the text and graphic mode 

with a very small AFP data stream.   

Some AFP software generates their forms in the image mode with the big AFP image 

streams, which gives poor PDF display quality with a big PDF file size. By using new 

advanced AFP overlays to substitute such legacy AFP overlays and image‐type forms, 

we can achieve a much better PDF quality with a small PDF size.   

Refer to MakeAFP Form Designer User’s Guide, for more about the capabilities and 

features of MakeAFP Form Designer.   

By default AFP2PDF Transform on Windows platforms, AFP resource mapping 

configuration file is <install_path>/config/resMap.xml, you can override the default by 

the AFP2PDF command flag parameter ‐mr.  

AFP2PDF Resource Mapping configuration file is in XML format with the syntaxes 

which are very simple and easy to understand, editing such XML configuration file 

directly is quite straightforward.   

AFP2PDF provides a user‐friendly GUI to help you quickly define and update the AFP 

resource mapping configurations.  

Click the Windows Start button, select Programs, MakeAFP Software, AFP2PDF 

Transform, AFP2PDF Configurator and Manager, and then Resource Mapping, to start 

the Resource Mapping GUI. 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

  

Page 18: AFP2PDF Transform User’s Guide

‐ 13 ‐ 

With AFP2PDF Configurator and Manager GUI, you can:  

1. Define the filename of the AFP resource mapping configuration. 

2. Define the source and destination resource names. 

3. Define AFP legacy pattern shading mappings. 

4. Define AFP legacy image mappings. 

5. Define AFP data‐object resource mappings. 

6. Define AFP overlay mapping.   

Click on Edit or Add button to open the edit AFP Resource Mapping item GUI:  

 

           Shading Mapping GUI Example:  

 

 

 

 

 

 

 

 

            

          AFP Image Mapping GUI Example: 

 

 

 

 

 

 

 

 

 

           

 

 

 

 

 

 

  

 

 

 

  

With the above dialog GUIs, you can:  

1. Define a shading percentage range of source and its corresponding destination 

color. By default AFP2PDF auto‐substitutes AFP legacy pattern shading to a 

solid grayscale color, also provides a command‐line flag parameter ‐ng if AFP 

Page 19: AFP2PDF Transform User’s Guide

‐ 14 ‐ 

legacy pattern shading still needs to be presented by using a PDF shading 

patterns.  

2. Define a source object name of AFP image, overlay, data‐object, and its 

corresponding destination object filename of AFP image, overlay, data‐object 

resource file, and you can adjust the object size and position of the destination 

object.   

Defining Text Watermarks, Static Objects 

 

AFP2PDF enables you to add texts, images, AFP overlays, and AFP page or PDF object as 

the watermarks, static objects to the output PDF documents. 

 

By default AFP2PDF on Windows platforms, the definition file of watermarks, static‐ 

objects configuration file is <install_path>/config/staticObject.xml, you can override the 

default by the AFP2PDF command flag parameter ‐w. 

 

AFP2PDF provides user‐friendly GUIs to help you quickly define and update the 

definitions of watermarks, static objects. 

 

Click on the Windows Start button, select Programs, MakeAFP Software, AFP2PDF 

Transform, AFP2PDF Configurator and Manager, and then Static Object, to start the 

Static Object GUIs for the watermarks, static objects.  

 

  

 

 

 

 

 

 

 

 

 

 

 

 

 

 

  

With Static Object Configuration GUI, you can:  

1. Add a text as the watermark. 

2. Add a data‐object, such as an image, AFP overlay, AFP, or PDF page as the static 

object. 

3. Edit an existing definition item. 

4. Remove an existing definition item.  

Click on Add Text button to open the Text Watermark GUI:  

Page 20: AFP2PDF Transform User’s Guide

‐ 15 ‐ 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

With the Text Watermark Item GUI, you can:  

1. Define the texts in Unicode UTF‐8 encoding. 

2. Define the text location in inches. 

3. Define the text color, text rotation angle, and the PDF page range to apply. 

4. Define the PDF font either by the actual TrueType, TrueType Collection, 

OpenType, and Postscript font filename or by the font typeface name which is 

case‐sensitive and must be entered exactly according to the actual font typeface 

name. 

5. Define the PDF font size and PDF texts encoding codepage. 

6. Define the PDF font style. AFP2PDF is capable of applying your Bold/Italic font 

style to the Normal style font, you may only store the normal style fonts in the 

PDF font libraries to force reducing the PDF fonts to be embedded for 

achieving a smaller PDF file size.   

7. Define whether embed the PDF fonts. All supported font formats can be 

embedded as long as font embedding is not restricted by the font copyright.   

Click on Add Object button to open the Static Image, Static PDF, or Static AFP GUI:   

With the Static Image, Static PDF, or Static AFP GUI, you can:  

1. Define a data‐object, such as an image in popular image formats, e.g. BMP, GIF, 

JPEG, PNG, TIF, etc, AFP overlay, AFP, or PDF page. 

2. Define the object filling mode and the PDF page range to apply. 

3. Define the location and size of the static object.  

Page 21: AFP2PDF Transform User’s Guide

‐ 16 ‐ 

                         Static Image Object GUI Example: 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

                         Static PDF Object GUI Example:  

 

 

 

 

  

 

 

 

 

 

 

 

 

 

 

 

  

Page 22: AFP2PDF Transform User’s Guide

‐ 17 ‐ 

For the logos of enterprises, using the logo in PDF vector graphic drawing mode is 

recommended, with which we can achieve the logo in the superb presentation quality 

with small PDF data stream size. 

 

You may send us the logo in a vector drawing format, like in EPS, SVG, AI(Adobe 

Illustrator), so that we can help you to create a high‐quality logo in PDF format with a 

small file size.  

Defining Configuration files for Linux 

You can use the Windows GUIs of the AFP2PDF Transform demo version, to define and 

update the AFP2PDF configuration files. After configuration files are created, you need 

manually modify the resource path names according to your AFP2PDF environments on 

Linux. 

 

AFP2PDF Configuration files are in XML format with syntaxes that are very simple and 

easy to understand, editing such XML configuration files directly is quite 

straightforward. As these XML files are encoded in Unicode UTF‐8 encoding, make sure 

the text editor you are using supports Unicode encoding texts, like the powerful freeware 

Notepad++ is one of them. You may use an Internet Browser to verify XML file edited. 

Page 23: AFP2PDF Transform User’s Guide

‐ 18 ‐ 

 

 

  

 

Chapter 5. AFP2PDF Command  

AFP2PDF Transform provides an easy‐to‐use high‐performance command‐line program, 

to enable you quickly transform high volume AFP to PDF, as well as splitting PDF for e‐

Statements at extremely fast speed.  

AFP2PDF Command Syntax  

AFP2PDF command is designed to be easy to use, only some of the basic flag parameters 

are needed to control the AFP2PDF Transform, other configuration files can be specified 

by using user‐friendly AFP2PDF Configurator and Manager GUI.  

By default, AFP2PDF default configuration files in XML format are reside in the sub‐path 

<install_path>/config.  

Command syntax  

afp2pdf [ inAFP ] [ outPDF ] [ flag_parameters ]

      

Parameters  

inAFP  

Specify the fully qualified filename of the input AFP file, wildcard character * and ? are 

allowed for the multiple AFP files transformation, alternatively you may transform all 

AFP files from a specific path specifying by the flag parameter ‐i inPath.  

outPDF  

Optional, specify the filename of the output PDF file, if it is not specified then its filename 

forms by the input file base name with filename extension *.pdf, and output to the 

current path.  

‐i inPath 

Optional, specify the input path from which to process all AFP documents. AFP2PDF 

ignores non‐AFP files.  

‐o outPath 

Optional, specify the output path of PDF documents.  

‐O dynamicOutPath 

Optional, specify the convention to construct the dynamic output directories for the 

splitting of PDF documents.  

The following keywords are supported for auto split PDF documents into the dynamic 

directories: 

Page 24: AFP2PDF Transform User’s Guide

‐ 19 ‐ 

(yy), (yyyy) by the date value of current year 

(mm) by the date value of current month 

(dd) by the date value of current day 

(HH) by the time value of current hour 

(MM) by the time value of current minute 

(SS) by the time value of current second 

(idxn,column,length) by the part of AFP index value string capturing from an 

AFP index. n indicates the order number of index 

attribute names specifying by the AFP2PDF command 

argument flag ‐s;  column specifies the byte offset from 

the beginning of the index value string, a value of ʺ1ʺ 

refers to its first byte; length specifies the number of 

bytes to be captured. 

  

(indexn,fieldNo,fieldCol,fieldLen,”delimiters”) by the part of AFP index 

value string capturing from an AFP index. n indicates 

the order number of index attribute names specifying by 

the AFP2PDF command argument flag ‐s;  fieldNo

specifies the order number of the data fields used to 

construct the index value string; fieldCol specifies the 

byte offset from the beginning of the data field, a value 

of ʺ1ʺ refers to its first byte; fieldLen specifies the 

maximum number of bytes to be captured; delimiters 

specifies the characters to be used to indicate the end of 

the data fields.  

       Example:    

Assuming today is May 30, 2012, with e:\visa\(yyyy)\(mm)\(dd)  dynamic output 

directory definition, PDF documents will be split into the following directory:                                            

e:\visa\2012\05\30\  

Assuming command‐line flag parameter -s INVOICE is specified, INVOICE value 

string forms by the convention x‐mm‐dd‐yy‐xxxx‐accountNo, and dynamic output 

directory definition is defined as:   

f:\visa\(idx1,1,1)\(idx1,9,2)\(idx1,3,2)\(idx1,6,2)\(idx1,12,4)  

Document with INVOICE index value A‐05‐16‐12‐0301‐2340561670 will be split into 

the directory:  

               f:\visa\A\12\05\16\0301\

Assuming command‐line flag parameter -s INVOICE is specified, INVOICE value 

string forms by the convention x‐mm‐dd‐yy‐xxxx‐accountNo, and dynamic output 

directory definition is defined as:   

f:\visa\(idx1,1,1)\(idx1,9,2)\(idx1,3,2)\(idx1,6,2)\(idx1,12,4)  

Document with INVOICE index value A‐05‐16‐12‐0301‐2340561670 will be split into 

the directory:  

               f:\visa\A\12\05\16\0301\

Page 25: AFP2PDF Transform User’s Guide

‐ 20 ‐ 

Assuming command‐line flag parameter -s “Account No” is specified, its index 

value string forms by the convention xxxx‐yymmdd‐accountNo, xxxx field maximum 

length may up to 4 bytes, and dynamic output directory definition is defined as:   

f:\debitCard\(idx1,1,1,4,”-”)\(idx1,2,1,6,”-”)\  

Document with “Account No“ index value A12‐120516‐2340561670 will be split into 

the directory:  

               f:\debitCard\A12\120516\

‐b  [ indexes ] 

Generate PDF bookmarks, each one forms by the order of the AFP index attribute names 

ʺindex1;index2;...;index6ʺ. Uses the first attribute names of AFP index if indexes are not 

specified.   

‐cs 

Transform AFP legacy color shading to PDF solid color.  

‐csi  csvPath 

Specify a path for exporting AFP index values into the CSV format file encoding is UTF‐8. 

Each CSV file base‐name is based on your input AFP file base‐name.  

‐csv  csvPath 

Specify a path for exporting AFP index values, output PDF filename, and its number of 

pages into the CSV format file encoding is UTF‐8. Each CSV file base‐name is based on 

your input AFP file base‐name.  

‐CSV  csvPath 

Specify a path for exporting PDF output pathname, AFP index values, fully qualified 

output PDF filename, and its number of pages into the CSV format file encoding is UTF‐8. 

Each CSV file base‐name is based on your input AFP file base‐name.  

 

PDF output pathname is exported as the first record of CSV file, you may need it if your 

PDF output path is created dynamically by specifying ‐O dynamicOutPath command‐

line flag.  

‐d  

Optional, delete input AFP file(s) after done transformation successfully.  

‐dpi nnn  

Optional, specify the image resolution in DPI to downgrade the color image resolution, 

value 0 disables downgrade resolution. The AFP2PDF default value is 96 dpi for the color 

images.  

‐e permissions 

Specify the encrypt permissions to protect PDF documents, need to be used together with 

an owner password (by the flag ‐pe), valid value options are: acmps   

a     prevents extracting of text or graphics  

c     prevents inserting, deleting, modifying, rotating pages, and creating 

bookmarks and thumbnails  

m  prevents copying and extracting text or graphics from PDF document   

 

p  prevents any change to the PDF document  

s  prevents printing of PDF document  

Page 26: AFP2PDF Transform User’s Guide

‐ 21 ‐ 

‐f  fontLib 

Optional, specify the paths of AFP font library, use semicolon (;) to separate multiple 

paths.  

‐F  formdef 

Optional, specify the filename of AFP form definition from the local AFP resource library, 

default uses the inline form definition embedded in AFP.  

‐fp  pathName 

Optional, specify the name of the path, to retain AFP files after conversion failed.     

‐jbig   

Optional, set the 1‐bit monochrome bi‐level images to JBIG2.  

New JBIG2 provides the best solution available today for the most efficient 1‐bit image 

compression, offers much smaller 1‐bit images than legacy TIFF‐G4 compression.   

‐jp2  nnnn 

Optional, set the color images to JPEG 2000 with a quality value from 0 to 1000, lower 

values cause higher compression rates but lower image quality, value 0 disables 

downgrade image quality and resolution.  

‐jpg  nnn 

Optional, set the color images to JPEG with a quality value from 0 to 100, lower values 

cause higher compression rates but lower image quality, value 0 disables downgrade 

image quality. AFP2PDF default is JPEG with a quality value of 70.  

‐l  logFile 

Optional, specify a file if you want to log all the messages into one log file.  

‐log  logPath 

Optional, specify a path if you want to log the messages into the individual log file based 

on your input AFP filename.  

‐M nnn 

Optional, specify the segment size in MB, big value uses big memory but gives a better 

PDF splitting performance with complex AFP, default is an auto‐optimized value based 

on the evaluation of AFP data stream size.  

‐mf fontMap 

Optional, specify an AFP font mapping file, if it is not specified then the default file is the 

<install_path>\config\fontMap.xml on Windows platforms.  

See Chapter 3. AFP2PDF Configurator and Managers for more details on how to define AFP 

font mapping configuration file.  

‐mjpg  nnn 

Optional, set the color images to Mozilla JPEG with a quality value from 0 to 100, lower 

values cause higher compression rates but lower image quality.   

New Mozilla JPEG might provide a better quality and more efficient color image 

compression than the legacy JPEG algorithm.   

‐mr resourceMap 

Optional, specify an AFP resource mapping file, if it is not specified then the default file 

is the <install_path>\config\resMap.xml file on Windows platforms.  

Page 27: AFP2PDF Transform User’s Guide

‐ 22 ‐ 

See Chapter 3. AFP2PDF Configurator and Managers for more details on how to define AFP 

resource mapping configuration file.  

‐ng 

Optional, by default AFP2PDF auto‐substitutes AFP legacy pattern shading to a solid 

grayscale color for a better display quality and output PDF size, you can disable it if AFP 

legacy pattern shading still need to be presented by using PDF shading patterns.   

‐nw 

Optional, not overwrite PDF output files by appending the sequence numbers to the file 

names.  

‐pc CertFile CertPassword 

Optional, specify a fully qualified filename of PKCS#12 certificate file with the encryption 

key lengths from 1024 bits up to 4096 bits, and its password, to digital sign to digital sign 

the PDF document files, need to use with ʹ‐eʹ, ʹ‐peʹ and ʹ‐puʹ flag parameters.  

‐pe password 

Optional, specify PDF protection owner password, to be used with flag parameter ʹ‐eʹ to  

encrypt your PDF files.   

‐ph height 

Optional, specify PDF page height in inch.   

‐pi name 

Optional, specify the name of the PDF page‐piece dictionary, for the PDF internal indexes 

to be loaded into the document content management systems. For IBM Content Manager 

OnDemand, the Page‐Piece Dictionary must be named IBM-ODIndexes, for our product 

Document Ondemand, it can be named PDF-DOIndexes or a custom name. Flag ʺ-s

[indexes]ʺ parameter is required to specify the names of indexes.   

‐pm 

Optional, for running AFP2PDF in the secured production mode. AFP2PDF deletes PDF 

output file any warning or error message is detected, such as missing an AFP resource.  

‐po orient 

Optional, specify PDF page orientation, valid values are auto, 0, 90, 180 and 270, default 

value is auto.  

‐pv 

Optional, preview output PDF file, it is useful during your development and testing.  

‐pu password 

Specify PDF open password, user requires this password to open the PDF file.  

‐ph width 

Optional, specify PDF page width in inch.   

‐q n 

Optional, run AFP2PDF in the quiet mode, valid values are:  

0    ignores information messages. 

1    ignores warning messages. 

2    ignores error messages.  

3    ignores all messages.  

Page 28: AFP2PDF Transform User’s Guide

‐ 23 ‐ 

‐r  resLib 

Optional, specify the paths of the AFP resource library, use semicolon (;) to separate 

multiple paths.   

‐rc  [char] 

Optional, replace invalid character from AFP index attribute values with [char] for the 

splitting of  PDF output files, default [char] value is blank.    

‐rp  pathName 

Optional, specify the name of the path, to retain AFP files after conversion succeeded.     

‐s  [indexes]  

Split PDF pages by AFP group‐level indexes, output PDF file base name forms by the 

order of the AFP index attribute names ʺindex1;index2;...;index6ʺ. The default uses the 

first attribute name if indexes are not specified.  

Default PDF filename delimiter is the dot (.) , to separate the index attribute names, you 

can specify your custom delimiters by the syntax in:  

            ʺindex1[delimiter];index2[delimiter];...;index6[delimiter]ʺ  

‐sd 

Optional, scan all subfolders for the input AFP files and use the same subfolder names 

for the output PDF, CSV and log files.     

‐si  

Optional, read the PDF data stream from standard input.  

‐so  

Optional, write the AFP data stream to standard output.  

‐su  

Suppress blank pages.  

‐v  

Optional, indicate whether verify each splitting PDF documents is generated successfully, 

otherwise rewrite PDF output file. This feature is very useful to avoid the intermittent 

issues of your network disks.  

‐w staticObject 

Optional, specify the configuration file of the static watermarks, images, and overlays, if  

it is not specified then the default is the <install_path>\config\staticObject.xml file on 

Windows platforms.  

See Chapter 3. AFP2PDF Configurator and Managers for more details on how to define the 

watermark configuration file.  

AFP2PDF Command Examples  

 

The following example shows how to use the AFP2PDF command to transform an AFP 

document masterCard.afp by using the default AFP2PDF configuration files, and the 

output filename masterCard.pdf of PDF document is formed by the input AFP file base 

name plus PDF filename extension *.pdf.   

afp2pdf masterCard.afp  

Page 29: AFP2PDF Transform User’s Guide

‐ 24 ‐ 

The following example shows how to use the AFP2PDF command to transform all AFP 

documents from the input path d:\AFP_visaCards and output PDF documents into path 

e:\PDF_visaCards.   

afp2pdf -i d:\AFP_visaCards -o e:\PDF_visaCards  

The following example shows how to split PDF documents by the AFP page‐group level 

indexes  “Invoice No“ and “Client Name“, output PDF filename is formed by these AFP 

index values.   

afp2pdf phone_bills.afp -s “Invoice No;Client Name” -o e:\pdf_bills

The following example shows how to generate page‐group level PDF bookmarks by the 

AFP page‐group level indexes  “Account No“ and “Customer Name“.   

afp2pdf bank_stmt.afp bank_stmt.pdf -b “Account No;Customer Name”

Page 30: AFP2PDF Transform User’s Guide

‐ 25 ‐ 

AFP2PDF Command for IBM Content Manager OnDemand  

AFP2PDF command for IBM Content Manager OnDemand is provided and fully 

compatible. 

 

Here are the steps to use the AFP2PDF command with IBM Content Manager 

OnDemand:  

1. Rename afp2pdf command module to another name.  

2. Rename afp2pdf_cmod command module to afp2pdf.  

 

Refer to document Web Enablement Kit Implementation Guide of IBM Content Manager 

OnDemand, or type command afp2pdf for more about AFP2PDF command syntax for 

IBM Content Manager OnDemand.  

Page 31: AFP2PDF Transform User’s Guide

‐ 26 ‐ 

 

Chapter 6. AFP2PDF Transform Server for Windows  

AFP2PDF Transform Server on Windows platforms runs as a Windows Service that is 

registered to the Windows service manager and starts as soon as the system boots and 

remains running as long as the system is up.  

With the powerful multitasking AFP2PDF Transform Server, once your AFP document 

files are placed in the user‐designated watching hot‐folders, from which they are 

dispatched to the appropriate AFP2PDF transform processes.  

Configuration of AFP2PDF Transform Server 

AFP2PDF provides a user‐friendly GUI to help you quickly define and update the 

configuration file <install_path>/config/transServer.xml of AFP2PDF Transform Server.  

The configuration file of AFP2PDF Transform Server is in XML format with syntaxes that 

are very simple and easy to understand, editing such an XML configuration file directly 

is quite straightforward. As these XML files are encoded in Unicode UTF‐8 encoding, 

make sure the text editor you are using supports Unicode encoding texts, like the 

powerful freeware Notepad++ is one of them.   

Click on the Windows Start button, select Programs, MakeAFP Software, AFP2PDF 

Transform, AFP2PDF Configurator, and Manager, and then Transform Server 

Configuration, to start the Transform Server Configuration GUI. 

Page 32: AFP2PDF Transform User’s Guide

‐ 27 ‐ 

With Transform Server Configuration GUI, you can:  

1. Define a new process, or modify an existing process. 

2. Define an AFP input directory and whether to scan its subdirectories. 

3. Define whether to retain the AFP input files into the retain directory after 

conversion succeeded, or retain AFP input files into a path after conversion failed. 

4. Define a PDF output directory and whether to auto split PDF documents into its 

dynamic subdirectories. The following keywords are supported for the auto 

creation of the dynamic subdirectory: 

           (yy), (yyyy) by the date value of current year 

(mm) by the date value of current month 

(dd) by the date value of current day 

(HH) by the time value of current hour 

(MM) by the time value of current minute 

(SS) by the time value of current second 

(idxn,column,length) by the part of AFP index value string capturing 

from an AFP index. n indicates the order 

number of index attribute names specifying by 

the AFP2PDF command argument flag ‐s;  

column specifies the byte offset from the 

beginning of the index value string, a value of 

ʺ1ʺ refers to its first byte; length specifies the 

number of bytes to be captured.   

(idxn,fieldNo,fieldCol,fieldLen,”delimiter”) by the part of AFP 

index value string capturing from an AFP index. 

n indicates the order number of index attribute 

names specifying by the AFP2PDF command 

argument flag ‐s;  fieldNo specifies the order 

number of the data fields used to construct the 

index value string; fieldCol specifies the byte 

offset from the beginning of the data field, a 

value of ʺ1ʺ refers to its first byte; fieldLen 

specifies the maximum number of bytes to be 

captured; delimiters specifies the characters to 

be used to indicate the end of the data fields.        Example:   

 

Assuming today is May 30, 2012, with visa\(yyyy)\(mm)\dd  subdirectory 

definition, Transform Server split PDF documents into the subdirectory:                                            

.\visa\2012\05\30\  

Assuming command‐line flag parameter -s INVOICE is specified, INVOICE 

value string forms by the convention x‐mm‐dd‐yy‐xxxx‐accountNo, subdirectory 

definition is defined as:   

  (idx1,1,1)\(idx1,9,2)\(idx1,3,2)\(idx1,6,2)\(idx1,12,4)  

Document with INVOICE index value A‐05‐16‐12‐0301‐2340561670 will be split 

into the subdirectory:  

       .\A\12\05\16\0301\

Page 33: AFP2PDF Transform User’s Guide

‐ 28 ‐ 

Assuming command‐line flag parameter -s “Account No” is specified, its 

index value string forms by the convention xxxx_yymmdd_accountNo, xxxx field 

maximum length may up to 4 bytes, and dynamic output directory definition 

is defined as:   

(idx1,1,1,4,”_”)\(idx1,2,1,6,”_”)\  

Document with “Account No“ index value A12‐120516‐‐2340561670 will be 

split into the directory:  

               .\A12\120516\  

5. Define the command‐line arguments to be used to run the AFP2PDF transform 

process, excludes arguments ‐i, ‐o, ‐d, input_afp_filename, out_pdf_filename. 

See Chapter 4. AFP2PDF Command for more details about AFP2PDF command‐

line available arguments. 

6. Define the maximum concurrent tasks, you need to adjust them according to 

your computer hardware capabilities to achieve the best transformation 

performance.  

Managing Service of AFP2PDF Transform Server 

At system boot, the Windows system starts a RPC server called Service Control Manager 

(SCM). A Windows service is a Windows program that is loaded by the SCM. It is loaded 

before any user has logged into the system, Service may sometimes be  

manually started instead of starting automatically at boot time. 

 

MakeAFP provides easy access to the SCM to manage the service of AFP2PDF Transform 

Server, with the command‐line flag options, you can easily install, start and stop the 

PDFTuner service, alternatively you can use Transform Server Management GUI to 

install, start, stop and uninstall the service.  

Command Syntax  

       transServer  { ‐c | ‐‐install |  ‐‐ start| ‐‐stop | ‐‐remove  }  

‐c 

To run AFP2PDF Transform Server in batch mode instead of Windows service mode. 

With batch mode, you can get more messages than Windows service mode. You may run 

it as an auto‐running task under Windows Scheduled Tasks.  

Make sure you have defined the configurations of the AFP2PDF Transform Server before 

you start it.  

‐‐install 

To install the service of AFP2PDF Transform Server into SCM.   

‐‐start 

To start the service of AFP2PDF Transform Server.   

Make sure you have defined the configurations of the AFP2PDF Transform Server before 

you start the service.  

 

Page 34: AFP2PDF Transform User’s Guide

‐‐stop 

To stop the service of AFP2PDF Transform Server.   

‐‐remove 

To uninstall the service of AFP2PDF Transform Server from SCM.   

 

Graphical User Interface  

Click on the Windows Start button, select Programs, MakeAFP Software, AFP2PDF 

Transform, AFP2PDF Configurator, and Manager and then Transform Server 

Management, to start the Transform Server Management GUI, with which you can 

easily install, start, stop, uninstall the service, monitor its state and view its log.   

 

 

 

 

 

 

 

 

 

 

 

  

 

  

Log File of AFP2PDF Transform Server 

As AFP2PDF Transform Server runs as a Windows service, you cannot get its messages 

on the command‐line screen while it is running. AFP2PDF Transform Server records all 

the messages in its log file <install_path>\log\TransServer.log.  

 

‐ 29 ‐ 

Page 35: AFP2PDF Transform User’s Guide

‐ 30 ‐ 

 

Chapter 7. AFP2PDF Tools  

This chapter describes AFP2PDF additional tools and their Graphical User Interfaces.  

 

Both MakeAFP Form Designer and MakeAFP Workbench are provided as the optional 

features of AFP2PDF, and MakeAFP Fonter (Demo) is provided as a free AFP tool.  

MakeAFP Form Designer  

With the powerful and advanced MakeAFP Form Designer, you can quickly design a 

nice AFP overlay with a small AFP data stream, to substitute a legacy AFP form object.  

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Some AFP software generates their forms in the image mode with big AFP image 

streams, which cause output PDF in poor display quality with big PDF file size. By using 

Page 36: AFP2PDF Transform User’s Guide

‐ 31 ‐ 

new advanced AFP overlays to substitute such legacy AFP overlays and forms, we can 

achieve a much better PDF quality with a small PDF size.   

MakeAFP Form Designer provides the following advanced features and functions 

helping you to create your AFP overlays at ease:  

WYSIWYG GUI in superior presentation quality and high‐performance, and able to 

generate AFP data stream in a very small size.  

Able to use scan‐in printout image as the form template with choices of color control, 

and able to use a PDF page as the form template, enables you able to redesign a form 

instantly. 

Supports legacy AFP ASCII/EBCDIC/DBCS‐PC/DBCS‐HOST encoding FOCA bitmap 

and outline fonts, as well as using the new generation of OpenType/TrueType fonts 

directly, able selects a font by the properties of typeface name, style, and size, able 

scale outline font width.   

Supports legacy AFP page‐segment monochrome and full‐color images in FS10, FS11, 

FS42, and FS45 formats. 

Supports data‐object containers in AFP page segment, GIF, JPEG, PDF, and TIFF 

formats. 

Supports ICC profile‐based color management natively. 

Supports legacy lines, boxes and shading patterns LED, SCREEN and STANDARD. 

Supports AFP GOCA vector graphic drawings, such as a color graphic table, box, 

rounded corner box, line, arrow‐line, fillet, marker, ellipse, arc, circle, etc. 

Able to control GOCA vector line width and styles; area filling patterns and colors; 

curves of each corner of the rounded box. 

Able to repeat drawing of line, box, rounded box, shading, color area precisely. 

Accurate positioning of all types of elements/objects with mouse or keyboard input 

in units of inches, millimeters, centimeters, or points. 

Displays positioning/sizing parameters in real‐time along with the element/object. 

Auto‐snap positioning while aligning element/object with the relevant element/object. 

Supports ASCII/EBCDIC/DBCS‐PC/DBCS‐HOST and UTF‐8/ UTF‐16 texts and 

paragraph rotations and alignments of left, center, right, and justify. 

Able to enter universal texts by keyboard and copy/paste at ease. 

Supports zoom levels of the entire page, page width, zooming from 25% to 500%, or 

a user‐specify zoom level.  

Able to use grids and guidelines to facilitate AFP overlay design. 

Supports copy/cut/paste, undo/redo, drag and drop elements/objects. 

Supports both legacy monochrome and full‐color elements/objects. 

Supports graphic rulers with choice of units. 

Supports all popular types of 1D and 2D barcodes by AFP drawing, including the 

new US Postal 4‐State OneCode barcode.  

 

Refer to MakeAFP Form Designer User’s Guide, for more about the capabilities and features 

of MakeAFP Form Designer.  

Page 37: AFP2PDF Transform User’s Guide

‐ 32 ‐ 

 

MakeAFP Workbench  

With advanced powerful functionality and high processing performance, the MakeAFP 

Workbench provides excellent accuracy and quality of AFP presentation, making it ideal 

for the business, AFP development, and production environments that demand high‐

performance and superior AFP viewing and printing on‐demand. 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

MakeAFP Workbench provides the following advanced features, functions, and 

capabilities to AFP professionals:  

Small footprint, high‐performance. 

Excellent easy‐to‐use graphical user interfaces. 

Superior presentation quality and accurate true fidelity. 

Able to find and search texts and indexes quickly.  

Supports ICC profile‐based color management natively in high‐performance. 

Supports CIELAB, CMYK, RGB color spaces. 

Supports using OpenType/TrueType fonts in AFP directly, with AFP texts encoded 

by ASCII, EBCDIC, DBCS‐PC, DBCS‐HOST, UTF‐8, and UTF‐16BE. 

Page 38: AFP2PDF Transform User’s Guide

‐ 33 ‐ 

Supports the complex text layout for the complex scripts (Arabic, Hebrew, Thai, etc), 

if AFP is formatted by using TrueType/OpenType fonts directly. 

Supports legacy AFP FOCA bitmap and outline Type 1 & CID‐Keyed fonts, encoded 

by ASCII, EBCDIC, DBCS‐PC, DBCS‐HOST, UTF‐16BE, and third parties’ non‐

standard own encodings. 

Supports the data‐object containers in GIF, JPEG, PDF, TIFF, and AFP page‐segment 

formats. 

Supports legacy AFP IOCA FS10, FS11, FS42, and FS45 monochrome and color 

images.  

Supports AFP GOCA vector graphics. 

Supports all of the 1D and 2D barcodes defined in AFP BCOCA standards. 

Supports embedded inline resources or external resources from the resource libraries.  

Presents legacy pattern shading patterns in high‐quality. 

Provides user‐friendly hand‐moving tool, as well as dynamic zoom, marquee zoom, 

and loupe zoom tools, to allow quick navigating and magnifying on the page. 

Supports full‐screen mode, zoom levels of the entire page, page width, zooming from 

25% to 500%, or a user‐specify zoom level.  

Supports page display layout in 1‐UP/2‐UP viewing/scrolling modes, and 

0/90/180/270  viewing rotation.  

Provides sniff tool to let you instantly find out the attributes of font, data‐object, and 

BCOCA barcode object, such as the font name, size and encoding, object dimension, 

type and color mode, BCOCA barcode type, module width, height, modifier, and 

barcode data stream, etc. 

Provides measure tool and guidelines to let you measure the position and size of 

element and object instantly. 

Provides a color picker tool to let you easily pick any color RGB/CMYK value from 

the view pane. 

Provides a select tool to let you quickly copy the texts or images from the AFP 

document. 

Provides a snapshot tool to let you quickly capture the screen of AFP viewing. 

Supports graphic rulers with choice of measurement units. 

Supports using image, AFP, and PDF as the form template with choices of color 

control. 

Able to copy AFP pages by user specify page ranges/lists.  

Able to export the AFP page as an AFP overlay or project file of MakeAFP Form 

Designer. 

Able to extract inline resources, as well as control the types of resources to be 

embedded while copying AFP pages. 

Able to view each AFP page property. 

Provides customize options to let you easily define the resource libraries, as well as 

the default RGB/CMYK color spaces. 

Page 39: AFP2PDF Transform User’s Guide

‐ 34 ‐ 

Supports printing on PCL/Postscript printers in high‐quality & speed, without any 

scaling or with scaling, rotation, and offset options. 

Provides AFP Viewer Plugin to view and print AFP document instantly with 

superior quality and true fidelity for the latest Google Chrome, Mozilla Firefox, 

Microsoft Internet Explorer, and Opera in high‐performance. 

Provides user interfaces in Chinese, English, Japanese, allows you to edit language 

files and create a new language support file for your language at ease.  

Sniff Tool  

With Sniff Tool of MakeAFP Workbench, you can instantly find out the attributes 

information of AFP FOCA font, OpenType/ TrueType font, AFP page‐segment image, 

data‐object, and BCOCA barcode used by an AFP page.   

    Detecting Font Examples:                                                                  

 

 

 

 

 

 

 

 

 

 

   Detecting Image Examples:                                                                 

 

 

 

 

 

 

 

 

 

 

 

 

You can copy attribute information by SHIFT+C keys while you clicking on the object. 

 

Measure Tool  

MakeAFP Workbench provides the measure tool and guidelines to let you measure and 

copy the position and size of elements and object instantly. 

Page 40: AFP2PDF Transform User’s Guide

‐ 35 ‐ 

Measuring Position Example:  

  

 

M

e

a

s

u

r

 

 

 

 

 

 

 

 

  

 

Measuring Position and Size:  

 

 

 

 

 

 

 

 

 

 

 

 

 

 

  

By holding down the SHIFT key for the measuring in horizontal/vertical straight 

direction.   

The measurement information can be copied by SHIFT+M keys. 

Magnification Tools  

MakeAFP Workbench provides powerful user‐friendly magnification tools to let you 

view AFP pages at ease.  

Page 41: AFP2PDF Transform User’s Guide

‐ 36 ‐ 

You can use the Marquee Zoom tool to drag a rectangle around a portion of the page that 

you want to fill the viewing area, or simply click the Marquee Zoom tool to increase the 

magnification by one preset level.  

The Dynamic Zoom tool zooms in when you drag it up the page and it zooms out when 

you drag it down.  

The Loupe tool is best used when you want to keep the AFP viewing at a standard zoom  

level (like fix page width) and magnify certain portions.   

The Loupe Tool opens a special dialog window that is linked to a scrollable, resizable 

rectangular that acts as a cursor and permits the selection of a magnified portion of the 

AFP page, that matches the area in an adjustable rectangle on the viewing pane.   

The toolbar at the bottom of the Loupe Tool dialog window allows you to change the 

zoom percentage, which can also be done by adjusting the size of the rectangle.   

Loupe Zoom Example: 

 

 

 

 

 

 

 

 

 

 

 

 

 

  

Color Picker  

Color Picker allows you to instantly detect a color present on your AFP viewing pane.  

Detecting Color Example:  

 

 

 

 

 

 

 

 

 

  

Page 42: AFP2PDF Transform User’s Guide

‐ 37 ‐ 

Copy AFP Pages to File  

With the tool of Copy Pages to File, you can quickly convert the current viewing page as 

an AFP overlay, copy multiple ranges of pages to a new AFP file, as well as able to 

control the types of resources that still need to be embedded inline within the new AFP 

document file.  

  

 

 

 

 

 

 

 

Extract Resources  

MakeAFP Workbench provides you the capability to extract the AFP resources.   

You can select the multiple resources you want to extract by holding down the SHIFT 

key while selecting additional resources, you can also select more than one object at a 

time by holding down the CTRL key as you click on successive resources.   

 

 

  

 

Page 43: AFP2PDF Transform User’s Guide

‐ 38 ‐ 

View AFP Page Group Level Indexing Tags  

MakeAFP Workbench provides you the capability to view AFP page group level index 

tagging names and their values so that you can verify whether your AFP pages are 

indexed properly by each page group boundary.  

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

  

 

 

 

AFP page group level indexes are required by AFP2PDF to split your PDF pages by per 

page‐group. Make sure AFP page group level indexes are built correctly in your AFP.  

MakeAFP Fonter  

MakeAFP Fonter is a suite of programs that transform TrueType, OpenType, and 

Postscript Type 1 outline fonts into AFP FOCA bitmap and outline fonts, as well as 

enables you to view and edit the AFP bitmap and outline fonts.  

By using MakeAFP Fonter, you can easily create your fonts for AFP presentation, 

enabling you to create fonts with different styles and sizes so that you can present AFP 

documents and reports with your customized styles.  

With the MakeAFP Fonter Demo version, AFP2PDF professionals can quickly view each 

AFP codepage encoding matrix, AFP character patterns, and AFP font properties, to help 

you to properly define AFP2PDF font mapping configurations, as well as the custom 

encoding mapping in ECP (Extended Codepage) by using ECP Editor.      

AFP new Unicode Extended Code Pages (ECP) are the code pages with additional 

information to be used with OpenType and TrueType fonts. In ECP, users can define the 

custom mapping for each legacy coded point and its Unicode scalar.  

AFP2PDF supplied ECPs are installed in the subpath.\codepage. AFP2PDF uses ECP 

encoding mapping to do the encoding conversions from the legacy ASCII, EBCDIC, 

DBCS‐PC, and DBCS‐HOST to Unicode. You may customize them or add an own ECP.

Page 44: AFP2PDF Transform User’s Guide

‐ 39 ‐ 

 

MakeAFP Fonter provides the following advanced features and functions helping you to 

create your AFP fonts at ease: 

Converts TrueType, OpenType, and Postscript Type 1 outline fonts to AFP Type 1 outline fonts, encoding by ASCII, EBCDIC. 

Converts TrueType and OpenType outline fonts to AFP CID‐keyed outline fonts, encoding by ASCII, EBCDIC, DBCS‐PC( BIG5, GBK, HKSCS, KSC, SJIS), DBCS‐HOST, 

and Unicode UTF‐16BE. 

Converts TrueType and OpenType outline fonts to Postscript Type 1 or CID‐keyed fonts. 

Transforms TrueType, OpenType, and Postscript Type 1 outline fonts to AFP bitmap 

fonts in 240/300/360/480/600/720 dpi, encoding by ASCII, EBCDIC, DBCS‐PC(BIG5, 

GBK, HKSCS, KSC, SJIS), and DBCS‐HOST.  

Transforms legacy AFP bitmap fonts to AFP FOCA outline fonts, and Postscript Type 1 

outline fonts for AFP2PDF transformation. 

Instant views and edits AFP font bitmap patterns, outline contours, coded fonts, and 

codepages, as well as edits Postscript Type 1 and CID fonts. 

Adds and designs own double‐byte UDC (User Define Characters) characters. 

Exports AFP FOCA outline fonts as Postscript Type 1 or CID‐keyed fonts. 

Imports and transforms character bitmap images into outline glyphs. 

Fully compatible with IBM AFP codepages for ASCII, EBCDIC, DBCS‐HOST, and UTF‐

16BE. 

High‐performance font conversion and transformation with superior font quality and 

small font file size. 

 

    MakeAFP Font Converter Example:  

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

  

Page 45: AFP2PDF Transform User’s Guide

‐ 40 ‐ 

       MakeAFP Font Editor Example: 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 Refer to MakeAFP Fonter User’s Guide, for more about MakeAFP Fonter capabilities and 

features.

Page 46: AFP2PDF Transform User’s Guide

‐ 41 ‐ 

 

Chapter 8. AFP2PDF Application Programming Interfaces  

The AFP2PDF Transform Application Programming Interfaces (APIs) are written to 

interface with a C/C++, C# or Java application program, to quickly transform AFP 

documents from a file or memory buffer to PDF documents.  

This chapter describes the APIs for AFP2PDF Transform.   

AFP2PDF APIs Libraries and Examples  

AFP2PDF Transform APIs are available in the Dynamic Link Library, C/C++, C#, and 

Java programming examples are provided in the <install_path>/APIs path.   

AFP2PDF APIs Functions  

This section describes all supported functions of AFP2PDF APIs in detail.  

A2PCancelTransform Function 

Syntax:

void A2PCancelTransform( HANDLE hTransform ) // Handle returned by A2PInitTransform or // A2PInitTransStream function

This function cancels or stops the current AFP2PDF transforming task. 

A2PCloseTransform Function 

Syntax:

void A2PCloseTransform( HANDLE hTransform ) // Handle returned by A2PInitTransform or // A2PInitTransStream function

This function closes and releases the current AFP2PDF Transform handle. 

A2PGetError Function 

Syntax:

LPWSTR A2PGetError( HANDLE hTransform, // Handle returned by A2PInitTransform or // A2PInitTransStream function int nErrorIndex, // Index of errors, base 0

Page 47: AFP2PDF Transform User’s Guide

‐ 42 ‐ 

LPWSTR pszBuffer, // Address of buffer to retrieve the error // messages DWORD dwSize) // Specifies the maximum buffer size, in WCHARs

This function gets AFP2PDF warning or error messages. 

A2PGetErrorCount Function 

Syntax:

int A2PGetErrorCount( HANDLE hTransform) // Handle returned by A2PInitTransform or // A2PInitTransStream function

This function gets the count of AFP2PDF warning and error messages. 

A2PInitTransform Function 

Syntax:

HANDLE A2PInitTransform( LPCWSTR pszCmdArgs, // AFP2PDF command-line argument flags LPWSTR pszError) // Error messages, its buffer size recommended

// is above 1024

This function initializes the AFP2PDF Transform to read AFP from a file and returns an 

AFP2PDF Transform handle.   

You need to specify input AFP file/path & output PDF file/path, and other options by the  

command‐line flag parameters. Refer to Section AFP2PDF Command Syntax of Chapter 4. 

AFP2PDF Command for more information about AFP2PDF command‐line flag parameters 

supported. 

A2PInitTransStream Function 

Syntax:

HANDLE A2PInitTransStream( LPCWSTR pszCmdArgs, // AFP2PDF command-line argument flags

const char *InAFPBuffer, // Address of input AFP data stream buffer // *NOTE: While transforming, cannot release or free // the memory buffer

int nAFPBufSize, // Size of input AFP data stream const char **OutPDFBuffer, // Address of output PDF data stream buffer

// *NOTE: When splitting AFP data stream, use '-o' // command-line flag to specify the output PDF // directory, and OutPDFBuffer will return NULL

int * nOutPDFBufSize, // Pointer to the size of output PDF data stream LPWSTR pszError) // Error messages, recommended buffer size is above

// 1024

This function initializes the AFP2PDF Transform to read AFP from a file and returns an 

AFP2PDF Transform handle.   

It reads the input AFP stream from a memory buffer and writes the output PDF stream to 

a memory buffer, other options can be specified by the command‐line flag parameters. 

Refer to Section AFP2PDF Command Syntax of Chapter 4. AFP2PDF Command for more 

information about AFP2PDF command‐line flag parameters supported. 

Page 48: AFP2PDF Transform User’s Guide

‐ 43 ‐ 

A2PQueryState Function 

Syntax:

bool A2PQueryState( HANDLE hTransform, // Handle returned by A2PInitTransform or // A2PInitTransStream function TA2PStateInfo *pStateInfo) // AFP2PDF Transform state information

This function queries the current running state of AFP2PDF Transform.   

AFP2PDF transforming state and information available are:  typedef struct {

EA2PState eState; // Real-time state of the current AFP2PDF Transform WCHAR szSrcAFP[A2P_MAXPATH]; // Current source AFP filename WCHAR szDstPDF[A2P_MAXPATH]; // Current destination PDF file BYTE nProgress; // Current transforming progress of the source AFP // file, value range is [0-100] BYTE nTotalProgress; // Total progress was used while transforming // multiple AFP files

} TA2PStateInfo;

A2PStartTransform Function 

Syntax:

int A2PStartTransform( HANDLE hTransform) // Handle returned by A2PInitTransform or // A2PInitTransStream function

This function starts the AFP2PDF transforming task, and its valid returns codes are:    

Valid returns codes are:    0 – if successful

4 – if any warning

8 – if any error

12 – if any warning and error

AFP2PDF APIs for IBM Content Manager OnDemand  

APIs for IBM Content Manager OnDemand is provided and fully compatible. 

 

Refer to document Web Enablement Kit Implementation Guide of IBM Content Manager 

OnDemand, for more about IBM AFP2PDF APIs.  

Page 49: AFP2PDF Transform User’s Guide

‐ 44 ‐ 

 

Appendix A. PDF File Size Optimization  

One of the main objectives of AFP2PDF Transform is to produce the smallest file size of 

PDF documents and optimize them for online e‐Statement applications. AFP2PDF 

Transform offers a variety of options to optimize the fonts, images, and overlays 

resources.   

Relevant Factors of Image Resources  

      The size of an image object is determined by four factors:   

1. The pixel mass ‐ The total amount of pixels of an image, for instance, a 600 x 600 

dpi image has a total of 360,000 pixels.  

2. The color depth ‐ How many bits are required to describe 1 pixel, for instance, an 

RGB true‐color image requires 24 bits (3 bytes) per pixel, the grey‐scale image 

requires 8 bits  (1 byte), and monochrome image requires 1 bit, a 600 x 600 dpi RGB 

image requires therefore 600 x 600 x 3 bytes = 1.03 MB in uncompressed format.  

3. The compression algorithm ‐ An image can be compressed by a compression 

algorithm to reduce its file size. There are two types of compressions:   

a. Lossless ‐ Original image can be restored exactly, common lossless 

compressions are LZW, CCITT G3/G4, and new JBIG2 with the highest 

compression ratio for bi‐level images.  

b. Lossy ‐ Compression algorithm modifies the pixels, the original image can 

not be restored from the compressed version. It is typically applied to the 

photographic type images with which the human eyes cannot distinguish 

whether the image was modified. AFP2PDF Transform enables you to either 

use Mozilla improved MOZJPEG, JPEG, or JPEG2000 image compression to 

achieve a high compression ratio yet with good quality.   

4. The complexity of the image contents – Basically the compression ratio of a simple 

image should be much better than a photo‐type complex image.   

Relevant Factors of Font Resources   

The size of a font object is determined by three factors:   

1. Font Embedding ‐ Fonts in PDF can either be embedded as the font object 

resources or not. If a font is not embedded inline in PDF, then the PDF 

viewer/reader has to select an equivalent from the system installed available fonts.  

2. Text Encoding ‐ An embedded font that contains the Latin glyphs may have a size 

Page 50: AFP2PDF Transform User’s Guide

‐ 45 ‐ 

up to 50 KB, and much larger if it contains a large Unicode range (e.g. East Asian 

Chinese, Japanese and Korean Characters). 

3. Font Type – Embed fonts in OpenType PS format is recommended, OpenType PS 

font file size can be considerably smaller than TrueType font, usually is about 15% 

to 50% smaller.  

MakeAFP offers free font transformation services for AFP2PDF users, from the 

TrueType/OpenType fonts to OpenType PS fonts, to help users to reduce their PDF 

file size.   

Optimize Font Resource Size  

AFP2PDF Transform offers the following capabilities to optimize the font resources:  

1. OpenType/TrueType/TrueType Collection/Type‐3 Font sub‐setting only embeds 

the glyphs that are required to render the characters that are used in the PDF 

document.  

2. Able to control whether to embed fonts or not. 

3. Use Normal style fonts as the Bold/Italic style fonts, to reduce the number of fonts 

to be embedded. 

4. Supports the following 14 standard non‐embed PDF fonts: 

 

Family name  Full name  PostScript name 

 Courier  

 Courier 

 Courier 

 Courier 

Courier 

Courier Bold 

Courier Oblique 

Courier Bold Oblique 

Courier 

Courier‐Bold 

Courier‐Oblique 

Courier‐BoldOblique 

 Helvetica 

 Helvetica 

 Helvetica 

 Helvetica 

Helvetica 

Helvetica Bold 

Helvetica Oblique 

Helvetica Bold Oblique 

Helvetica 

Helvetica‐Bold 

Helvetica‐Oblique 

Helvetica‐BoldOblique 

 Times 

 Times 

 Times 

 Times 

Times Roman 

Times Bold 

Times Italic 

Times Bold Italic 

Times‐Roman 

Times‐Bold 

Times‐Italic 

Times‐BoldItalic 

 Symbol  Symbol  Symbol 

 ZapfDingbats  ZapfDingbats  ZapfDingbats  

 

Above PDF 14 standard fonts are always supported by the Adobe PDF readers and 

most popular PDF viewers/readers, regardless of whether theyʹre embedded or not. 

Page 51: AFP2PDF Transform User’s Guide

‐ 46 ‐ 

 

Appendix B. AFP Resources Basic Concepts  

This Appendix provides some additional overview information on AFP resources, such 

as the AFP fonts, overlays, AFP page segments, and data‐object resources of GIF, JPEG, 

, TIFF and OpenType(OTF)/TrueType(TTF)/TrueType Collection(TTC) fonts.  PDF      

OpenType/TrueType Fonts  

The latest AFP systems have supported using OTF/TTF/TTC fonts directly in the AFP 

systems and IPDS printers.   

With your new generation of AFP systems, using OTF/TTF/TTC fonts directly is strongly 

recommended. The new support for the OTF/TTF/TTC font technologies in AFP provides 

you with significant benefits of:  

Much more choices and flexibility for typefaces, particularly non‐Latin typefaces.   

A truly worldwide multilingual presentation environment through the support of     

Unicode.  

Supporting data encoding directly not only in Unicode UTF‐8, and UTF‐16 but also legacy ASCII/EBCDIC/DBCS.  

 

Migration towards a single font technology across all presentation environments.    

Much better font loading and processing performance on the new generation of        

IPDS controller.  

A much lower cost for typefaces and straightforward to use them at ease.    

Avoid the font copyright issues for such font conversion from OTF/TTF/TTC      font formats to AFP FOCA raster or outline font formats.  

 

AFP2PDF can import the OTF/TTF/TTC fonts from:  

1. The local OTF/TTF/TTC font libraries, which are recommended for better 

performance. 

2. The AFP file that embedded with inline OTF/TTF/TTC font resources.  

 

AFP2PDF can sub‐setting the OTF/TTF/TTC fonts embedded within the PDF output 

documents.  

AFP FOCA Fonts  

An AFP font is a collection of graphic characters of a given size and style which is used 

to present text. An AFP font can be ASCII, EBCDIC, DBCS‐PC (GBK, BIG5, SJIS, KSC), 

Page 52: AFP2PDF Transform User’s Guide

‐ 47 ‐ 

DBCS‐HOST, and UNICODE encoded. An AFP font is composed of 3 font‐member 

types:  

A coded font member associates a code page and a font character set as a pair. A 

single‐byte‐coded font contains 1 code page and font character‐set pair. A 

double‐byte raster coded‐font, which requires 2 bytes to identify each graphic 

character, contains 2 or more code page and font character‐set pairs; each pair is 

called a font section. A double‐byte outline font contains 1 code page and font‐

character‐set pair.   

A code page member associates a code point and a graphic character identifier 

for each graphic character supported by the code page and specifies how code 

points that are not valid are to be processed.   

A font character set member contains a graphic character identifier and a raster 

pattern or outline vector information for each graphic character in the font or 

font section, as well as information about how the characters are to be printed.  

See Append B. AFP Font Basic Concepts for more information about AFP FOCA fonts.  

AFP2PDF supports AFP FOCA fonts either from the AFP resource libraries directly or 

from the AFP document embedded with the AFP FOCA inline fonts.  

With AFP2PDF, you can substitute the legacy AFP fonts with OTF/TTF/TTC fonts, to 

achieve a better quality of PDF document with smaller file size, however, AFP FOCA 

fonts are still required by AFP2PDF, so that the AFP FOCA font width and height 

information can be parsed by AFP2PDF for the precise control the PDF texts fidelity.    

When AFP2PDF finds more than one AFP font with the same base‐filename in an AFP 

font resource directory, it selects the matching AFP font by the following file extension 

search order: 

 

Resource Type  Filename Extension Search Order 

AFP Character Set 

No extension, OLN, 600, 480, 360, 300, 

CHS, FONTOLN, FONT240, FONT300, 

FONT38PP 

AFP Coded Page  ECP, No extension, CDP 

AFP Coded Font  No extension, CDF, CFT 

 AFP2PDF supports new AFP Extended Code Pages (ECP), in which we can define 

additional information for the legacy code points to be mapped with Unicode scalar 

values. 

AFP Page Segments  

AFP page segments are the image objects in AFP IOCA image formats, make sure they 

are available on your AFP2PDF resource libraries or embedded inline within AFP 

documents.  

AFP2PDF supports AFP IOCA images in FS10, FS11 formats for monochrome images, 

FS42 and FS45 formats for color images.  

Page 53: AFP2PDF Transform User’s Guide

‐ 48 ‐ 

When AFP2PDF finds more than one page‐segment with the same base‐filename in a 

resource directory, it selects the matching page‐segment by the following file extension 

search order:   

Resource Type  Filename Extension Search Order 

AFP Page Segment No extension, PSG, PSE, PSEG38PP, 

AFP, 600, 480, 360, 300, 240  

Data‐object Container Resources  

GIF, EPS, JPEG, PDF, TIFF, and AFP page‐segment can be used in the latest AFP systems 

directly as the data‐object container resources. Using a data‐object container as an object 

resource is more efficient when that object appears more than once in an AFP document.   

When AFP2PDF finds more than one data‐object with the same traditional base‐filename 

in a directory, it selects the matching data‐object by the following file extension search 

order:   

 

Resource Type  Filename Extension Search Order 

AFP Page Segment No extension, PSG, PSE, PSEG38PP, 

AFP, 600, 480, 360, 300, 240 

GIF  GIF, OBJ, No extension 

JPEG  JPG, JPEG, OBJ, No extension 

PDF  PDF, OBJ, No extension 

TIFF  TIF, TIFF, OBJ, No extension  

 

AFP Overlays  

AFP overlays are the collections of coded information describing the elements of boxes, 

lines, shading, text, logos, and graphics on forms. When printed with variable data from 

AFP applications, overlays can replace the needs for the pre‐printed forms.   

Make sure AFP overlays available on your AFP2PDF resource libraries or embedded 

inline within AFP documents.  

When AFP2PDF finds more than one overlay with the same base‐filename in a resource 

directory, it selects the matching overlay by the following file extension search order: 

 

Resource Type  Filename Extension Search Order 

AFP Overlay No extension, OVL, OLY, OVR, 

OVLY38PP, AFP  

Page 54: AFP2PDF Transform User’s Guide

‐ 49 ‐ 

Transferring AFP Files and Resources  

Make sure FTP is in binary mode if you need to transfer AFP files and resources across 

multi‐platforms.  

Page 55: AFP2PDF Transform User’s Guide

 

Appendix C. AFP Font Basic Concepts  

This appendix introduces some basic AFP font terminology, structure, and how 

characters are represented in digitized presentation types.  

AFP Font Structure   

In AFP font terminology, an AFP font has three components:    

Coded font   

Character set    Codepage  

 

 

 

 

 

 

 

Coded Font  

AFP coded‐font is a font file that associates the AFP character set with AFP codepage.   

A bitmap coded font consists of two parts:    

References to specific character sets  References to specific codepages 

 

An outline coded font consists of three parts:    

References to specific character sets  References to specific codepages  References to point size 

Character Set  

AFP character set consists of a finite set of characters. It contains information about a 

font type family, typeface, and point size, and also includes each characterʹs properties 

and its printing attributes, such as baseline positioning, rotation, ascenders, descenders, 

etc.          

‐ 50 ‐ 

Page 56: AFP2PDF Transform User’s Guide

‐ 51 ‐ 

  

Characters  

Characters are the letters, numerals, marks, and symbols of a font. 

 

Character Properties  

Character properties detail how a character is positioned relative to the characters 

around it. Some character properties include the following:    The baseline of a character showing its general alignment 

  The dimensions of space in which the character is printed  

The position of the character within that space  

The identifier of the character (the character ID)   

One of the character properties is the character ID, named GCGID (graphic character 

global identifier). Each character is assigned a unique 8‐character GCGID; for instance, 

the character uppercase A is assigned the GCGID LA020000 registered by IBM.  

For a list of GCGIDs, each character represents, and the codepages where the characters 

are found, refer to IBM AFP Fonts: Technical Reference for Codepages (S544‐3802‐02).  

Printing Attributes   The printing attributes define how the character set will be printed, such as baseline 

positioning, rotation, ascenders, descenders, and point size, etc. 

 

Single‐byte and Double‐byte Character Sets  

A single‐byte character set (SBCS) is a font character set to be used with a single‐byte 

odepage. The maximum number of characters in a character set is 256. c A double‐byte AFP bitmap font consists of multiple sections of double‐byte character 

sets (DBCS), to be used with CJK (Chinese, Japanese, Korean).  

 

Bitmap Format of Character Set  

AFP font character sets in bitmap format can be in 240/300/600 dpi, some printers and 

AFP print servers may support character sets in 360/480/720 dpi also. The character 

positioning values in the bitmap character set can be expressed in either fixed‐metric or 

relative‐metric.   

Outline Format of Character Set  

AFP outline character sets can be in SBCS outline format (by Adobe Postscript Type 1 

outline font encapsulated in AFP font architecture wrappers), or DBCS outline format (by 

Adobe Postscript CID‐keyed outlines font encapsulated in AFP font architecture 

wrappers). The character positioning values in the outline character set are expressed in 

relative‐metric.  

Codepage  

AFP codepage maps each character of text to the characters in an AFP character set. As 

you enter your text on your keyboard, each key in character is translated into a 

hexadecimal code point. When the text is printed, each hexadecimal code point is 

Page 57: AFP2PDF Transform User’s Guide

‐ 52 ‐ 

matched to a GCGID on the AFP codepage you specified. The GCGID is then matched to 

the AFP bitmap pattern or outline vector pattern of the character in the AFP character set 

you specified. The character pattern in the character set is being finally used for the 

printing of your character.  

The following picture shows an example with AFP EBCDIC codepage T1V10037 for IBM 

mainframe USA English.   

When the IPDS printer receives EBCDIC hexadecimal code point C1, it prints an 

uppercase A, whose GCGID is LA020000. 

                   

 

 

An SBCS codepage contains up to 256 one‐byte code points. SBCS codepages are good 

enough for languages with alphabetic writing systems, such as English, Latin, Greek, 

Thai, and Arabic, etc.  

A DBCS codepage can contain up to 65536 double‐byte code points for CJK (Chinese, 

Japanese and Korean) languages.   

For bitmap DBCS AFP fonts, AFP treats DBCS codepage as a collection of single‐byte 

codepages, a double‐byte is split into two parts, the first byte indicating the section 

number of the codepage and the second byte indicating a code point within the section.  

For outline DBCS AFP fonts, AFP treats DBCS codepage as a single large codepage. 

Each DBCS character has a 2‐byte code point.  

New AFP Extended Code Pages (ECP) have been adopted in the latest AFP systems, in 

which we can define the additional information for the legacy code points to be mapped 

with Unicode scalar values. ECP gives us a convenient way to map the legacy code 

points of User Define Characters (UDC) with Unicode scalar values.  

AFP Font Naming Convention  

Each AFP component’s name is only allowed up to 8 characters. The following list shows 

the prefix of the AFP font naming convention and the type of font component represents.  

Page 58: AFP2PDF Transform User’s Guide

‐ 53 ‐ 

 

AFP Font Name 

Prefix Font Component 

C0  Character‐set of AFP bitmap font 

CZ  Character‐set of AFP outline font 

T1  AFP codepage 

X0  Coded font of AFP bitmap font 

XZ  Coded font of AFP outline font 

Page 59: AFP2PDF Transform User’s Guide

‐ 54 ‐ 

Appendix D. ASCII/EBCDIC AFP Codepages Summary 

Name Description CPGID Encoding

T1000038 US-ASCII Character Set 38 EBCDIC

T1000259 Symbols, Set 7 259 EBCDIC

T1000260 Canadian French - 116 260 EBCDIC

T1000276 Canada (French) - 94 276 EBCDIC

T1000286 Austria/Germany F.R., Alt (3270) 286 EBCDIC

T1000287 Denmark/Norway, Alternate (3270) 287 EBCDIC

T1000288 Finland/Sweden, Alternate (3270) 288 EBCDIC

T1000289 Spain, Alternate (3270) 289 EBCDIC

T1000290 Japan (Katakana) 290 EBCDIC

T1000293 APL (USA) 293 EBCDIC

T1000310 Graphic Escape APL/TN 310 EBCDIC

T1000361 International Set 5 361 EBCDIC

T1000363 Symbols, Set 8 363 EBCDIC

T1000367 ASCII 367 ASCII

T1000382 Austria, Germany, Japan 382 EBCDIC

T1000383 Belgium 383 EBCDIC

T1000384 Brazil 384 EBCDIC

T1000385 Canada (French) 385 EBCDIC

T1000386 Denmark/Norway 386 EBCDIC

T1000387 Sweden/Finland 387 EBCDIC

T1000388 France, Japan 388 EBCDIC

T1000389 ITALY, Japan (Italian) 389 EBCDIC

T1000390 Japan (Latin) 390 EBCDIC

T1000391 Portugal 391 EBCDIC

T1000392 Spain/Philippines 392 EBCDIC

T1000393 Latin America (Spanish) 393 EBCDIC

T1000394 U.K., Austral., IRE., H.K., N.Z. 394 EBCDIC

T1000395 United States, Canada (English) 395 EBCDIC

T1000420 Arabic Bilingual 420 EBCDIC

T1000423 Greece - 183 423 EBCDIC

T1000424 Israel (Hebrew) 424 EBCDIC

T1000437 Personal Computer 437 ASCII

T1000803 Hebrew Character Set A 803 EBCDIC

T1000808 PC, Cyrillic, Russian with euro 808 ASCII

T1000813 Greece - ISO/ASCII 8-Bit 813 ASCII

T1000819 Latin1 ISO/ANSI 8-BIT 819 ASCII

T1000829 Math Symbols 829 EBCDIC

T1000836 Peoples Republic of China (PRC) 836 EBCDIC

T1000838 Thai - EBCDIC 838 EBCDIC

T1000848 PC, Cyrillic, Ukraine with Euro 848 ASCII

T1U00849 PC, Cyrillic, Belo Russian Euro 849 ASCII

T1000850 PC Multilingual 850 ASCII

T1000851 Greek - Personal Computer 851 ASCII

T1000852 Latin2 Multilingual PC 852 ASCII

Page 60: AFP2PDF Transform User’s Guide

‐ 55 ‐ 

T1000853 Latin3 Personal Computer 853 ASCII

T1000855 Cyrillic - Personal Computer 855 ASCII

T1000856 Hebrew - Personal Computer 856 ASCII

T1000857 Latin5 PC 857 ASCII

T1000858 PC - Multilingual with euro 858 ASCII

T1000860 Portugal - Personal Computer 860 ASCII

T1000861 Iceland - Personal Computer 861 ASCII

T1000862 Hebrew - Personal Computer 862 ASCII

T1000863 Canadian French - PC 863 ASCII

T1000864 Arabic - Personal Computer 864 ASCII

T1000865 Nordic - Personal Computer 865 ASCII

T1000866 Cyrillic #2 - Personal Computer 866 ASCII

T1000867 Israel - Personal Computer 867 ASCII

T1000869 Greece - Personal Computer 869 ASCII

T1000870 Latin2 Multilingual 870 EBCDIC

T1000872 Cyrillic PC with Euro 872 ASCII

T1000874 Thai - Personal Computer 874 ASCII

T1000875 Greece 875 EBCDIC

T1000876 OCR-A ASCII 876 ASCII

T1000877 OCR-B ASCII 877 ASCII

T1000880 Cyrillic Multilingual 880 EBCDIC

T1000889 Thailand 889 EBCDIC

T1000892 OCR - A 892 EBCDIC

T1000893 OCR - B 893 EBCDIC

T1000897 Japan PC #1 897 ASCII

T1000899 Symbols, Set 7 ASCII 899 ASCII

T1000901 PC, Baltic - Multilingual w Euro 901 ASCII

T1000902 8-bit Estonia with euro 902 ASCII

T1000903 Peoples Republic of China - PC 903 ASCII

T1000904 Republic of China (ROC) - PC 904 ASCII

T1000905 Latin3 Multilingual 905 EBCDIC

T1000910 APL ASCII 910 ASCII

T1000912 Latin2 ISO/ANSI 8-BIT 912 ASCII

T1000913 Latin 3, ISO/ASCII 913 ASCII

T1000914 Latin4 ISO/ANSI 8-BIT 914 ASCII

T1000915 Cyrillic ISO/ASCII 8-Bit 915 ASCII

T1000916 Hebrew ISO/ASCII 8-Bit 916 ASCII

T1000920 Latin5 ISO/ANSI 8-BIT 920 ASCII

T1000921 PC, Baltic - Multilingual 921 ASCII

T1000922 Estonia PC 922 ASCII

T1000923 Latin 9 923 ASCII

T1000924 Latin 9 EBCDIC 924 EBCDIC

T1001002 DCF REL 2 Compatibility 1002 EBCDIC

T1001003 U.S. Text Subset 1003 EBCDIC

T1001004 IBM PC Desktop Publishing 1004 ASCII

T1001008 Arabic ISO/ASCII 8-Bit 1008 ASCII

T1001025 Cyrillic Multilingual 1025 EBCDIC

T1001026 Latin5 1026 EBCDIC

T1001027 Japanese (Latin) Extended 1027 EBCDIC

T1001028 Hebrew Publishing 1028 EBCDIC

T1001029 Arabic Extended ISO/ACSII 8-Bit 1029 ASCII

T1001032 MICR, E13-B Combined 1032 EBCDIC

T1001033 MICR, CMC-7 Combined 1033 EBCDIC

T1001038 Symbols, Adobe ASCII 1038 ASCII

T1001039 GML List Symbols 1039 EBCDIC

T1001041 Japanese Extended - PC 1041 ASCII

T1001042 Simplified Chinese Extended - PC 1042 ASCII

Page 61: AFP2PDF Transform User’s Guide

‐ 56 ‐ 

T1001043 Traditional Chinese Extended PC 1043 ASCII

T1001046 Arabic Extended ISO/ASCII 8-Bit 1046 ASCII

T1001068 Text With Numeric Spacing 1068 EBCDIC

T1001069 Latin4 EBCDIC 1069 EBCDIC

T1001087 Symbols, Adobe 1087 EBCDIC

T1001091 Symbol Set 7, Modified 1091 EBCDIC

T1001092 Symbol Set 7, Modified - PC 1092 ASCII

T1001093 IBM LOGO 1093 EBCDIC

T1001110 Latin2 Multilingual 1110 EBCDIC

T1001111 Latin2 ISO/ANSI 8-BIT 1111 ASCII

T1001112 Baltic - Multilingual, EBCDIC 1112 EBCDIC

T1001122 Estonia, EBCDIC 1122 EBCDIC

T1001123 Cyrillic, Ukraine EBCDIC 1123 EBCDIC

T1001124 Cyrillic, Ukraine ISO-8 1124 ASCII

T1001125 PC, Cyrillic Ukrainian 1125 ASCII

T1001129 Vietnamese ISO-8 1129 ASCII

T1001130 Vietnamese EBCDIC 1130 EBCDIC

T1001131 PC, Cyrillic, Belo Russian 1131 ASCII

T1001132 Lao EBCDIC 1132 EBCDIC

T1001133 Lao ISO-8 1133 ASCII

T1001139 Japan Alphanumeric Katakana 1139 ASCII

T1001140 USA, Canada ECECP 1140 EBCDIC

T1001141 Austria, Germany ECECP 1141 EBCDIC

T1001142 Denmark, Norway ECECP 1142 EBCDIC

T1001143 Finland, Sweden ECECP 1143 EBCDIC

T1001144 Italy ECECP 1144 EBCDIC

T1001145 Spain, Latin America ECECP 1145 EBCDIC

T1001146 UK ECECP 1146 EBCDIC

T1001147 France ECECP 1147 EBCDIC

T1001148 International ECECP 1148 EBCDIC

T1001149 Iceland ECECP 1149 EBCDIC

T1001153 Latin2 Multilingual with Euro 1153 EBCDIC

T1001254 Windows Turkish 1254 ASCII

T1001257 Windows Baltic Rim 1257 ASCII

T1001258 Windows Vietnamese 1258 ASCII

T1001275 Apple Latin 1 1275 ASCII

T1001276 Adobe PS Standard 1276 ASCII

T1001277 Adobe PS ISO Latin 1 1277 ASCII

T1001280 Apple Greece 1280 ASCII

T1001281 Apple Turkey 1281 ASCII

T1001282 Apple Central Europe 1282 ASCII

T1001283 Apple Cyrillic 1283 ASCII

T1001300 GENERIC BAR CODE/OCR-B 1300 EBCDIC

T1005346 Latin 2 – Windows 1250 ASCII

T1005347 Cyrillic – Windows 1251 ASCII

T1005348 Latin 1 – Windows 1252 ASCII

T1005349 Greece – Windows 1253 ASCII

T1005350 Turkey – Windows 1254 ASCII

T1005351 Israel – Windows 1255 ASCII

T1005352 Arabic – Windows 1256 ASCII

T1005353 Latin 4 – Windows 1257 ASCII

T1005354 Vietnamese – Windows 1258 ASCII

T1V10037 USA/Canada - CECP 37 EBCDIC

T1V10273 Germany F.R./Austria- CECP 273 EBCDIC

T1V10274 Belgium - CECP 274 EBCDIC

T1V10275 Brazil - CECP 275 EBCDIC

Page 63: AFP2PDF Transform User’s Guide

‐ 58 ‐ 

Appendix E. SBCS/DBCS/UTF‐16BE AFP Codepages Summary  

  Name  Description  Encoding 

T1H00037 Traditional Chinese EBCDIC EBCDIC

T1H00290 Japanese Katakana Extended EBCDIC

T1H00833 Korean EBCDIC EBCDIC

T1H00836 Simplified Chinese EBCDIC EBCDIC

T1H01002 Japanese DCF Rel 2 Compatibility EBCDIC

T1H01027 Japanese Latin Extended EBCDIC

T1H01030 Japanese Katakana Extended with Box Characters

EBCDIC

T1H01031 Japanese Latin Extended with Box Characters EBCDIC

T1H01041 Japanese PC Extended ASCII

T1H01043 Traditional Chinese PC ASCII

T1H01114 Traditional Chinese PC BIG5 with Euro ASCII

T1H01115 Simplified Chinese PC (GB) ASCII

T1H01126 Korean PC ASCII

T1H01150 Korean EBCDIC with Box Characters EBCDIC

T1H01151 Simplified Chinese EBCDIC with Box Characters

EBCDIC

T1H01152 Traditional Chinese EBCDIC with Box Characters

EBCDIC

T1H01159 Traditional Chinese EBCDIC with Euro EBCDIC

T1H01252 Simplified Chinese PC (GB18030) ASCII

T1HK0037 Japanese English EBCDIC

T1HK0290 Japanese Katakana EBCDIC

T10300, T1I300, T1J300, T1K300

Japanese DBCS-HOST DBCS-HOST

T10834 Korean DBCS-HOST (Small Set) DBCS-HOST

T10835 Traditional Chinese DBCS-HOST DBCS-HOST

T10837 Simplified Chinese DBCS-HOST (GB2312) DBCS-HOST

T10941 Japanese SJIS-PC DBCS-PC

T10947 Traditional Chinese BIG5-PC DBCS-PC

T10951 Korean KSC-PC (Small Set) DBCS-PC

T11200 Unicode UTF-16 Big-endian UTF-16BE

T11362 Korean KSC-PC (Big Set) DBCS-PC

T11374 Traditional Chinese HKSCS-PC DBCS-PC

T11376 Traditional Chinese HKSCS-HOST DBCS-HOST

T11380 Simplified Chinese GB2312-PC (Small Set) DBCS-PC

T11385 Simplified Chinese GBK-PC (Big Set) DBCS-PC

T1K834 Korean DBCS-HOST (Big Set) DBCS-HOST

T1K837 Simplified Chinese DBCS-HOST (GB18030) DBCS-HOST

Page 64: AFP2PDF Transform User’s Guide

MakeAFP