Requirements and prerequisites
Installing AFP Toolbox for Windows
AFP Toolbox documentation corrections
The Toolbox DLL has been tested on Windows 2000 and Windows XP platforms using the Microsoft Visual C++ development environment (Version 6.0).
You must have installed the AFP Font Collection, Version 2.1, Licensed Program 5648-B45, or IBM Infoprint Fonts for Multiplatforms V1.1, 5648-E77, or both before the AFP Toolbox for Windows is installed.
The AFP Toolbox for Windows supports the C functions documented in the "AFP Toolbox for Multiple Operating Systems User's Guide", S544-5292-04 with the exception of any function involving Double-Byte Character Set (DBCS) text (see below). This manual is available online from the Printing Systems digital library at:
http://www.printers.ibm.com/R5PSC.NSF/Web/afpm
or the Printing Systems Information Center at:
http://publib.boulder.ibm.com/printer/psindex.htm
A printed copy of this publication can be ordered from the IBM Publications Center web site at:
http://w3.ehone.ibm.com/public/applications/publications/cgibin/pbi.cgi
The following DBCS functions are not supported:
A return code of "rcDBCS_NOT_SUPPORTED_YET" (value 205) is returned by these functions if they are called.
This section contains information about installing AFP Toolbox in the Windows environment:
This section contains information about modifying AFP Toolbox for Windows. You will need to modify the Toolbox if you install or remove a font product. A backup copy of your previous INI file is created and stored in the <TargetDir> and named "afrfmstr.ini.bak." There are 2 methods for modifying AFP Toolbox for Windows:
This section contains information about repairing AFP Toolbox for Windows. The Repair option reinstalls and recreates the AFP Toolbox files. You may need to use repair if a file is deleted or corrupted. There are 2 methods for repairing AFP Toolbox for Windows:
This section contains information about uninstalling AFP Toolbox for Windows. There are 2 methods for uninstalling AFP Toolbox for Windows:
This section contains information about using AFP Toolbox for Windows:
There is a sample program included with AFP Toolbox for the C language.
You should compile and run this sample program, both as an exercise to familiarize yourself with AFP Toolbox and as a verification of the installation procedures. See Chapter 2.0 in the "AFP Toolbox for Multiple Operating Systems User's Guide", "Using AFP Toolbox" for examples of the output from the sample program and a description of the function calls.
Use "Microsoft Visual C++ 6.0" to open the sample project file "atxctest.dsw" in the <TargetDir>\Samples directory. If the project ran correctly, the file named "CTEST.AFP" is created. To view or print the "CTEST.AFP", you must make the "wsllogo.psg" file available to AFP Workbench or Infoprint Manager. The page segment is located in the <TargetDir>\Samples directory.
To compile and run a C language program, you need to create a project in "Microsoft Visual C++ 6.0" that makes use of IBM AFP Toolbox library for Windows 2000/XP.
_WINDOWS,USING_AOCL,USING_FM
afptoolbox.lib
The FLIPLIST utility is the font library index program list tool. It is used to display the list of fonts that are currently defined on your system. The parameters for the FLIPLIST command are as follows:
Usage: fliplist [-i fin_file] [-o file] [-?] -i fin_file Produce listing of this font index file default: AFRCORE.FIN (with the full path taken from the INI file or searched in the same folder with afptoolbox.dll) -o file Write listing to the named file default: STDOUT -? Prints the help message
If the fin_file and file parameters contain blanks, they must be enclosed in double quotes. For example:
fliplist -i "c:\Program Files\IBM\AFPToolbox\afrcore.fin" -o c:\temp\fontListing.txt
The output from the FLIPLIST tool defines the valid input combinations for the Define Font By Attribute and Define Font By Name function calls in AFP Toolbox. Here are a few lines of output from the FLIPLIST tool:
<TargetDir>\utils\fliplist\fliplist.exe
Typeface Name | Weight | Style | Width | Deci- Points | Char Set | AFM File | Pat Tech |
---|---|---|---|---|---|---|---|
BOLDFACE LATIN1 | Bold | Roman | Medium | 120 | C08400B0 | BFC | Raster |
BOOKMASTER LATIN1 | Medium | Roman | Medium | 50 | C0B20050 | EDFBL | Raster |
BOOKMASTER LATIN1 | Medium | Italic | Medium | 50 | C0B30050 | EDFBLI | Raster |
BOOKMASTER LATIN1 | Bold | Roman | Medium | 50 | C0B40050 | EDFBLB | Raster |
.
. . | .
. . | .
. . | .
. . | .
. . | .
. . | .
. . | .
. . |
By default, AFP Toolbox is set up to use the fonts provided with the AFP Font Collection, Version 2.1, Licensed Program 5648-B45. The font index file, AFRCORE.FIN (in the <TargetDir> shipped with AFP Toolbox), matches the fonts in the AFP Font Collection, Version 2. FLIPLIST provides a human-readable listing of these fonts. The parameters for FLIPUPDT are as follows:
Usage: flipupdt [-f Font_index_file] [-i Input_file] [-o Output_file] [-v] [-?] -f Font_index_file modifies this font index file -I Input_file read input records from named file -o Output_file writes new FIN to the named file -v verbose debug messages -? prints the help message
To update your font index by adding or deleting font definitions, follow these steps:
To use IBM Infoprint Fonts, Version 1.1, Licensed Program 5648-E77, with AFP Toolbox for Windows, you must first define them using the FLIPUPDT program. An example of the input to the FLIPUPDT program is as follows:
a 0 5 5 0x0000 none CZ420L COURIER LATIN/COURIER LATIN/COURIER LATIN/COURIER LATIN/OUTLINE
The complete set of the input needed for using the Infoprint Fonts is available in the "flipupdtInput.sample" file in the <TargetDir>\Samples\ directory.
Because the AFP Toolbox installer does not restart the system after it has been installed Microsoft Visual C++ will not recognize the AFP Toolbox for Windows. Shut down and restart Microsoft Visual C++.
Check the entries in the INI file to see if are pointing to valid codepages or font file paths and extensions. Ensure that the codepages, character set files, or Adobe Font Manager files are in the correct path.
The following are corrections to the "AFP Toolbox for Multiple Operating Systems User's Guide", S544-5292-04:
Chapter 3, page 94 change the "For the AFP Toolbox C Library:" syntax diagram from:
int AFPBgnPgraph( TBHANDLE in_pageHandle, ushort in_paragraph_width AlignmentOption in_text_alignment, ushort in_linespacing, ushort in_max_pdepth );
to
int AFPBgnPgraph( TBHANDLE in_pageHandle, long in_paragraph_width AlignmentOption in_text_alignment, long in_linespacing, long in_max_pdepth );
Chapter 3, page 121 change the "For the AFP Toolbox C Library:" syntax diagram from:
int AFPDefineField( TBHANDLE in_docHandle, AlignmentOption in_format, long in_alignpos, VertAlignOption in_vertform, long in_leftmargin, long in_rightmargin, long in_linespacing, TextOrientation in_txtorient, uint in_shadingintensity, short far* out_fieldid );
to
int AFPDefineField( TBHANDLE in_docHandle, AlignmentOption in_format, long in_alignpos, VertAlignOption in_vertform, long in_leftmargin, long in_rightmargin, long in_linespacing, TextOrientation in_txtorient, uint in_shadingintensity, long in_topthick, long in_botthick, long in_leftthick, long in_rightthick, short far* out_fieldid );
Chapter 3, page 211 change the "For the AFP Toolbox C Library:" syntax diagram from:
int AFPPutText (TBHANDLE in_pageHandle, char* in_textstring, FontID in_textfont, char* outp_remainstr );
to
int AFPPutText (TBHANDLE in_pageHandle, char* in_textstring, FontID in_textfont, char** outp_remainstr, boolean in_addblank );
The following support has been added to the AFP Toolbox for Multiple Operating System, but has not been added to the "AFP Toolbox for Multiple Operating Systems User's Guide", S544-5292-04:
Adds data to a QR Code bar code object previously started with Begin Bar Code.
int AFPQRCode(TBHANDLE in_bcocaHandle, ushort in_bcsymxpos, ushort in_bcsymypos, boolean in_bce2a, boolean in_bcescape, short in_bccodepage, short in_bcversion, short in_bceclevel, short in_bcseqcount, short in_bcseqind, byte in_bcparity, DMSPECIALFUNCTIONS in_bcspecfunc, byte in_bcapplind, char* in_bcdata);
Create a QR Code bar code:
C Programming Language:
rc = AFPBgnBarCode(PageH, "BCOCA 1", MM_2_U1440(70), MM_2_U1440(80), DEG_0, QRCODE_BC, 0x02, DEFAULT_BCFONT, BLACK, DEFAULT_BCMODWIDTH, -1, 1, -1, &BCH); if (rc) { printf("\nError In Return Code for AFPBgnBarCode: %d", rc); return(rc); } rc = AFPQRCode(BCH, MM_2_U1440(1), MM_2_U1440(1), TRUE, TRUE, CP500, 1, L, 0, 0, 0, FNC1IND, 0x63, "THE QUICK BROWN FOX JUMPED OVER THE LAZY DOG 0123456789"); rc = AFPEndBarCode(PageH, &BCH);
Adds data to a CODE93 bar code object previously started with Begin Bar Code.
Add the following information to the "AFP Toolbox for Multiple Operating Systems User's Guide":
CODE_93_BC // AIM Code 93 Bar Code
Code 93 X'00'
"This parameter is ignored for POSTNET, EAN, UPC, Data Matrix, MaxiCode, and PDF417 type bar codes but a value must still be specified since all parameters are required on C function calls."
to read as follows:
"This parameter is ignored for POSTNET, EAN, UPC, Data Matrix, MaxiCode, PDF417 and Code 93 type bar codes but a value must still be specified since all parameters are required on C function calls."
Defines the default background color for a field.
int AFPDefineFieldColor (TBHANDLE in_docHandle, uint in_fieldid, ColorSpace in_colortype, MODCAColors in_color, ulong in_colspec1, ulong in_colspec2, ulong in_colspec3, ulong in_colspec4 );
Define color for field 3.
C Programming Language
colorType = CMYK_COLOR; color = 0; colSpec1 = 50; colSpec2 = 00; colSpec3 = 00; colSpec4 = 00; RetCode = AFPDefineFieldColor( docHandle, fieldID3, colorType, color, colSpec1, colSpec2, colSpec3, colSpec4);
Sets the default background color for a field. Only this instance of the field will be presented with this color. This call overrides any Define Field Color call for this field. If this function is not called, the default is to the Define Field Color for this field or to no color if none is defined.
int AFPSetFieldColor (TBHANDLE in_pageHandle, uint in_fieldid, ColorSpace in_colortype, MODCAColors in_color, ulong in_colspec1, ulong in_colspec2, ulong in_colspec3, ulong in_colspec4 );
Set color for field 3.
C Programming Language
colorType = CMYK_COLOR; color = 0; colSpec1 = 50; colSpec2 = 00; colSpec3 = 00; colSpec4 = 00; RetCode = AFPSetFieldColor( pageHandle, fieldID3, colorType, color, colSpec1, colSpec2, colSpec3, colSpec4);
This information was developed for products and services offered in the U.S.A.
IBM(R) may not offer the products, services, or features discussed in this document in other countries. Consult your local IBM representative for information on the products and services currently available in your area. Any reference to an IBM product, program, or service is not intended to state or imply that only that IBM product, program, or service may be used. Any functionally equivalent product, program, or service that does not infringe any IBM intellectual property rights may be used instead. However, it is the user's responsibility to evaluate and verify the operation of any non-IBM product, program, or service.
IBM 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:
IBM Director of LicensingThe following paragraph does not apply to the United Kingdom or any other country where such provisions are inconsistent with local law: INTERNATIONAL BUSINESS MACHINES CORPORATION 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.
This information could include technical inaccuracies or typographical errors. Changes are periodically made to the information herein; these changes will be incorporated in new editions of the publication. IBM may make improvements and/or changes in the product(s) described in this publication at any time without notice.
Any references in this information to non-IBM 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 IBM product and use of those Web sites is at your own risk.
IBM may use or distribute any of the information you supply in any way it believes appropriate without incurring any obligation to you.
For license inquiries regarding double-byte (DBCS) information, contact the IBM Intellectual Property Department in your country or send inquiries, in writing, to:
IBM World Trade Asia CorporationLicensees 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:
IBM CorporationSuch information may be available, subject to appropriate terms and conditions, including in some cases, payment of a fee. The licensed program described in this document and all licensed material available for it are provided by IBM under terms of the IBM Customer Agreement, IBM International Program License Agreement or any equivalent agreement between us.
Any performance data contained herein was determined in a controlled environment. Therefore, the results obtained in other operating environments may vary significantly. Some measurements may have been made on development-level systems and there is no guarantee that these measurements will be the same on generally available systems. Furthermore, some measurement may have been estimated through extrapolation. Actual results may vary. Users of this document should verify the applicable data for their specific environment.
Information concerning non-IBM products was obtained from the suppliers of those products, their published announcements or other publicly available sources. IBM has not tested those products and cannot confirm the accuracy of performance, compatibility or any other claims related to non-IBM products. Questions on the capabilities of non-IBM products should be addressed to the suppliers of those products.
All IBM prices shown are IBM's suggested retail prices, are current and are subject to change without notice. Dealer prices may vary.
This information contains examples of data and reports used in daily business operations. To illustrate them as completely as possible, the examples include the names of individuals, companies, brands, and products. All of these names are fictitious and any similarity to the names and addresses used by an actual business enterprise is entirely coincidental.
COPYRIGHT LICENSE:
This information contains sample application programs in source language, which illustrates programming techniques on various operating platforms. You may copy, modify, and distribute these sample programs in any form without payment to IBM, for the purposes of developing, using, marketing or distributing application programs conforming to the application programming interface for the operating platform for which the sample programs are written. These examples have not been thoroughly tested under all conditions. IBM, therefore, cannot guarantee or imply reliability, serviceability, or function of these programs. You may copy, modify, and distribute these sample programs in any form without payment to IBM for the purposes of developing, using, marketing, or distributing application programs conforming to IBM's application programming interfaces.
Each copy or any portion of these sample programs or any derivative work, must include a copyright notice as follows:
(C) (your company name) (year). Portions of this code are derived from IBM Corp. Sample Programs. (C) Copyright IBM Corp. _enter the year or years_. All rights reserved.
You are responsible for payment of any taxes, including personal property taxes, resulting from this authorization.
Your failure to comply with the terms above terminates this authorization. Upon termination, you must destroy your machine readable documentation.
This publication includes documentation of intended Programming Interfaces that let the customer write programs to obtain the services of the AFP Toolbox for Multiple Operating Systems.
The following terms are trademarks of the IBM Corporation in the United States or other countries:
The following terms are trademarks of other companies as follows:
Windows(R), Windows 2000(R), and Windows XP(R) are registered trademarks of Microsoft, Corp.
(C)Copyright International Business Machines Corporation 1995,
2004. All rights reserved.
US Government Users Restricted Rights - Use, duplication or disclosure
restricted by GSA ADP Schedule Contract with IBM Corp.