Convert Afp To Pdf Open Source

Standard AFP to PDF Conversion Process

When tackling the configuration of an AFP file conversion, it is important to understand the objectives. Here you will find the process to evaluate an AFP file, convert it to XML, and then convert to PDF. This provides all the steps to produce a high fidelity replication in the finalized PDF product. You will want to follow these steps.

  • Before you begin your conversion
  • Evaluate the AFP (PageMapper – AFP to XML)
  • Convert PageMapper XML to PDF (PDF Converter – XML to PDF)
  • Evaluate the PDF Output
  • Evaluate the full AFP to PDF Conversion

Before you begin your conversion

  • Determine the origins of the AFP. Was it produced from line data using a PageDef? Was it produced by Exstream? When evaluating the AFP, these questions will help get to some answers if there are missing resources or data from the AFP file.
  • Gather all required resources. Preferably inline in a standard AFP resource group. Many AFP programs have a boolean value to include resources “inline”. If not inline then as separate resource objects that you can place in a resource library (folder).
  • Ensure you meet the system requirements.
Convert Afp To Pdf Open Source

Evaluate the AFP (PageMapper – AFP to XML)

The PageMapper can run as both a batch command line program or interactively with a GUI interface. During this phase it is recommended that you use the GUI. You can easily modify and save the configuration this way and then use it with the command line interface.

Output formats currently supported include PDF, PS, PCL, AFP, XML (area tree representation), Print, AWT and PNG, and to a lesser extent, RTF and TXT. The primary output target is PDF. The Apache™ FOP project is part of the Apache™ Software Foundation, which is a wider community of users and developers of open source projects. Adobe Acrobat PDF and PDF/A Microsoft Office DOC/DOCX, XLS/XLSX, PPT/PPTX, PST, EML, MSG, and XPS formats. CAD formats such as DXF, DWG, and DWF. Plain Text, RTF, HTML, MOBI, ePUB. IBM AFP, MO:DCA, IOCA, and PTOCA. On top of all of these formats, you can also enable OCR and convert images to a document-based searchable PDF.

  • Place all separate resource objects in the resource libraries pointed to by the AFPResourceLib tag in the AFPResourceLib.xml file. More configuration details are located here.
  • Select the debug = yes option. Run the AFP file with both the list and the map formats. The PageMapper Configurations page lists the all options.
  • The will create XML files that will allow you to determine the type of objects that are used in the AFP.
  • Check the PageMapper log file for errors. The error log will indicate if resources are missing and if there are font code page issues.
  • Resolve any missing resources by getting them from the AFP source, creating them or by other means.
  • Most of the code page errors will need to be resolved before you can proceed to PDF conversion.
  • Resolve font code page and character set issues. If you are missing character sets the font character widths will be indeterminate which can lead to incorrect character placement.
  • Make custom font configuration changes to map non-standard code page glyph names. If this is problematic you may be able to simply turn on Type 3 fonts for that problem font which will then work for PDF but the text will be garbled (unreadable) in the XML and have a graphical representation of the font in the PDF.

Convert PageMapper XML to PDF (PDF Converter – XML to PDF)

Select Type 3 fonts = ALL and Type 1 fonts = all in the properties panel. Run the MAP XML file and create a PDF. This will give you a quick and dirty PDF file that in many cases has sufficient fidelity with regard to printing. The result is a large PDF file that does not view well. This is because all the fonts are bitmap format. Decide if this is good enough. If print is the only concern this may be all you need.

If font mapping or substitution is desired, you will need to change the Type 3 fonts to include or exclude. And then the font configurations will need to be updated in the AFP resource library file.

A full suite of options are also available such as encryption, PDF version, splitting, indexing, and much more. Those can be found on the PDF Converter configurations page.

Test all finalized configurations by running the process from end to end with the PageMapper and PDF Converter.

Evaluate the full AFP to PDF Conversion

Now that all the customized configurations are complete in the PageMapper and PDF Converter, the combined utility can be used as a single step.

Online

Update the AFP to PDF configuration to reference the two configuration files associated with previous two steps. These configuration files can also be passed in the command line, so there may not be a need to have an additional configuration file specific to the AFP to PDF tool. However, there may be some additional configurations you want to make specific to AFP to PDF, such as saving the XML.

Introduction

Apache™ FOP (Formatting Objects Processor) is a print formatter driven by XSL formatting objects (XSL-FO) and an output independent formatter. It is a Java application that reads a formatting object (FO) tree and renders the resulting pages to a specified output. Output formats currently supported include PDF, PS, PCL, AFP, XML (area tree representation), Print, AWT and PNG, and to a lesser extent, RTF and TXT. The primary output target is PDF.

The Apache™ FOP project is part of the Apache™ Software Foundation, which is a wider community of users and developers of open source projects.

The latest version of FOP is available at FOP 2.6.

Support for each of the standard's objects and properties is detailed in FOP Compliance. Download options include a precompiled version, source code, and many example files to get you started. Resources include links to XSL-FO introductions and many other useful references. A checklist for Getting Help will guide you toward maximizing the usefulness of FOP.

FOP is proud to be part of Apache's XML Graphics project.

Demonstration

Afp

This image is a demonstration of a real two page document. The XML data on the left is formatted into the two pages on the right. The document contains static areas that appear on every page, an external graphic, a footnote on the first page, and a table that goes across both pages.

FOP uses the standard XSL-FO file format as input, lays the content out into pages, then renders it to the requested output. One great advantage of using XSL-FO as input is that XSL-FO is itself an XML file, which means that it can be conveniently created from a variety of sources. The most common method is to convert semantic XML to XSL-FO, using an XSLT transformation.

Convert Afp To Pdf Open Source File

FOP Objectives

The goals of the Apache FOP project are to deliver an XSL-FO to PDF formatter that is compliant to at least the Basic conformance level described in the W3C Recommendation from 05 December 2006, and that complies with the November 2001 Portable Document Format Specification (Version 1.4) from Adobe Systems.

Convert Afp To Pdf Open Sourced

Conformance to the XML 1.0 and 1.1 Recommendations, XSLT 1.0 and 2.0 Recommendations and the XML Namespaces Recommendation is understood. Other relevant documents, such as the XPath and XLink Working Drafts, are referenced as necessary. The FOP Project will attempt to use the latest version of evolving specifications.