Afp2pdf User Guide
Afp2pdf User Guide
Internet
Visit our home page: http://www.infoprint.com
iii
iv Ricoh AFP2PDF Transform: Planning and Installing
Figures
1. Example of a coded.fnt file . . . . . . . 28 17. Example of an image added to PDF output 48
2. CHARSET section of csdef.fnt file . . . . . 29 18. Example of stored images in image map
3. FGID section of csdef.fnt file . . . . . . . 30 configuration file. . . . . . . . . . . 48
4. CODEPG section of cpdef.fnt file . . . . . 31 19. File structure for AFP2PDF Transform APIs on
5. Code page map file example . . . . . . . 33 Windows servers. . . . . . . . . . . 50
6. Alias file example . . . . . . . . . . 33 20. File structure for AFP2PDF Transform APIs on
7. Font mapping file example . . . . . . . 36 UNIX servers . . . . . . . . . . . . 50
8. Transform options file example . . . . . . 36 21. Example of loading a Windows API DLL 51
9. Custom font metric files defined in the alias.fnt 22. Example of obtaining the function pointer to
file . . . . . . . . . . . . . . . 38 the API options in Windows . . . . . . . 51
10. Example of a custom font metric file . . . . 39 23. Example of loading an API shared library on
11. Image information in the image map AIX . . . . . . . . . . . . . . . 52
configuration file. . . . . . . . . . . 42 24. Example of loading an API shared library on
12. Empty entries in the image map configuration Linux and Sun . . . . . . . . . . . 52
file . . . . . . . . . . . . . . . 43 25. Example of loading an API shared library on
13. Example of existing images in the image map z/OS UNIX System Services . . . . . . . 52
configuration file. . . . . . . . . . . 44 26. Example of obtaining the function pointer to
14. Example of abbreviated image entries in the API options on AIX . . . . . . . . . . 53
image map configuration file. . . . . . . 44 27. Example of obtaining the function pointer to
15. Example of colored areas in the image map API options on Linux and Sun . . . . . . 53
configuration file. . . . . . . . . . . 46 28. Example of obtaining the function pointer to
16. Example of abbreviated colored areas in the API options on z/OS UNIX System Services . 53
image map configuration file. . . . . . . 46 29. Input options structure. . . . . . . . . 54
v
vi Ricoh AFP2PDF Transform: Planning and Installing
Tables
1. Font files and subdirectories . . . . . . . 27 4. Attribute Values for FGID . . . . . . . . 30
2. Coded font files . . . . . . . . . . . 28 5. CODEPG attributes . . . . . . . . . . 31
3. Attribute values for CHARSET . . . . . . 29 6. Defined values for the Flags parameter 38
vii
viii Ricoh AFP2PDF Transform: Planning and Installing
About this publication
This publication provides information about using Ricoh® AFP2PDF Transform.
This publication helps you:
v Plan for transforming data from Advanced Function Presentation™ (AFP™)
format to Adobe® Acrobat Portable Document Format (PDF).
v Install and configure AFP2PDF Transform.
v Map fonts and images.
v Use application programming interfaces (APIs).
The information in this publication is for system programmers who install and
configure Ricoh AFP2PDF Transform, and for operators who use Ricoh AFP2PDF
Transform. This publication assumes that you are experienced using Microsoft®
Windows®, UNIX® systems, or the OnDemand applications of IBM® DB2® Content
Manager.
ix
Related information
For information about the Ricoh Line2PDF Transform, see Ricoh Line2PDF
Transform: Planning and Installing, G550-20213.
For information about Ricoh printing products, see this Web site:
www.infoprint.com
Benefits
AFP2PDF Transform gives you these added benefits:
v Reduce costs associated with printing and mailing by delivering documents
electronically.
v Quickly retrieve your information within multi-page documents using Adobe
Acrobat search and navigation features.
v Print AFP2PDF Transform documents on any local printer using the print
function in Adobe Acrobat.
v Increase control over your information with an added layer of security and
encryption. Define an owner to control modification, copying and printing;
define end-user passwords to control document access; and add a digital
signature to provide more security.
Limitations
The current limitations with AFP2PDF Transform include:
v AFP input files and PDF output files larger than 2 gigabyte (GB) are not
supported.
v The following set of bar codes are generated in the output PDF when using the
Bar Code Object Content Architecture™ (BCOCA™) in AFP data. Any other bar
codes are ignored during conversion.
– Codabar, 2-of-7, AIM USS-Codabar
– Code 39 (3-of-9 Code), AIM USS-39
– Code 128, AIM USS-128
– Data Matrix
– Interleaved 2-of-5, AIM USS-I 2/5
– Japan Postal Bar Code
– PDF417
1
– POSTNET
– QR code
– USPS Four-State - Intelligent Mail Barcode (IMB)
v When AFP data formatted for N-up partitioning is encountered, the multiple
partitions that make up the physical AFP page are converted to separate pages
in the PDF file.
v Only limited support is available for object containers with TIFF and JFIF image
formats.
v Color management resource (CMR) information contained in AFP resources is
ignored.
v Unicode Complex Text, such as bidirectional layout processing and glyph
processing, is not supported.
v TrueType font collections, linked TrueType fonts, and the use of a Resource
Access Table (RAT) are not supported.
If you plan to use the transform in conjunction with the IBM DB2 Content
Manager OnDemand Web Enablement Kit, install the AFP2PDF Transform on the
same workstation or server.
Note: An AFP2PDF Transform license lets you install the program on a single
server.
where xxx is the version number and yyy indicates the server ID of the
program. For example, afp2pdf_v400_AIX.tar.Z is the name of the AFP2PDF
Transform with a version number of “400” and a server ID of “AIX”. The
server IDs are:
v AIX for IBM AIX
3
v HPUX for HP-UX
v LINUX for Linux-i386
v SUN for Sun Solaris
v USS for IBM z/OS UNIX System Services
5. Uncompress and unpack the file in the directory of your choice, but retain the
directory structure as you uncompress the file. (There should be a /font
subdirectory created in the install directory).
6. Set the permissions so the process that runs AFP2PDF Transform can read from
the directory in which the program is installed. For example, an AIX server is
usually set up to run the process with the user ID of “nobody”. Because this
user ID has minimal privileges, verify that the permissions allow files to be
read from the directory where the program is installed.
7. Run license/syskeysinit to start the trial license.
8. To test that AFP2PDF Transform has installed successfully, see “Testing the
installation” on page 5.
Note: The directory and file examples in this chapter are specified for the
Windows environment. To use these examples in a UNIX environment, use
the UNIX file naming convention for any file name. For example,
\font\maps in Windows is /font/maps in a UNIX environment, or the input
AFP file c:\documents\afpdoc.afp in Windows would be
/documents/afpdoc.afp in a UNIX environment.
Syntax
Only a portion of the parameters needed to control the AFP2PDF Transform are
available with the command. The other parameters are specified in an options file.
By default, this file is named a2pxopts.cfg and must reside in the same directory
as the program module. See “AFP2PDF Transform options file” on page 9 for more
information about the options file.
Parameters
-a codes
When used with an owner password (-e pw), specifies which PDF display
functions are restricted. The codes for the display functions, which can be used
in any order, are:
a Add or modify text annotations and interactive form fields.
c Modify the document contents.
p Print the document.
s Copy text and graphics from the document.
-e pw
Specifies an alphanumeric password that gives permission to change document
security settings (also known as a master or owner password). For example, if
the printing function in the PDF display has been restricted (-a p), you must
supply a password to override the setting.
7
-f def
Specifies the fully qualified file name of the form definition resource that is
used when transforming an AFP file. For example:
afp2pdf -f c:\mydirectory\myformdef.fde afpfile.afp
-g (YYYYMMDDHHmmSSOHH'mm')
Sets a time stamp for when the document was created, where:
v YYYY is the year
v MM is the month
v DD is the day (01-31)
v HH is the hour (00-23)
v mm is the minute (00-59)
v SS is the second (00-59)
v O is the relationship of local time to Universal Time (UT), denoted by one of
the characters +, -, or Z
v HH is the absolute value of the offset from UT in hours (00-23)
v mm is the absolute value of the offset from UT in minutes (00-59)
For example, December 23, 1998, at 7:52 PM, U.S. Pacific Standard Time, is
represented by the string: 19981223195200-08'00'.
-i optfile
Specifies the location and name of the transform options file that is different
from the default. This file name should not use relative paths and should be
fully qualified. See “AFP2PDF Transform options file” on page 9 for more
information about the options file.
-l Turns off all of the generated error and informational console messages and
sends them to the afp2pdf.err log file.
-m Generates a linearized PDF file which reorganizes the data for more efficient
processing in a network environment. Also known as Fast Web View PDF
documents, files generated with this parameter make it possible to view very
large documents without long download delays. To use this parameter, verify
that the Web server or Web application sending this PDF data over the
network provides the page-by-page downloading or "byte-serving" function.
-n fontpath
Specifies the location of the font definition files needed by the transform. This
parameter should be used if the font files are not located in the \font
subdirectory where the transform modules were installed.
-o outfile
Specifies the location and file name of the output PDF file that is different from
the default output file, which has the same location and name as the input file,
but with a file extension of “.pdf”. For example, when the PDF is generated
from an AFP file named afpdoc.afp, a file named afpdoc.pdf is created. You
can use this parameter to put the output file in a different directory than the
input file or give it a different file name.
-p page_no
Specifies the page number that is to be transformed in the AFP document. If
the specified page number does not fall within the document page range, the
first page in the document is transformed.
-r resfile
Specifies the fully qualified file name of the AFP resource group file to be used
when transforming the AFP file. For example:
Return codes
When the afp2pdf command runs, you see one of these return code values:
0 Successful completion of the transform.
Nonzero
An error has occurred.
If running the transform function from the API, you can locate the options file in
any directory on the system and you can use any file name. By setting the
Chapter 3. Configuration 9
szOptionsFile option in the structure passed to the transform function, different
options files can be specified for different types of documents.
Notes:
1. Parameters in the options file must be specified on separate lines and have the
format “parameter=value”. For example:
Disable_Compression=True
Auto_Rotate=True
2. Variable text should be enclosed in double quotes if the value contains blanks.
For example: Subject="Advanced Function Presentation".
3. Parameters and values are not case-sensitive.
4. Lines starting with a semicolon (;) or a pound (#) character are comments.
Chapter 3. Configuration 11
cache_directory
Specifies the fully qualified path to a directory that is used for certificate
storage. This is an optional value that can be used to improve the
performance of the conversion.
Color=afpname,red,green,blue
Specifies the RGB value color setting that overrides the display of named color
values in the AFP OCA (graphics objects), where:
afpname
Specifies one of these colors defined in AFP: BLUE, BROWN, CYAN,
DARKBLUE, DARKCYAN, DARKGREEN, DARKGREY, DARKYELLOW,
GREEN, GREY, HIGHLIGHT0, HIGHLIGHT1, HIGHLIGHT2,
HIGHLIGHT3, MAGENTA, MUSTARD, ORANGE, PURPLE, RED, WHITE,
YELLOW.
red
green
blue
Specifies the RGB value settings in the range of 0 to 255.
For example, the AFP named color BLUE is changed to a light gray color with
these values:
Color=BLUE,220,220,220
Compression_Level=n
Specifies the compression level of the Flate compression used in the PDF file,
where n is 0 to 9. The larger the number the longer the conversion takes, but a
smaller PDF file should be created.
Creator=name
Specifies 1 to 62 characters for the Creator name in the Info Dictionary of the
output PDF file. This information is displayed to the user if the "document
properties" function is selected in Adobe Acrobat.
DASH_PATTERN_style="[on off...] phase"
When using GOCA lines, adjusts the dash pattern used. The values are:
style
Indicates the dash pattern that is used. The values are:
DASH Specifies a dash pattern ( ------- ).
DASHDOT Specifies a dash dot pattern ( -.-.-.-. ).
DASHDOTDOT Specifies a dash dot dot pattern ( -..-..-.. ).
DBLDOT Specifies a double dot pattern ( .. .. .. .. ).
DOT Specifies a dot pattern ( ......... ).
LONGDASH Specifies a long dash pattern ( _ _ _ _ ).
SOLID Specifies a solid line pattern ( _____ ).
on Specifies the dash pattern length in 1/72 units per inch.
off Specifies the spacing length between the dash pattern.
phase
Specifies the distance to start in the dash pattern.
The on and off values are optional. When used, the pair can be specified
multiple times. For example:
"[] 0" specifies a solid line.
Chapter 3. Configuration 13
information is available in the input AFP document, PDF bookmarks are
automatically generated. If you do not want bookmarks created, you must set
this parameter to True .
Disable_Compression=True | False
Indicates whether the transform compresses PDF data. Setting this parameter
to True to turn off compression can be useful when trying to determine
problems that might exist in the PDF output file.
DotDensity,patternid,afpcolorname=red,green,blue
Specifies the RGB value color setting for the AFP GOCA pattern that is used to
fill the interior of an area, where:
patternid
Specifies the GOCA pattern identifier, which defines various dot fill
patterns of varying density. Pattern ID values of 1 to 8 are supported.
afpcolorname
Specifies one of these pattern foreground colors defined in AFP: BLACK,
BLUE, BROWN, CYAN, DARKBLUE, DARKGREEN, DARKTURQUOISE,
DEFAULT, GREEN, GREY, MAGENTA, MUSTARD, ORANGE, PURPLE,
RED, WHITE, YELLOW.
red
green
blue
Specifies the RGB value settings in the range of 0 to 255.
Chapter 3. Configuration 15
GOCA_Pass2
Used only when instructed to do so by support.
GOCA_Pattern=patternid,var1,var2
Specifies the characteristics for the AFP Graphics Object Content Architecture
(GOCA) pattern that is used to fill the interior of an area, where:
patternid
Specifies the GOCA pattern identifier, which defines various line fill
patterns. Pattern ID values of 9 to 14 are supported.
var1
Defines the line width.
var2
Defines the line spacing.
Chapter 3. Configuration 17
Max_Fonts
Deprecated–supported but no longer used by the transform. The transform
automatically adjusts this setting as needed.
Max_Images
Deprecated–supported but no longer used by the transform. The transform
automatically adjusts this setting as needed.
Max_Leaves
Deprecated–supported but no longer used by the transform. The transform
automatically adjusts this setting as needed.
Max_Objects
Deprecated–supported but no longer used by the transform. The transform
automatically adjusts this setting as needed.
Max_Overlays
Deprecated–supported but no longer used by the transform. The transform
automatically adjusts this setting as needed.
Max_Pages
Deprecated–supported but no longer used by the transform. The transform
automatically adjusts this setting as needed.
Modify_Text_Colors=True | False
Indicates whether RGB value color settings override the display of named
color values in the AFP text (PTOCA) and AFP graphic objects. See the Color
parameter on page 12.
Old_Static_Paper=True | False
Indicates whether the older processing for the Static_Paper_Length and
Static_Paper_Width is enabled.
Output_IndexInfo=True | False
Indicates whether the group level index information for the document is
placed as a bookmark using the format "index attribute : index value". The
bookmark text can then be searched for by other applications processing the
PDF file.
Note: Do not set this parameter to True on password protected files because
the bookmark text becomes encrypted.
OverlayExt=*.extension
Specifies the file extension that is used when searching for overlay resources in
resource directories. For example, if OverlayExt=*.OLY and the AFP document
references an overlay named O1OVERLY, the transform searches for a file named
O1OVERLY.OLY in the resource directories.
1 = Multiply
101 = Screen
102 = Overlay
103 = Darken (recommended setting)
104 = Lighten
105 = ColorDodge
106 = ColorBurn
107 = HardLight
108 = SoftLight
109 = Difference
110 = Exclusion
111 = Hue
112 = Saturation
113 = Color
114 = Luminosity
PfmPfb_Directory=directory
Specifies the path location of Adobe Type 1 outline font files that the transform
uses when embedding fonts inside of the PDF document. When simple font
substitution is not acceptable in the PDF output, it is possible to embed a
custom Type 1 font inside the PDF document for better results.
Note: Placing Type 1 font files in this directory does not mean they are
automatically placed inside of the PDF file. For a font to be embedded,
it must be mapped using the transform font definition files. See
“Mapping the AFP font to the embedded Type 1 font” on page 37 for
more information.
Chapter 3. Configuration 19
Preserve_CMYK=True | False
Indicates whether all AFP images are converted to the RGB color space in the
PDF output. Setting this parameter to True preserves AFP images defined with
the CMYK color space so they are not converted to RGB and uses a
compression in the PDF that does not cause any loss of color quality.
Printer_Resolution=n
Specifies the printer resolution to be used in GOCA. The default value is 300.
ResourceDataPath=directory[;directory...]
Specifies the directories that the transform uses to search for AFP resources.
You can specify multiple directories, but they must be separated with a
semicolon (;). See “Using AFP resources” on page 25 for more information.
Set_BC_GS1_128_WIDTHS
Used only when instructed to do so by support.
Shade_RGB=red,green,blue
Specifies the intensity of the red, green, and blue colors when generating the
color of shaded areas. The color values are in the range of 0.0 to 1.0, with “0.0”
indicating black and “1.0” indicating white. For example: Shade_RGB=0.5, 0.5,
0.5.
See “Substituting AFP shaded images with colored areas” on page 45 for more
information about shaded areas.
Show_Outline=True | False
Indicates whether the outline window is displayed. If an AFP document
contains index data, the transform converts this index information into PDF
outline and bookmark functions. If the output PDF file contains any bookmark
information, the outline window is always displayed when viewed with Adobe
Acrobat. This parameter can be set to False so the outline window is not
displayed.
Show_Pageids=True | False
Indicates whether the Page Identifier values are displayed in the bookmark
pane.
Static_Paper_Center=True | False
Indicates whether the data in the AFP logical page is centered relative to the
static dimensions. This parameter can only be used when Static_Paper_Length
and Static_Paper_Width are specified.
Static_Paper_Length=n
Overrides the AFP logical page size used by default for the page or media
dimensions represented in the PDF. Using units of 72 units per inch, a specific
paper length can be specified for the entire document.
Static_Paper_Width=n
Overrides the AFP logical page size used by default for the page or media
dimensions represented in the PDF. Using units of 72 units per inch, a specific
paper width can be specified for the entire document.
Subject=text
Specifies 1 to 62 characters for the Subject entry in the Info Dictionary of the
output PDF file. This information is displayed to the user if the "document
properties" function is selected in Adobe Acrobat.
Title=text
Specifies 1 to 62 characters for the Title entry in the Info Dictionary of the
output PDF file. This information is displayed to the user if the "document
properties" function is selected in Adobe Acrobat.
Chapter 3. Configuration 21
Vertical_Offset=n
Applies a vertical offset to all the data on the page relative to the paper or
media represented in the PDF. The units of this setting are in 1440 units per
inch.
split_afp2pdf command
The split_afp2pdf command takes an indexed AFP print file, splits it up into
separate statements, and invokes the AFP to PDF transform. The input AFP data
must be divided into separate page groups (statements) and contain AFP index
values for each group. This type of data is created by the AFP Conversion and
Indexing Facility (ACIF) or an equivalent function.
The split_afp2pdf command creates a separate PDF output file for each statement.
The name of the output file corresponds to at least a single associated index value.
For example, if the index field, ACCOUNT, is selected, each output file is named
with the actual account ID (such as 123456.pdf).
This command invokes the AFP2PDF Transform for each statement so the same
configuration and setup for the transform program applies. The split_afp2pdf
module must be placed in the same directory where the AFP2PDF Transform files
are installed.
Syntax
The syntax for the split_afp2pdf command is:
split_afp2pdf
-d dir -e pw -f def -g code_pg
-h fontpath -i index -i2 index -i3 index
-ix index -ix2 index -ix3 index -k path -l
-m mapfile -n -o optfile -p codes -r resfile
afpfile
-t turn -u pw -v value
Parameters
-d dir
Specifies the directory for all of the output files. If this parameter is not
specified, the output files are placed in the current directory.
-e pw
Specifies an alphanumeric password that gives permission to change document
security settings (also known as a master or owner password). For example, if
the printing function in the PDF display has been restricted (-p p), you must
supply a password to override the setting. The same password is applied for
each output file.
-f def
Specifies the fully qualified file name of the form definition resource that is
used on each statement when transforming the AFP document.
22 Ricoh AFP2PDF Transform: Planning and Installing
-g code_pg
Specifies the code page identifier (ID) to be used when interpreting the index
information in the AFP file. By default, code page 500 is used to interpret all
index fields. See “Code page map file” on page 32 for more information .
-h fontpath
Specifies the location of the font definition files when a code page ID is
specified with the -g parameter. The -h parameter should be used if the font
definition files are not located in the \font\maps subdirectory.
-i index
Specifies the index field used for generating the output file names. For
example, if -i RouteID is specified, the output file name ABC is generated if a
statement has a routing ID of ABC.
The user must know which index fields are available for the AFP data and
must pick a field that is unique for each statement. For example, a single index
field, such as ZIPCODE, might not be have unique values for all statements. In
that case, statements with the same zip code would have the same file name
causing an overwrite of the output file.
If this parameter is not given, the first index field found in the AFP data is
used. If an index field name not available in the AFP data is given, an error
message is issued and the program ends.
-i2 index
Specifies the second index field used for generating the output file names. This
parameter should only be used if the -i parameter is specified. The value of
this index field is concatenated to the end of the first index field and a hyphen
(-) is used as a separator. For example, if -i RouteID -i2 AccountNo is
specified, the output file name ABC-1234567 is generated if a statement has a
routing ID of ABC and an account number of 1234567.
-i3 index
Specifies the third index field used for generating the output file names. This
parameter should only be used if the -i and -i2 parameters are specified. The
value of this index field is concatenated to the end of the second index field
and a hyphen (-) is used as a separator. For example, if -i RouteID -i2
OfficeNo -i3 AccountNo is specified, the output file name of ABC-XYZ-1234567
is generated if a statement has a routing ID of ABC, an office number of XYZ,
and an account number of 1234567.
-ix index
Specifies the index field used for generating the output file names. This
parameter is the same as the -i parameter but is used when the index name is
specified in hexadecimal notation.
-ix2 index
Specifies the second index field used for generating the output file names. This
parameter is the same as the -i2 parameter but is used when the index name is
specified in hexadecimal notation.
-ix3 index
Specifies the third index field used for generating the output file names. This
parameter is the same as the -i3 parameter but is used when the index name is
specified in hexadecimal notation.
-k path
Specifies the location of the split_afp2pdf module files. The -k parameter
should be used if the split_afp2pdf module is invoked from a different
directory than the directory where the AFP2PDF Transform files are installed.
Chapter 3. Configuration 23
-l Generates a linearized PDF file which reorganizes the data for more efficient
processing in a network environment. Also known as Fast Web View PDF
documents, files generated with this option make it possible to view very large
documents without long download delays. To use this parameter, verify that
the Web server or Web application sending this PDF data over the network
provides the page-by-page downloading or "byte-serving" function.
-m mapfile
Specifies the location and name of the image map configuration file that is
used by the transform.
-n Generates a different PDF output file name if the file already exists. For
example, the PDF output file ABCD__2.pdf is generated if the output file name
ABCD.pdf already exists.
-o optfile
Specifies the location and name of the options file used by the transform.
-p codes
When used with an owner password (-e pw), specifies which PDF display
functions are restricted. The codes for the display functions, which can be used
in any order, are:
a Add or modify text annotations and interactive form fields.
c Modify the document contents.
d Copy text and graphics from the document.
p Print the document.
-r resfile
Specifies the fully qualified file name of the AFP resource group file to be used
when transforming the AFP file.
-t turn
Specifies the rotation value to use when transforming the file. Valid values are
0 , 90, 180, and 270. Some AFP files might have already been formatted with a
rotated orientation; therefore, you must use this parameter to align the text in
an upright position.
-u pw
Specifies an alphanumeric password that gives permission to open the PDF
document (also known as a user password).
-v value
Specifies the index field value where the statement conversion process begins.
This parameter lets the conversion start someplace other than the first
statement at the beginning of the file. The -i index setting must also be
specified if this parameter is used. For example, if split_afp2pdf -i ACCOUNT
-v 123456 is specified, all statements in the AFP data are skipped until the
account 123456 is encountered, then the transform process resumes.
afpfile
Specifies the AFP input file that is to be transformed to PDF. This parameter is
required.
Return codes
When the split_afp2pdf command runs, you see one of these return code values:
0 Successful completion of the statement split and transform.
Nonzero
An error has occurred.
24 Ricoh AFP2PDF Transform: Planning and Installing
split_afp2pdf generates a log file containing the list of output files generated. The
log file is placed in the same directory as the output files. If an error occurred
during the conversion process, this log could be used to determine the last
statement processed and used as the restarting value. This log also contains any
warning messages created during the conversion. For example, if an output file
was overwritten, it would be indicated as a warning message in this log file.
The page segment, overlay, form definition, and font file resources can be passed
to the transform from these locations:
Inline resource group
The AFP resources needed by the AFP data file are combined into a logical
resource library for the document. This resource group is contained in the
AFP file along with the AFP document.
External resource group
The AFP resources needed by the AFP data file are combined into a logical
resource library for the document and are passed to the transform in as a
separate file.
When using the afp2pdf command, this resource file is specified with the
-r parameter. See “Syntax” on page 7 for more information.
Resource directories
AFP resource files can be placed in specific directories that the transform
program searches for when converting a document. The user can specify
multiple directories and the directories are searched in the order that they
are given.
By default, resources are placed in a \resource subdirectory where the
transform code modules were installed. You can specify other directories
with the ResourceDataPath parameter in the transform options file. See
“AFP2PDF Transform options file” on page 9 for more information.
You can also associate a file extension for the page segment and overlay
resources. Using the PageSegExt and OverlayExt parameters in the
transform options file, the given file extension is used when searching for
the resource. For example, if PageSegExt=*.PSG is set in the options file,
and the page segment resource called from the AFP data file is S1PAGSEG,
the transform searches for the file named S1PAGSEG.PSG in the resource
directories.
Chapter 3. Configuration 25
Note: The name of the resource file is case-sensitive on the UNIX servers
and it must match the name of the resource that is specified in the
AFP data file.
If an AFP resource is located in multiple places, the transform program uses this
search order:
1. Internal resource group
2. External resource group
3. Resource directories specified with the ResourceDataPath parameter in the
options file
4. The \resource subdirectory where the transform modules were installed
When a document open password (also known as a user password) is used, any
user who tries to open the PDF document is required to supply the correct
password.
Encrypted PDF in the transform is also tied to restricting certain functions when
displayed in Adobe Acrobat. If any display functions are restricted, a permissions
password (also known as an owner or master password) is required. Any user
needing to override a restricted function must supply the correct permissions
password. See “Parameters” on page 7 for information about using the -a and -e
parameters to restrict display functions.
Both types of passwords can be set for a document. If the PDF document has both
types of passwords, it can be opened with either password.
Only Adobe software fully supports and respects these settings; users of
third-party PDF-enabled programs might be able to bypass some of the restrictions.
This chapter describes font definition files, the process for mapping fonts, custom
AFP raster font files, embedded Type 1 fonts, custom font metric files, and AFP
TrueType fonts.
Note: The directory and file examples in this chapter are specified for the
Windows environment. To use these examples in a UNIX environment, use
the UNIX file naming convention for any file name. For example,
\font\maps in Windows is /font/maps in a UNIX environment, or the input
AFP file c:\documents\afpdoc.afp in Windows would be
/documents/afpdoc.afp in a UNIX environment.
27
Table 1. Font files and subdirectories (continued)
File File name Subdirectory Description
Font metric information file font.AFM \font\AFM Contains the font metric information,
which is the dimension of each of the
characters (optional).
TrueType outline font files font.ttf \font\TrueType Contains the default location for the
TrueType font files (*.ttf) when
TrueType fonts are referenced in AFP
files.
Type 1 outline font files font.pfb \font\Type1 Contains the default location for the
and font.pfm Type 1 font files (*.pfb, *.pfm) to be
custom font metric files Custom-Metrics-xx.met embedded. Can also hold metric
information for custom fonts (optional).
X?A155N2=C?A155N1,T1DCDCFS
X?AE10=C?S0AE10,T1S0AE10
X?GT10=C?D0GT10,T1D0BASE
X?ST15=C?D0ST15,T1D0BASE
X?A0770C=C?A07700,T1GI0361
X0T0550C=C0T05500,T1DCDCFS
Syntax rules:
v A question mark (?) can only be used as the wildcard character for the second
character in the coded font name and the character set name. This allows all the
character rotations of the coded fonts to be handled with one entry while
searching.
Note: A sequential search is performed for the coded font, and the first match is
used (including the wildcard character).
v After the coded font name, the character set name must be listed first, followed
by the code page name.
v The character set and code page must be separated by a comma.
[CHARSET]
;charset = fgid, height, width, strikeover, underline
C?H200A0=2304,110,73,0,0
C?H200D0=2304,140,93,0,0
C?N200B0=2308,120,80,0,0
C?4200B0=416,120,144,0,0
C?D0GT15=230,80,96,0,0
C?A155A0=33207,110,73,0,0
C?A175A0=33227,110,73,0,0
C?T055D0=4407,140,93,0,0
C?T17500=4555,100,67,0,
C?T17560=4555,60,40,0,0
DEFAULT=2308,80,0
The FGID section lists each font global identifier and its corresponding attributes.
Figure 3 on page 30 shows an example of the FGID section in the csdef.fnt file:
Sytax rules:
v A comma must separate attributes.
v A question mark (?) can only be used as the wildcard character for the second
character in the character set name. This allows all the character rotations of the
coded fonts to be handled with one entry while searching.
Note: A sequential search is performed for the character set, and the first match
is used (including the wildcard character).
v The CHARSET section must come before the FGID section in the file.
v In the CHARSET section of the file, only the “fgid” and “height” attributes are
required.
v In the FGID section of the file, only the “familyname” and “style” attributes are
required.
[CODEPG]
;codepage = cpgid,wincp,entype
T1DCDCFS=1003,ANSI
T1DEBASE=2058,ANSI
T1D0BASE=2063,ANSI
T1D0GP12=2085,ANSI
T1GI0395=2079,ANSI
T1GPI363=2066,SYMBOL
T1V10037=37,ANSI
T1V10273=273,ANSI
T1000290=290,ANSI
T1000310=310,ANSI
T1000423=423,ANSI
T1000905=905,ANSI
P1D0BASE=456,OEM,SBCS
DEFAULT=361,ANSI
Table 5 describes the attributes and values for the AFP code pages in the code page
definition file.
Table 5. CODEPG attributes
Shipped
Attribute Value default Description
cpgid A CPGID in the range of 65280 to 361 An AFP-defined code page
65534 global identifier (CPGID),
your own defined CPGID,
or any other CPGID not
already being used within
the file
Syntax rules:
v A comma must separate attributes.
v Only the first attribute, “cpgid”, is required.
v If you create your own code page, you must assign it a unique code page
identifier. Leading zeros are not valid. (You can use a predefined code page
global identifier, but only if the character-to-hexadecimal code mapping is the
same for your code page.)
v If you define a default code page in the file, it must be the last entry in the file.
Figure 5 on page 33 shows an example of the contents of the code page map file
“395.cp” for the “T1000395” code page mapped to the ANSI encoding.
Syntax rules:
v Blanks must separate character identifiers.
v NOMATCH means there is not a matching character in the output character set.
v The NOMATCH hexadecimal code of "00" is mapped to the undefined code
point. When a document contains a character that does not exist in the output
character set, that character cannot be displayed. If the character has not been
remapped in the code page map file or the alias file, the undefined code point
character is displayed as a substitute.
v The string of semicolons (;;;;;;;;;) means this line is ignored as a comment. It also
indicates that the output code page contains a character that does not exist in
the AFP code page. The code point for a character not found in the AFP code
page can be used for replacing NOMATCH characters.
v If the input code point maps to "NOMATCH 00", and the corresponding AFP
code page and character set resources are available (inline or in a resource
directory), the transform extracts the raster character from the AFP font and
places it as an image in the PDF output.
Alias file
The alias file (alias.fnt) lists the font metric file name and the font family name
aliases in the FONT section. Font family name aliases let you change all of the
requested instances of a font family name (as defined in the character set definition
file) to another font family name.
Figure 6 shows an example of how the alias.fnt file is used with the AFP2PDF
Transform to change all requests for the SonoranSerif font to requests for the Times
font (which is one of the base fonts available in the Adobe Acrobat Viewer).
[FONT]
; ***** Requested font = font name,Font metric/AFM filename (or 'NULL' for not used) *****
SonoranSerif=Times, NULL
Syntax rules:
v If multiple mappings are listed in the file for the same family name, only the
first match is used.
After determining which font files you need to modify, follow these steps to map
your fonts:
1. Gather the information needed to define the fonts in the font definition files.
2. Make backup copies of any of these font definition files you plan to modify so
you have the original file in case the modified copy becomes corrupted:
afpfont.fnt
alias.fnt
coded.fnt
cpdef.fnt
csdef.fnt
3. Substitute any nonmatching characters in the code page map file. See “Code
page map file” on page 32 for information about code page map files.
4. Edit the cpdef.fnt file and add your code page name, code page identifier, and
the best matching encoding classification for the fonts you are using.
5. If you have created a new character set, edit the csdef.fnt file and add your
character set name in the CHARSET section. Specify the correct attributes for
your font in the csdef.fnt file. Add the appropriate information in the FIGID
section of the file if you are naming a new font global identifier.
6. If you have created a coded font, create or edit the coded.fnt file and add your
coded font.
7. If any of the AFP raster fonts need to be used, list the corresponding AFP
coded fonts, code pages, and character sets in the afpfont.fnt file.
Figure 7 on page 36 defines raster fonts in a font mapping file. In this example,
code pages T1K99MAP, T1K99MCP, and T1KNIC4 are mapped. Character sets
C?CONWAY, C?K99MAP, C?K99MCP, and C?WSMITH are also mapped.
Figure 8 shows entries in the transform options file that define resource paths. In
this example, “c:\res1” is searched first for resources with an extension of “.240”
and then “c:\res2” is searched.
ResourceDataPath='c:\res1\;c:\res2'
FontExt=*.240
The Type 1 font must be in binary (PFB, PFM) format. If a font is in ASCII (AFM,
PFA) format, you must convert it before it can be used with the transform. Type 1
fonts typically consist of a printer font binary (PFB) and a printer font metrics
(PFM) file. The PFB file contains the mathematical descriptions (in the PostScript®
language) for each character. The PFM file contains the font metrics needed for the
display of the characters.
File location
You must place all Type 1 font files, including all font files that can be used for
embedding fonts in the PDF file, in a single directory. By default, the transform
looks in the \font\Type1 subdirectory in the same directory where the AFP2PDF
Transform files are installed. The PfmPfb_Directory parameter in the transform
options file can be used to define a directory that is different from the default. See
“AFP2PDF Transform options file” on page 9 for more information.
Where:
v font defines the name by which this font is known and is referred to by the other
font configuration files. For example, Custom1.
v font_name specifies the name of the font, such as CustFont. This name is
case-sensitive and must match the file name of the PFB and PFM files.
v font_metric_name indicates the file name for font metric information. If it is set to
NULL, it indicates that extra font metric information is not used.
In this example, if the AFP font is mapped to “Custom1”, the Type 1 font,
“CustFont”, is embedded inside the output PDF file and the appropriate text uses
this font for the display:
[FONT]
Custom1=CustFont,NULL
See Chapter 4, “Mapping fonts,” on page 27 for more information about mapping
fonts.
Font metric files should be set up to use the default PDF WinANSI encoding (code
page 1252); they cannot be used for double-byte text (Asian languages). The files
are located in the \font\Type1 subdirectory and are named Custom-Metrics-x.met,
where x is 1 to 25.
;**** Requested font=font name,Font metric/AFM file name (or 'NULL' for not used) *****
Font1=Custom-Metrics-1,NULL
Font2=Custom-Metrics-2,NULL
;******* End User-defined/Custom names *******
The format of custom font metric files follows the AFM specification, including
two additional parameters that describe the font used for the display:
Flags Specifies various characteristics of the font. Values are bit positions from 1
to 32. Table 6 shows the defined bit position values.
Table 6. Defined values for the Flags parameter
Value Font type Description
1 FixedPitch All characters have the same width (as opposed to proportional
or variable-pitch fonts, which have different widths).
2 Serif Characters have serifs, which are short lines drawn at an angle
on the upper and lower end of character strokes (as opposed to
sans serif fonts, which have no serifs).
6 Nonsymbolic The font uses the Adobe standard Latin character set or a subset
of it.
7 Italic Characters are slanted to the right.
17 AllCap The font contains no lowercase letters; typically used for display
purposes such as titles or headlines.
18 SmallCap The font contains capital letters in the same style as the normal
capital letters in a font, but approximately the size of the
lowercase letters.
Note: All other bit positions are reserved and must be set to 0.
StemV
The width, measured in the x direction, of the dominant vertical stems of
characters in the font.
TrueType font collections, linked TrueType fonts, or the use of a Resource Access
Table (RAT) are not supported.
File location
You must place all TypeType font files in a single directory. By default, the
transform looks in the \font\TrueType subdirectory in the same directory where
the AFP2PDF Transform files are installed. You can use the TrueType_Directory
parameter in the transform options file to define a directory that is different from
the default. See “AFP2PDF Transform options file” on page 9 for more information.
Character encoding
The AFP2PDF Transform uses the Unicode character encoding standard to
reference characters in TrueType fonts. If the AFP text is encoded in a format other
than a standard Unicode encoding (UTF-8 or UTF-16), the text must be converted
to Unicode during the transformation process. In that case, new conversion tables
that use the International Components for Unicode (ICU) function might be
required.
The binary converter files are based on ICU 3.4 and are different for the system
being used. The file name convention is icudt34p_ibm-cpid.cnv, where p denotes
the system ID and cpid is the code page ID. The values for the system ID are:
l Little endian, ASCII
b Big Endian, ASCII
e Big Endian, EBCDIC
The code page ID is the numerical CPGID that is defined in the cpdef.fnt code
page definition file (see “Code page definition file” on page 31).
Mapping images lets you handle AFP images in different ways during the
transform process, such as:
v Identifying individual images in your transformed files.
v Removing all or some of the images from your transformed output.
v Substituting all or some of the images with previously generated images in the
PDF output with JPEG images.
v Substituting all or some of the images with a solid-colored rectangle. This is
especially useful for improving the look of the shaded areas that are defined as
images in the AFP data stream.
v Adding an image, which is not part of the AFP data, to the PDF display that
models the use of a preprinted form used during printing.
v Storing frequently used images to reduce the size of a PDF file.
The configuration file handles all the transform processing for the images. For
example, when the transform program is run against an AFP document and an
image is encountered, the program looks for a matching image entry in the
configuration file. If an entry is defined that matches the name, position, size, or a
combination of the three, the information in the configuration file is used to
transform the image. If a matching image entry in the configuration file contains
an "empty entry", the image is not generated in the PDF output file.
Note: The file examples in this chapter are specified for the Windows
environment. To use these examples in a UNIX environment, use the UNIX
file naming convention for any file name. For example, the input AFP file
c:\documents\afpdoc.afp in Windows would be /documents/afpdoc.afp in a
UNIX environment.
The image information in the configuration file is used to identify the images in
the AFP document and map them during the transform process. Figure 11 on page
42 shows an example of image information for different images. Each IMAGE tag
along with its corresponding IMAGE_END tag defines a single image information
entry in the configuration file. The first value for position and size is the horizontal
dimension and the second value is the vertical dimension. The position
measurements are for the upper, left-hand corner of the image relative to the
upper, left-hand corner of the page.
41
<IMAGE position:(5.250in,0.613in) size:(0.667in,0.800in)>
<IMAGE_END>
<IMAGE position:(0.863in,8.483in) size:(2.400in,0.667in)>
<IMAGE_END>
<IMAGE position:(3.596in,8.550in) size:(2.633in,0.700in)>
<IMAGE_END>
<IMAGE name:(S1PSEG01) position:(6.162in,8.483in) size:(2.067in,0.604in)>
<IMAGE_END>
The image information in the configuration file is used to identify the images in
the AFP document. When the transform matches an image in the AFP document
with image information in the configuration file, it generates the image in the PDF
output file.
Therefore, to remove AFP file images so they are not generated in the PDF output
file, create empty image entries in the configuration file.
To remove images:
1. Define empty image information entries in the image map configuration file for
those images you do not want generated in the PDF file.
2. Run afp2pdf on the AFP file (for example, afp2pdf c:\documents\afpdoc.afp).
A PDF file is generated (such as c:\documents\afpdoc.pdf) that does not
contain any images with empty entries in the configuration file.
To use an existing image, add IMAGE definition parameters between the starting
<IMAGE> and ending <IMAGE_END> lines of an image information entry in the
image map configuration file. The image definition parameters are:
XPos=n
Defines the position, in units of 1440 units per inch, of the left edge of the
image relative to the left edge of the page.
As shown in Figure 13, when the first image is encountered it is substituted with
“logo1.jpg”; when the second image is encountered, it is substituted with
“logo2.jpg”.
Figure 13. Example of existing images in the image map configuration file
You can define abbreviated versions of the image entries to expand the matching
capabilities of incoming AFP images. This can simplify and reduce the number of
image entries defined in the configuration file. To define abbreviated versions, edit
the image entry and specify any combination of name, position, or size. If the
incoming AFP image matches all the characteristics listed for the image entry, the
image is substituted.
For example, in Figure 14, the page segment reference name, S1PSEG01, is used.
When an incoming AFP image matches the name, the substituted image is added
to the output. The XPos, YPos, XSize, and YSize parameters for the substituted
image are extracted from the AFP image.
Figure 14. Example of abbreviated image entries in the image map configuration file
Figure 15. Example of colored areas in the image map configuration file
You can define abbreviated versions of the image entries to expand the matching
capabilities of incoming AFP images. This can simplify and reduce the number of
image entries defined in the configuration file. To define abbreviated versions, edit
the image entry and specify any combination of name, position, and size. If the
incoming AFP image matches all the characteristics listed for the image entry, the
shaded area is substituted. For example, in Figure 16, the size values are used.
When an incoming AFP image matches the image size information, a colored area
with the default color is created. The XPos, YPos, XSize, and YSize parameters for
the rectangle are extracted from the AFP image.
<IMAGE size:(0.667in,0.800in)>
SHADED_AREA
<IMAGE_END>
Figure 16. Example of abbreviated colored areas in the image map configuration file
To include an image that emulates a preprinted form, add one or more of these
static image definitions between the starting <IMAGE> and ending
<IMAGE_END> lines of the image information entry in the image map
configuration file:
STATICIMG_PAGE
Specifies that the same image is included on the pages specified with the Type
parameter.
STATICIMG_FRONT
Specifies that the image on the front duplex page of AFP data is placed in the
PDF on pages specified with the Type parameter.
STATICIMG_BACK
Specifies that the image on the back duplex page of AFP data is placed in the
PDF on pages specified with the Type parameter.
STATIC_IMG
Specifies that the same image is included on the pages specified with the Type
parameter and all position and size dimensions are in 72 units per inch.
If the page orientation switches between portrait (length is greater than its width)
and landscape (width is greater than its length), these parameters can also be
specified to control the position and sizing for the landscape orientation:
XPos_Wide=n
Defines the position, in 1440 units per inch, of the left edge of the image
relative to the left edge of the page.
YPos_Wide=n
Defines the position, in 1440 units per inch, of the top edge of the image
relative to the top edge of the page.
XSize_Wide=n
Defines the width (horizontal size in 1440 units per inch) for the target area on
the page for the image.
YSize_Wide=n
Defines the height (vertical size in 1440 units per inch) for the target area on
the page for the image.
In the example in Figure 17 on page 48, the JPEG image, “form1.jpg”, is included
on all simplex pages in the PDF output.
Notes:
1. The image definitions do not include position or size information. You must
manually add the starting and ending lines to the image map configuration file,
in addition to the static image definitions.
2. You can define multiple images on a page; however, make sure the size and
position do not cause the images to overlap.
Figure 18 shows how to store frequently used images. When the first image is
encountered, it is stored with the name “IMG0”.
The AFP2PDF Transform APIs are available as a dynamic link library (DLL) on the
Windows server and as a shared library on the UNIX servers. Therefore, the
transform function can be contained within the calling application’s process and a
separate process does not need to be created (as compared to using the AFP2PDF
Transform command line interface).
The AFP2PDF Transform APIs use data buffers for input and output to the
transform. Many times the AFP data is retrieved from a database in a buffer in
memory. The pointer to this memory block is then passed directly to the
conversion code for processing. The output from the API program also uses a
pointer to a data buffer that contains the transformed output. Therefore, the
overhead of opening, reading, and closing files is eliminated. Because system
performance degrades if very large memory buffers are allocated, this approach
assumes that the input and output buffers are not extremely large. The command
line interface, which uses files for input and output to the transform, might need to
be used for large memory buffers.
This chapter describes the packaging information for the APIs, shows examples for
loading API code and obtaining function pointers, and describes the APIs for the
AFP2PDF Transform.
Packaging information
This section describes the API packaging for the AFP2PDF Transform on the
Windows and UNIX servers.
Windows server
The API package consists of one or more dynamic link library (DLL) files and a
\font subdirectory in the directory where the DLLs are located. The \font
subdirectory contains the font definition files needed by AFP2PDF Transform as
well as several subdirectories. Figure 19 on page 50 shows the file structure for
APIs used by AFP2PDF Transform.
49
afp2pdfd.dll
afp2pdfpe.dll
apf2pdfpl.dll
\java_api
afp2pdf.jar
a2pjni.dll
\font
afpfont.fnt
alias.fnt
coded.fnt
cpdef.fnt
csdef.fnt
icoded.fnt
\AFM (optional)
\maps
\Type1 (optional)
Figure 19. File structure for AFP2PDF Transform APIs on Windows servers
UNIX server
The package consists of a shared library file (afp2pdf_shr) and a /font
subdirectory in the directory where the shared library is located. The /font
subdirectory contains the font definition files needed by AFP2PDF Transform as
well as several subdirectories. The package also includes the afp2pdfpe and
afp2pdfpl files, which the transform uses. Figure 20 shows the file structure for
APIs used by AFP2PDF Transform.
afp2pdfpe
afp2pdfpe_64 (on supported 64 bit systems)
afp2pdfpl
afp2pdfpl_64 (on supported 64 bit systems)
afp2pdf_shr
afp2pdf_shr_64 (on supported 64 bit systems)
/java_api
afp2pdf.jar
liba2pjni.so (or .sl)
liba2pjni_64.so (or .sl) (on supported 64 bit systems)
/font
afpfont.fnt
alias.fnt
coded.fnt
cpdef.fnt
csdef.fnt
icoded.fnt
/AFM (optional)
/maps
/Type1 (optional)
Figure 20. File structure for AFP2PDF Transform APIs on UNIX servers
Figure 22 shows how to dynamically obtain the function pointer for the
A2PDocStart function with the Windows GetProcAddress call and then call the
A2PDocStart function with the function pointer.
Figure 22. Example of obtaining the function pointer to the API options in Windows
UNIX server
The following sections show how to dynamically load an API shared library and
obtain the function pointer on UNIX servers. On AIX, the load function returns the
function pointer to the main entry point. In all other UNIX environments, the
open/load function returns a handle to the shared library.
// Declare the function pointer for the main entry point of the shared library.
//
void* (*fpA2PGetFuncPtr)(const char*);
// Load the Afp2pdf transform shared library which returns the main entry point.
//
fpA2xGetFuncPtr=(void* (*)(const char*)) load (“/a2pXForm/afp2pdf_shr”, 1, NULL);
if (fpA2PGetFuncPtr == NULL) {
fprintf(stderr, "Could not load the AFP2pdf transform library");
}
// Load the Afp2pdf transform shared library which returns handle to the library.
//
void* hSLib= dlopen (“/a2pXForm/afp2pdf_shr”, RTLD_LAZY);
if (hSLib == NULL) {
fprintf(stderr, "Could not load the AFP2pdf transform library");
}
Figure 24. Example of loading an API shared library on Linux and Sun
// Load the Afp2pdf transform shared library which returns handle to the library.
//
dllhandle* hSLib= dllload (“/a2pXForm/afp2pdf_shr”);
if (hSLib == NULL) {
fprintf(stderr, "Could not load the AFP2pdf transform library");
}
Figure 25. Example of loading an API shared library on z/OS UNIX System Services
Figure 26. Example of obtaining the function pointer to API options on AIX
Figure 27. Example of obtaining the function pointer to API options on Linux and Sun
Figure 28. Example of obtaining the function pointer to API options on z/OS UNIX System
Services
This structure is defined in the header file afp2pdfd.h and needs to be included by
the calling application. The calling application should use the default “structure
member alignment” when compiling. The input options structure is referenced
with the name, A2PCvtOpts. The definition of this structure is shown in Figure 29
typedef struct
{
int iPageNumber; // Page number to convert
int iLastPageFlag; // Indicates last page being transformed
int iRotation; // Rotation setting (0 | 90 | 180 | 270)
int* piPdfOutLen; // Returned PDF output buffer length
char** ppPdfOutBuf; // Returned PDF output buffer pointer
char szOptionsFile[SMAX_PATH+1]; // Fully qualified 'a2pxopts.cfg' file spec
char szImageMapFile[SMAX_PATH+1]; // Fully qualified 'imagemap.cfg' file spec
int iVersion; // Structure version number
char szFormDef[SMAX_PATH+1]; // Fully qualified form definition file
char szReserved[SMAX_PATH+1]; //
short fUserPW; // 1 = there is a User Password
// 0 = there is no User Password
char szUserPW[SMAX_PATH+1]; // User Password
short fOwnerPW; // 1 = there is an Owner Password
// 0 = there is no Owner Password
char szOwnerPW[SMAX_PATH+1]; // Owner Password
short fPerms; // 1 = there are flags in szPerms;
// 0 = there are no flags in szPerms;
char szPerms[SMAX_PATH+1]; // Encryption Permissions
short sLinearize; // Linearize PDF (1=TRUE or 0=FALSE)
char szCreateTime[64]; // PDF Creation Time
char szSignTime[64]; // PDF Signature Time
} A2PCvtOpts;
where:
v YYYY is the year
v MM is the month
v DD is the day (01-31)
v HH is the hour (00-23)
v mm is the minute (00-59)
v SS is the second (00-59)
v O is the relationship of local time to Universal Time (UT), denoted by one of
the characters +, -, or Z
v HH is the absolute value of the offset from UT in hours (00-23)
v mm is the absolute value of the offset from UT in minutes (00-59)
For example, December 23, 1998, at 7:52 PM, U.S. Pacific Standard Time, is
represented by the string: 19981223195200-08'00'.
szSignTime
Specifies the time the generated PDF was signed. The format of the time stamp
is:
(YYYYMMDDHHmmSSOHH'mm')
where:
A2PDocStart2
A2PDocStart2 initializes transform processing for an AFP document and returns a
handle to the document as a void* type. This handle is required as input to all of
the other functions and serves to identify the document initialized with this call. A
document handle of NULL indicates that an error has occurred.
A2PGetPageCount
A2PGetPageCount returns the number of pages in a specific AFP document. The
format of A2PGetPageCount is:
int A2PGetPageCount (void* hAfpDoc)
A2PXFormDoc
A2PXFormDoc transforms the entire AFP document using the given values in the
input options structure. The format of A2PXFormDoc is:
void* A2PXFormDoc (void* hAfpDoc, A2PCvtOpts* pCvtOpts)
A2PXFormPage
A2PXFormPage transforms a page in an AFP document using the given values in
the input options structure. Using this function, a subset of pages from the AFP
document can be used to build the PDF file.
Note: The iLastPageFlag in the input options structure must be set to "1" when
calling this function for the last page in the PDF file.
A2PGenerateMessages
A2PGenerateMessages allows the suppression of warning and error messages
generated by the transform while converting a document. If this function is not
called, the transform generates messages by default.
A2PBufferMessages
A2PBufferMessages allows the buffering of messages for a document so the
message text can then be retrieved with the A2PGetMessageBuffer function.
A2PGetMessageBuffer
A2PGetMessageBuffer returns the message buffer. The format of
A2PGetMessageBuffer is:
char* A2PGetMessageBuffer(void* hAfpDoc)
Accessibility features
Accessibility features help users who have disabilities, such as restricted mobility
or limited vision, use information technology products successfully.
Keyboard navigation
This product uses standard Microsoft Windows navigation keys.
61
62 Ricoh AFP2PDF Transform: Planning and Installing
Notices
This information was developed for products and services offered in the U.S.A.
Ricoh may not offer the products, services, or features discussed in this document
in other countries. Consult your local Ricoh representative for information on the
products and services currently available in your area. Any reference to a Ricoh
product, program, or service is not intended to state or imply that only that Ricoh
product, program, or service may be used. Any functionally equivalent product,
program, or service that does not infringe any Ricoh intellectual property rights
may be used instead. However, it is the user's responsibility to evaluate and verify
the operation of any non-Ricoh product, program, or service.
Ricoh may have patents or pending patent applications covering subject matter
described in this document. The furnishing of this document does not give you
any license to these patents. You can send license inquiries, in writing, to:
Ricoh Company, Ltd.
6300 Diagonal Hwy 002J
Boulder, CO 80301-9270
U.S.A.
For license inquiries regarding double-byte (DBCS) information, contact the Ricoh
Intellectual Property Department in your country or send inquiries, in writing, to:
Ricoh Company, Ltd.
6300 Diagonal Hwy 002J
Boulder, CO 80301-9270
U.S.A.
The following paragraph does not apply to the United Kingdom or any other
country where such provisions are inconsistent with local law: RICOH
PRODUCTION PRINT SOLUTIONS, LLC PROVIDES THIS PUBLICATION "AS IS"
WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED,
INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
NON-INFRINGEMENT, MERCHANTABILITY OR FITNESS FOR A PARTICULAR
PURPOSE. Some states do not allow disclaimer of express or implied warranties in
certain transactions, therefore, this statement may not apply to you.
Any references in this information to non-Ricoh Web sites are provided for
convenience only and do not in any manner serve as an endorsement of those Web
sites. The materials at those Web sites are not part of the materials for this Ricoh
product and use of those Web sites is at your own risk.
63
Ricoh may use or distribute any of the information you supply in any way it
believes appropriate without incurring any obligation to you.
Licensees of this program who wish to have information about it for the purpose
of enabling: (i) the exchange of information between independently created
programs and other programs (including this one) and (ii) the mutual use of the
information which has been exchanged, should contact:
Ricoh Company, Ltd
6300 Diagonal Hwy 002J
Boulder, CO 80301-9270
U.S.A.
The licensed program described in this document and all licensed material
available for it are provided by Ricoh under terms of the Ricoh Customer
Agreement, Ricoh International Program License Agreement or any equivalent
agreement between us.
COPYRIGHT LICENSE:
Trademarks
These terms are trademarks or registered trademarks of Ricoh Co., Ltd., in the
United States, other countries, or both:
v Advanced Function Presentation
v AFP
v Bar Code Object Content Architecture
v BCOCA
v Ricoh
UNIX is a registered trademark of The Open Group in the United States and other
countries.
Notices 65
66 Ricoh AFP2PDF Transform: Planning and Installing
Glossary
This glossary defines technical terms and communication systems, and associated equipment.
abbreviations used in this publication. ASCII uses a coded character set consisting of 7-bit
coded characters. See also Extended Binary Coded
These cross-references are used in this glossary: Decimal Interchange Code.
AFP Conversion and Indexing Facility (ACIF). A code page. A particular assignment of code points to
software product that converts a print file into a graphic characters. Within a given code page, a code
MO:DCA-P document, creates an index file for later point can only represent one character. A code page
retrieval and viewing, and retrieves resources used by also identifies how undefined code points are handled.
an AFP document into a separate file. See also coded font.
AIX. See Advanced Interactive Executive. code page global identifier (CPGID). A 5-digit
decimal or 2-byte binary identifier that is assigned to a
American Standard Code for Information Interchange code page. The range of values is 00001 to 65534
(ASCII). A standard code used for information (X'0001' to X'FFFE').
exchange among data processing systems, data
67
Content Manager OnDemand. An IBM program that example, Bodoni or Times Roman) that contains
lets you automatically capture, index, archive, search, definitions of character sets, marker sets, and pattern
retrieve, present, and reproduce stored sets. See also coded font.
computer-generated documents and other
business-related data. font character set. Part of an AFP font that contains
the raster patterns, identifiers, and descriptions of
CPGID. See code page global identifier. characters. See also character set.
F H
hexadecimal. Pertaining to a numbering system with
FGID. See font typeface global identifier.
base of 16.
file. A collection of related data that is stored and
retrieved by an assigned name. A file can include I
information that starts a program (program-file object),
contains text or graphics (data-file object), or processes image. (1) A pattern of toned and untoned pels that
a series of commands (batch file). form a picture. (2) An electronic representation of an
original document or picture produced by a scanning
Flate compression. A zlib/deflate compression device or created from software.
method that uses a lossless algorithm to compress PDF
files. image data. (1) A pattern of bits with 0 and 1 values
that define the pels in an image. A 1-bit is a toned pel.
font. (1) A family or assortment of characters of a (2) Digital data derived from electrical signals that
given size and style, for example, 9-point Bodoni represent a visual image. (3) Rectangular arrays of
modern. A font has a unique name and might have a raster information that define an image.
registry number. (2) A particular type style (for
Glossary 69
RGB. Pertaining to a color display that accepts signals
representing red, green, and blue.
S
simplex. Pertaining to printing on only one side of the
paper. See also duplex.
T
TrueType font. A font format based on scalable
outline technology in which the graphic character
shapes are based on quadratic curves. The font is
described with a set of tables contained in a TrueType
font file.
U
Unicode. A character encoding standard that supports
the interchange, processing, and display of text that is
written in the common languages around the world,
plus some classical and historical texts. For example,
the text name for $ is "dollar sign" and its numeric
value is X'0024'. The Unicode standard has a 16-bit
character set defined by ISO 10646.
W
Windows. Pertaining to a Microsoft Corporation
operating system program that provides a graphical
user interface for DOS.
Z
z/OS UNIX System Services. An element of z/OS that
creates a UNIX environment which conforms to the
XPG4 UNIX 1995 specifications and provides two open
systems interfaces on the z/OS operating system: an
application program interface (API) and an interactive
shell interface.
71
P
packaging information for APIs 49
parameters
afp2pdf command 7
options file 9
split_afp2pdf command 22
preprinted forms, including images
from 46
programming functions available for
API 57
R
raster fonts, mapping custom 34
requirements 3
resources, using AFP 25
return codes
afp2pdf command 9
split_afp2pdf command 24
S
security 26
shaded images, substituting colored areas
for 45
split_afp2pdf command 22
structure for API input options 54
syntax
afp2pdf command 7
split_afp2pdf command 22
T
transform options file 9
TrueType fonts, mapping 39
Type 1 fonts, embedding 36
U
UNIX server
installing AFP2PDF on 3
loading shared libraries for APIs 51
obtaining function pointers for
APIs 52
packaging for APIs 50
W
Windows server
installing AFP2PDF on 4
loading code and obtaining function
pointers for APIs 51
packaging for APIs 49
Printed in USA
G550-20212-00