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

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

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

CopyrpgleD  pImageDS                           Const LikeDS(IPI_ImageDS_t)

Contains image data previously loaded by IPI_LoadImage()

CopyrpgleD  pTargetPageSegmentDS...
D                                     Const LikeDS(IPI_PageSegmentDS_t)

Contains configuration information about the page segment to create.

CopyrpgleD  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

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

Specify the object name used to create the page segment

CopyrpgleD  LibraryName                  10A   Inz('*LIBL')

Specify the library where the page segment will be created

CopyrpgleD  Width                         5P 3

Specify the desired output width in inches

CopyrpgleD  Height                        5P 3

Specify the desired output height in inches

CopyrpgleD IPI_ImageDS_t   DS                  Qualified Template Inz
 
CopyrpgleD  Format                       20A   Varying

Internal use only

CopyrpgleD  Bytes                        10U 0 Inz(0)

Internal use only

CopyrpgleD  Width                        10U 0 Inz(0)

Internal use only

CopyrpgleD  Height                       10U 0 Inz(0)

Internal use only

CopyrpgleD  Image                          *   Inz(*Null)

Internal use only

CopyrpgleD  ImageInfo                      *   Inz(*Null)

Internal use only

CopyrpgleD IPI_ErrorDS_t   DS                  Qualified Template Inz
 
CopyrpgleD  Subproc                     132A   Varying

Name of the subprocedure that encountered an error.

CopyrpgleD  MessageId                     7A

Message ID corresponding to the error that occurred.

CopyrpgleD  Message                    1024A   Varying

Error message text providing details about the error.