AFP2PDF Transform User’s Guide

Transcription

MakeAFPAFP2PDF TransformUser’s GuideVersion V4.0

This edition applies to AFP2PDF Transform.MakeAFP welcomes your comments and suggestions. You can send your comments and suggestions to:support@makeafp.comWhen you send information to MakeAFP, you grant MakeAFP a non‐exclusive right to use or distribute theinformation in any way it believes appropriate without incurring any obligation to you. MakeAFP 2020. All Rights Reserved

ContentsPreface . 1About this User’s Guide .1Conventions Used in This User’s Guide.1Chapter 1. Overview . 3Benefits .3Functions at a Glance .5Chapter 2. Installing AFP2PDF Transform for Windows . 7AFP2PDF for Windows Prerequisites.7Installing AFP2PDF on Windows.7Applying License of AFP2PDF Transform for Windows.7Chapter 3. Installing AFP2PDF Transform for Linux . 8Installing AFP2PDF on Linux .8Applying License of AFP2PDF Transform for Linux .8Uninstalling AFP2PDF on Linux .8Chapter 4. AFP2PDF Configurations for Windows. 9Mapping AFP Fonts .9Mapping AFP Object Resources .12Defining Text Watermarks, Static Objects.14Defining Configuration files for Linux .17Chapter 5. AFP2PDF Command . 18AFP2PDF Command Syntax .18AFP2PDF Command Examples.23AFP2PDF Command for IBM Content Manager OnDemand .25i

Chapter 6. AFP2PDF Transform Server for Windows . 26Configuration of AFP2PDF Transform Server.26Managing Service of AFP2PDF Transform Server.28Log File of AFP2PDF Transform Server .29Chapter 7. AFP2PDF Tools . 30MakeAFP Form Designer .30MakeAFP Workbench .32Sniff Tool .34Measure Tool .34Magnification Tools .35Color Picker .36Copy AFP Pages to File .37Extract Resources .37View AFP Page Group Level Indexing Tags.38MakeAFP Fonter .38Chapter 8. AFP2PDF Application Programming Interfaces. 41AFP2PDF APIs Libraries and Examples.41AFP2PDF APIs Functions.41A2PCancelTransform Function.41A2PCloseTransform Function .41A2PGetError Function.41A2PGetErrorCount Function.42A2PInitTransform Function.42A2PInitTransStream Function.42A2PQueryState Function .43A2PStartTransform Function .43AFP2PDF APIs for IBM Content Manager OnDemand .43Appendix A. PDF File Size Optimization . 44Relevant Factors of Image Resources.44Relevant Factors of Font Resources.44Optimize Font Resource Size .45Appendix B. AFP Resources Basic Concepts . 46OpenType/TrueType Fonts .46AFP FOCA Fonts .46AFP Page Segments.47Data‐object Container Resources.48ii

AFP Overlays .48Transferring AFP Files and Resources.49Appendix C. AFP Font Basic Concepts . 50AFP Font Structure .50Coded Font.50Character Set.50Codepage .51AFP Font Naming Convention .52Appendix D. ASCII/EBCDIC AFP Codepages Summary . 54Appendix E. SBCS/DBCS/UTF‐16BE AFP Codepages Summary . 58iii

PrefaceThis User’s Guide describes the functions, commands, and parameters associated withAFP2PDF Transform.About this User’s GuideThis Userʹs Guide provides information about using AFP2PDF Transform, it helps you: Plan for transforming data from AFP (Advanced Function Presentation) format toAdobe 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 AFP2PDFTransform.Conventions Used in This User’s GuideThis User’s Guide uses consistent conventions for the following: HighlightingSyntax notationHighlightingThis User’s Guide uses the following highlighting conventions: BoldIdentifies commands, keywords, and other items, whose names or valuesare predefined by AFP2PDF Transform or must be entered as‐is. ItalicIdentifies parameters whose actual names or values you supply.Syntax NotationThis 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‐1‐

means that you need to replace the variable reslib with a value that representsany valid resource library pathname. Do not enter the following symbols as part of the command:Vertical barBracesBracketsUnderscoreEllipsis {}[] The above symbols have the following meanings:-A vertical bar, , between values, indicates that you can only enter one ofthe values with the command.-Braces, { }, around values indicate a required value, you must select oneof the mutually exclusive values.-Brackets, [ ], around parameters indicate that they are optional.-An underscore, , indicates the default value, which AFP2PDF uses ifyou do not specify the parameter with a non‐default value.-An ellipsis, , following command or set of commands indicates thecommand or set of commands can be repeated.‐2‐

Chapter 1. OverviewAFP2PDF Transform is a super‐fast solution for the high‐volume AFP to PDFtransformation as well as PDF splitting on the fly for e‐Statements requirements,providing excellent transform quality from both legacy and the latest advanced AFPcolor data streams to the smallest PDF.AFP2PDF Transform enables you: Leverage the benefits and advantage of AFP, protect your significant investment onAFP, enables your business to grow and thrive consistently. Enable you to instantly transform and deliver the billing statements to yourcustomers 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‐objectcontainers (GIF, JPEG, TIFF, PDF) directly in AFP. Support complex AFP documents encoded in a variety of text encodings, such asASCII, EBCDIC, DBCS‐PC, DBCS‐HOST, UTF‐8, and UTF‐16. Substitute the legacy AFP FOCA fonts with TrueType/ OpenType fonts and able toprecisely control text width. Extract index data from AFP indexes or on‐page contents, for PDF, bookmarking, orsplitting. Support PDF encryption, by the owner and user‐open password protection anddigital signatures. Provide graphical user interfaces to help you quickly define the font and resourcemappings, watermarks, and templates. Designed to integrate easily with your mission‐critical document delivery systemsand document archiving systems.BenefitsAdvanced AFP2PDF Transform provides the following benefits to AFP business usersand clients:Documents On‐Demand Presenting e‐Statement on‐demand via the internet is your efficient, cost‐effectiveroute to expand your business and enhance the communication with your customers,allowing them to access and view statements and invoices online when and wherethey want instantly, you can gain much better competitive, customer relationships‐3‐

and satisfaction, adherence to legal regulations, yet generating significant costreductions. AFP2PDF Transform enables you to quickly migrate to electronic delivery ofstatements, invoices, and documents in secured PDF format, so your customers caneasily 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 anddocuments, protects your significant investment in AFP, enables your business togrow 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 PDFdocument 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 anend‐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 datastream streams into PDF with the highest fidelity in extremely fast performance. Whatever your needs, AFP2PDF Transform provides a flexible solution that istypically up to 20 times faster than competitive products, with the highesttransformation quality. AFP2PDF Transform uses sophisticated object‐to‐object transformations that deliverthe highest fidelity and the smallest PDF data stream, enabling your organizationand 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 veryminimal changes to your existing production environment, significantly simplify andstreamline the documents management and deliveries throughout your enterprise. AFP2PDF Transform is designed to integrate easily with your mission‐criticaldocument delivery systems and document archiving systems; provides bothcommand‐line interfaces and APIs in C/C , C#, and Java, to manage the workflowoperations of documents transformation. The AFP2PDF Transform Server supports the full automation of simple and complexproduction transforms.‐4‐

Functions at a GlanceAFP2PDF Transform provides the following advanced features, functions, andcapabilities to AFP business users/clients: Extremely fast AFP to PDF transformation speed, able to achieve AFP to PDFtransformation speed of more than 30,000 PPM with a single PDF output file, andmore than 20,000 PPM with multiple PDF output files by the per page‐groupsplitting. 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 thenew generation of TrueType/OpenType fonts, and able to control text widthprecisely. 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‐definedcharacters. Import AFP page‐group level indexes and also able to extracts AFP index valuesfrom 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 TIFFimages 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 resolutionreduction, and able to convert image objects in high‐performance and high colorfidelity by the ICC profile‐based color management. Support all of the linear and 2D barcodes defined in the latest IBM AFP BCOCAstandard, including the new USPS OneCode (USA Postal Intelligent 4‐StateBarcode). 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 protectionwith a user‐supplied digital signature. Support text watermarks, and BMP, GIF, JPEG, PNG, TIFF, AFP page‐segmentimages, AFP overlays, or PDF objects, as the watermarks, static images, and overlays. On Windows platforms, provide graphical user interfaces to help you quickly definethe font mapping from the legacy AFP bitmap/outline to OpenType/TrueType fonts,‐5‐

import AFP font names from AFP file to assist you to define the font mapping, definethe image substitutions, define the font typeface, size, style, and color of the textwatermarks, 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 Javaapplication programs, to quickly transform AFP documents from a file or memorybuffer to PDF documents. Provide command‐line and Java APIs for the integration with IBM Content ManagerOnDemand seamlessly. On Windows platforms, provide AFP2PDF Transform Server to auto pull multipleinput hot‐folders and outputs to multiple folders, auto dispatch the transformation ofthe document, fully automate the production transformations in multitasking high‐performance.‐6‐

Chapter 2. Installing AFP2PDF Transform for WindowsThis chapter provides information on the Windows prerequisites, and installation of theAFP2PDF Transform retail version for Windows.AFP2PDF for Windows PrerequisitesHere 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 WindowsTo 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, thedestination folder is c:\AFP2PDF.Applying License of AFP2PDF Transform Retail Version for WindowsInstalling Soft‐license Key1.Click the Start button, and then select Programs, MakeAFP Software, AFP2PDFTransform, 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 MakeAFPSupport at support@makeafp.com to request a software license key for yoursystem.3.Once an AFP2PDF Transform License key is received, you need to run AFP2PDFConfigurator and Manager GUI to apply the license key.‐7‐

Chapter 3. Installing AFP2PDF Transform for LinuxThis chapter provides installation information of the AFP2PDF Transform retail versionfor Linux.Installing AFP2PDF on LinuxTo install AFP2PDF Transform on a Linux server:If install on the AFP2PDF default installation path /usr/share/afp2pdf, type thefollowing command:sudo sh afp2pdf install.binIf install on a user‐defined specific path, type the following command:sudo sh afp2pdf install.bin your afp2pdf path nameApplying License of AFP2PDF Transform Retail Version for LinuxAFP2PDF Transform for Linux provides the soft‐license key.Installing Soft‐license Key1.Type command afp2pdf, copy the Serial Number generated, and then paste intoan email to be sent to MakeAFP Support at support@makeafp.com to request asoftware license key for your system.2.Once your AFP2PDF Transform License key file afp2pdf.lic was received, copy itinto your AFP2PDF installation path, the default path is:/usr/share/afp2pdfUninstalling AFP2PDF on LinuxTo uninstall AFP2PDF Transform on a Linux server:If installed AFP2PDF on the default installation path /usr/share/afp2pdf, type thefollowing command:sudo sh afp2pdf install.bin --uninstallIf installed AFP2PDF on a user‐define specific path, type the following command:sudo sh afp2pdf install.bin your afp2pdf path name --uninstall‐8‐

Chapter 4. AFP2PDF Configurations for WindowsThis 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 andeasy to understand, editing such XML configuration files directly is quitestraightforward. As these XML files are encoded in Unicode UTF‐8 encoding, make surethe text editor you are using supports Unicode encoding texts, like the powerful freewareNotepad is one of them. You may use an Internet Browser to verify XML file edited.Mapping AFP FontsWith AFP2PDF, you can substitute the legacy AFP fonts with the new generationOpenType(OTF), TrueType (TTF), and TrueType Collection(TTC) fonts, to achieve ahigh‐quality PDF document with a smaller file size, AFP2PDF can sub‐set theOTF/TTF/TTC fonts embedded within the PDF output documents.By default AFP2PDF Transform on Windows platforms, AFP FOCA font mappingconfiguration file is install path /config/fontMap.xml, you can override the default bythe AFP2PDF command flag parameter ‐mf.AFP2PDF Font Mapping configuration file is in XML format with the syntaxes which arevery simple and easy to understand, editing such XML configuration file directly is quitestraightforward.AFP2PDF provides a user‐friendly GUI to help you quickly define and update the AFPfont mapping configurations.Click the Windows Start button, select Programs, MakeAFP Software, AFP2PDFTransform, AFP2PDF Configurator and Manager, and then Font Mapping, to start theFont 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 andstore the fonts required.3.Define the default PDF font by its typeface name.‐9‐

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 indefining 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‐setname with codepage name, IBM defined FGID(Font Global ID) number, or anOpenType/TrueType font name being used by AFP as the data‐object fontresource.‐ 10 ‐

2.Define the AFP standard codepage name to be used to map AFP text encoding toUnicode, you need to select it from the AFP codepage name list according toyour 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, ifAFP is formatted by using AFP standard codepages and AFP fonts areembedded inline within AFP documents.3.Define the corresponding PDF font either by the font typeface name, or actualTrueType, TrueType Collection, OpenType, and Postscript font file name.4.Define the corresponding PDF font size, for may define it as 0 for an AFP FOCAoutline 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 yourBold/Italic font style to the Normal style font; you may only store the normalstyle fonts in the AFP2PDF font libraries to force reducing of the PDF fonts tobe embedded for achieving a smaller PDF file size.7.Define whether to embed the PDF fonts. All supported font formats can beembedded 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 widthsaccurately according to original AFP texts, AFP FOCA bitmap fonts are requiredby AFP2PDF, so that the AFP FOCA bitmap font width information can beparsed 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 ListGUI, with which you can quickly import the AFP font information from your AFPdocument.To let AFP2PDF detect the AFP font properties information, AFP fonts are requiredeither embedded inline in AFP document or pre‐stored in AFP2PDF font resourcelibraries.‐ 11 ‐

Mapping AFP Object ResourcesWith 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, andsubstitute an AFP overlay with a new type of object, enable you to achieve a high‐qualityPDF document with smaller file size.MakeAFP Form Designer is a recommended advanced AFP overlay design tool, withwhich you can quickly redesign a nice AFP color overlay, in the text and graphic modewith a very small AFP data stream.Some AFP software generates their forms in the image mode with the big AFP imagestreams, which gives poor PDF display quality with a big PDF file size. By using newadvanced 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 andfeatures of MakeAFP Form Designer.By default AFP2PDF Transform on Windows platforms, AFP resource mappingconfiguration file is install path /config/resMap.xml, you can override the default bythe AFP2PDF command flag parameter ‐mr.AFP2PDF Resource Mapping configuration file is in XML format with the syntaxeswhich are very simple and easy to understand, editing such XML configuration filedirectly is quite straightforward.AFP2PDF provides a user‐friendly GUI to help you quickly define and update the AFPresource mapping configurations.Click the Windows Start button, select Programs, MakeAFP Software, AFP2PDFTransform, AFP2PDF Configurator and Manager, and then Resource Mapping, to startthe Resource Mapping GUI.‐ 12 ‐

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 destinationcolor. By default AFP2PDF auto‐substitutes AFP legacy pattern shading to asolid grayscale color, also provides a command‐line flag parameter ‐ng if AFP‐ 13 ‐

legacy pattern shading still needs to be presented by using a PDF shadingpatterns.2.Define a source object name of AFP image, overlay, data‐object, and itscorresponding destination object filename of AFP image, overlay, data‐objectresource file, and you can adjust the object size and position of the destinationobject.Defining Text Watermarks, Static ObjectsAFP2PDF enables you to add texts, images, AFP overlays, and AFP page or PDF object asthe watermarks, static objects to the output PDF documents.By default AFP2PDF on Windows platforms, the defi

AFP2PDF Transform is designed to integrate easily with your mission‐critical document delivery systems and document archiving systems; provides both command‐line interface