============================
Using PDFlib on IBM System i
============================

This document describes the installation steps for PDFlib on IBM System i.
PDFlib can be used with different programming languages as detailed below.

Please observe the notes in the PDFlib Tutorial regarding expected
file formats (EBCDIC text vs. ASCII text vs. binary) for several
file types related to PDFlib usage. These rules must be strictly observed
in order to successfully use PDFlib on IBM System i.


Using PDFlib with Java
======================
In order to use PDFlib with Java on IBM System i you need the IT4J Java VM
(32-bit or 64-bit) which is based on PASE for i. PASE is a no-charge option
of IBM i. The PDFlib shared library for Java is not included in the IBM System i
package, but must be taken from the corresponding AIX package. 
The binaries for AIX accept i5 license keys when running with PASE on i5/OS.

Depending on your Java VM you need the 32-bit or 64-bit package of PDFlib
for Java, i.e.

PDFlib-x.y.z-AIX-java.tar.gz
or
PDFlib-x.y.z-AIX64-java.tar.gz

See PDFlib Tutorial for additional Java configuration steps regarding the
PDFlib shared library and .jar file.



Using PDFlib with ILE C/C++ or ILE RPG
======================================

PDFlib for ILE C/C++ and ILE RPG is delivered as a SRVPGM. The respective
INCLUDE/COPY sources are included in the package. PASE is not required.

  
Step 1: Download and uncompress the package
-------------------------------------------

Download the file PDFlib-x.y.z-i5-C-C++-RPG.zip. Uncompress this file to disk.

Make sure that you have FTP access to your IBM System i and that your user
profile has QSECOFR authority to perform the installation steps.


Step 2: Transfer the PDFlib save file to the IBM System i
---------------------------------------------------------

Start a DOS session on your PC, and initiate an FTP session against your
IBM System i executing the following command from your DOS prompt:

      FTP mySystemi

Enter your IBM System i user profile and password for the logon.

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

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

Use on your IBM System i a file naming format like on personal Computer:
   quote site namefmt 1

Adjust the current library:
   cd /qsys.lib/qgpl.lib

Transfer the file PDFLIB.SAV to your IBM System i by running the FTP command:
	Put C:\yourlocalpath\pdflib.sav pdflib.savf

Exit the FTP session with the FTP command 
	Quit


Step 3: Restore 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) ALWOBJDIF(*OWNER)


Step 4: Create 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 5: Verify 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 using ILE RPG and 
                                    examples
QCSRC       *FILE     PF-SRC        Samples   


In the IFS you should find the following directories:

/PDFlib/PDFlib/x.y/x.y.z/doc
/PDFlib/PDFlib/x.y/x.y.z/bind/c
/PDFlib/PDFlib/x.y/x.y.z/bind/cpp
/PDFlib/PDFlib/x.y/x.y.z/bind/rpg
/PDFlib/PDFlib/x.y/x.y.z/bind/data
/PDFlib/PDFlib/x.y/resource/cmap
/PDFlib/PDFlib/x.y/resource/font
/PDFlib/PDFlib/x.y/resource/icc


PDFlib applications and Teraspace
=================================
PDFlib is Teraspace-enabled, but delivered as SNGLVL. A Teraspace variant can
be made available upon request.
