Installation instructions for PDFlib on AS/400
==============================================

Please observe the notes in the PDFlib manual regarding expected
file formats (EBCDIC text vs. ASCII text vs. binary) for several
items related to PDFlib usage. These rules must strictly be observed
in order to successfully use PDFlib on EBCDIC-based platforms.


PDFlib is delivered as a SRVPGM for the AS/400 which works with
any ILE language. The respective INCLUDE/COPY sources for
ILE/RPG and ILE/C are included in the package.

Note: PASE is not required for using PDFlib on the AS/400.

This document describes the installation steps for PDFlib on the AS/400.
PDFlib can be installed by using the installation package which is
available from http://www.pdflib.com.


Step 1: Download and unzip the PDFLIB.ZIP file
===============================================

Download the file PDFLIB_<version>.ZIP for AS/400 and save it to your local
hard disk. Unzip this file to your local hard disk.

Make sure that you have FTP access to your AS/400 and that your user
profile has QSECOFR authority to perform the installation steps.


Step 2: Transfer the PDFlib save file to the AS/400
===================================================

Start a DOS session on your PC, and initiate an FTP session against your
AS/400 executing the following command from your DOS prompt:

      FTP myAS400

Enter your AS/400 user profile and password for the logon.

Switch over to binary mode by running the FTP command:
	bin

Create a SAVF on your AS/400 by running the FTP command:
	Quote rcmd crtsavf file(qgpl/pdflib)

Transfer the file PDFLIB.SAV to your AS/400 by running the FTP command:
	Put c:\yourlocalpath\pdflib.sav qgpl/pdflib

Exit the FTP session with the FTP command 
	Quit


Step 3: Restoring the PDFlib library
====================================

You can now restore the PDFLIB objects by running the following CL commands:

	CRTLIB LIB(PDFLIB)
	RSTOBJ OBJ(*ALL) SAVLIB(PDFLIB) DEV(*SAVF) SAVF(QGPL/PDFLIB)


Step 4: Creating the IFS directories and resource files
=======================================================

After restoring all objects to the PDFLIB library, execute the following
CL command to create the IFS directories for PDFLIB including all resource
files needed to run PDFlib.

	CALL PGM(PDFLIB/PDFCRTRSC)


Step 6: Verifying the installation
================================== 

After running all installation steps you should have the following objects
in your PDFLIB library:

Object      Type      Attribute

PDFCRTRSC   *PGM      CLE           Program to create IFS directories and 
                                    Resource files
PDFLIB      *SRVPGM   CLE           Service program for PDFlib functions
PDFLIB      *BNDDIR                 Binding Directory
H           *FILE     PF            H includes for PDFlib functions
PDFLIBRSC   *FILE     SAVF          SAVF including the resource files
QRPGLESRC   *FILE     PF            Copy modules for PDFlib constants and 
                                    prototypes when using ILE RPG
QCSRC       *FILE     PF-SRC        C Samples   


In the IFS you should find the following directories:

/PDFlib/PDFlib/8.0/<version>/doc
/PDFlib/PDFlib/8.0/<version>/bind/c
/PDFlib/PDFlib/8.0/<version>/bind/cpp
/PDFlib/PDFlib/8.0/<version>/bind/java
/PDFlib/PDFlib/8.0/<version>/bind/rpg
/PDFlib/PDFlib/8.0/<version>/bind/data
/PDFlib/PDFlib/8.0/resource/cmap
/PDFlib/PDFlib/8.0/resource/fonts
/PDFlib/PDFlib/8.0/resource/icc

Additional steps for Java
=========================

Make sure that the PDFLIB SRVPGM can be found in the library
list of the jobs running your Java apps. The easiest way to achieve this
is to copy these SRVPGMs to the QGPL library. In most cases this library
is found in every LIBL.

Make sure that you have execution permission on the Java objects and
directories to run the Java samples.


PDFlib applications and Teraspace
=================================

PDFlib uses teraspace for memory allocation. Therefore, the calling program has
to support teraspace pointers. RPG programs are created with terraspace pointer 
support by default. On C programs you have to specify TERASPACE(*YES) on the
CRTBNDC or on the CRTCMOD command. Otherwise the system will throw a pointer 
exception, when accessing any pointer/data returned by PDFlib.


PDFlib application and large file support
=========================================

PDFlib supports large files with a size greater than 2 GB. 
