Setting Up TIFF to Page Segment Converter

TIFF to Page Segment Converter takes an input TIFF file and converts it into multiple AFP page segments that can then be printed or used by an iSeries RPG or Cobol program. To set up TIFF to Page Segment Converter:
  1. Install TIFF to Page Segment Converter.
  2. License TIFF to Page Segment Converter.

Using TIFF to Page Segment Converter

You use TIFF to Page Segment Converter by running the TIFF2PGSEG command, which has the following parameters:
  • IFSFILE - The TIFF IFS input file to split into page segments.
  • OUTPUTLIB - The output library where page segments will be created. A data area is automatically created in the output library to ensure that duplicate page segment names are not created during processing.
  • OUTFILE - The temporary physical file that will receive a list of page segment names created from a TIFF file.
  • MBROPT - Whether to replace the list of page segments in the temporary file after each call to the command.
    • *REPLACE - Use a new list of page segments for each call.
    • *ADD - Process multiple TIFF files into page segments before processing them.

For example: To convert the TIFF file /rjsimagedoc/test.tif to the PAGSEGTEMP page segment library, use:


After TIFF2PGSEG creates the page segments, you can call a user program to process the PAGSEGLIST file in library QTEMP and print the page segments as part of an AFP print program. 
Note: If more than one iSeries job is using the TIFF2PGSEG command, each job should use its own page segment temporary library, if possible. TIFF2PGSEG has not been tested in a shared-job scenario.

Cleaning Up Page Segment Files After Processing

You will need to clear the temporary page segment library after processing the page segments that the TIFF2PGSEG command created. Use one of the following methods:
  • Use CLRLIB to clear your page segment library.


  • Write code to process the PAGSEGLIST output file from library QTEMP and delete each page segment file with the DLTPAGSEG command. You can also call DLTPAGSEG in-line from any processing program to delete page segments on-the-fly. 
Warning: Any reports that use selected page segments must be actually printed before the page segments are deleted, since the spool file will contain only a reference to the page segment.

Still have questions? We can help. Submit a case to Technical Support.

Last Modified On: December 10, 2016