IPI_ImageToPageSegment()

This subprocedure is used to convert an image which was previously loaded by IPI_LoadImage() into a page segment (*PAGSEG) which can be used with AFPDS printing on the IBM i.

The dimensions of the page segment being created can be specified in inches using the Width and Height subfields of the IPI_PageSegmentDS_t to resize the output.

Subprocedure Prototype

D IPI_ImageToPageSegment...
D                 PR              N   Extproc('IPI_ImageToPageSegment')

Returns *OFF if an error occurs during processing, *ON otherwise.

D  pImageDS                           Const LikeDS(IPI_ImageDS_t)

Contains image data previously loaded by IPI_LoadImage()

D  pTargetPageSegmentDS...
D                                     Const LikeDS(IPI_PageSegmentDS_t)

Contains configuration information about the page segment to create.

D  pErrorDS                           LikeDS(IPI_ErrorDS_t)
D                                     Options(*Nopass:*Omit)

Optional parameter that, if passed, will contain error data returned from the subprocedure. If it is not passed, exceptions will instead be "thrown" and must be caught by a MONITOR block.

Data Structures

D IPI_PageSegmentDS_t...
D                 DS                  Qualified Template Inz
 
D  ObjectName                   10A

Specify the object name used to create the page segment

D  LibraryName                  10A   Inz('*LIBL')

Specify the library where the page segment will be created

D  Width                         5P 3

Specify the desired output width in inches

D  Height                        5P 3

Specify the desired output height in inches

D IPI_ImageDS_t   DS                  Qualified Template Inz
 
D  Format                       20A   Varying

Internal use only

D  Bytes                        10U 0 Inz(0)

Internal use only

D  Width                        10U 0 Inz(0)

Internal use only

D  Height                       10U 0 Inz(0)

Internal use only

D  Image                          *   Inz(*Null)

Internal use only

D  ImageInfo                      *   Inz(*Null)

Internal use only

D IPI_ErrorDS_t   DS                  Qualified Template Inz
 
D  Subproc                     132A   Varying

Name of the subprocedure that encountered an error.

D  MessageId                     7A

Message ID corresponding to the error that occurred.

D  Message                    1024A   Varying

Error message text providing details about the error.