Auf den Downloadseiten von PDFlib GmbH kann man sich das entsprechende Paket für die iSeries herunterladen. In der ZIP Datei ist eine kurze Anleitung zur Installation vorhanden. In der Bibliothek PDFLIB ist dann auch eine QRPGLESRC mit entsprechenden Beispielen.
Code:
H DEBUG(*YES) DFTACTGRP(*NO) BNDDIR('PDFLIB/PDFLIB')                                               
H COPYRIGHT('(C) PDFlib GmbH, Muenchen, Germany (www.pdflib.com)')                                 
 *********************************************************************************************     
 *   Note: All strings passed into PDFlib are unicode strings with varying length.                 
 *         Use the %UCS2 build in function to convert a single byte string into a unicode string.  
 *         All strings returned from PDFlib are unicode strings with varying length.               
 *         Use the %CHAR build in function to convert a unicode string to a single byte string.    
 *********************************************************************************************     
d/copy QRPGLESRC,PDFLIB                                                                            
 *********************************************************************************************     
d p               S               *                                                                
d font            s             10i 0                                                              
d error           s             50                                                                 
d filename        s            256                                                                 
d n               s              1c   varying inz(%ucs2(''))                                       
 *********************************************************************************************     
c                   clear                   error                                                  
 *                                                                                                 
 *    Init on PDFlib                                                                               
c                   eval      p=RPDF_new                                 
c                   if        p=*null                                    
c                   eval      error='Couldn''t create PDFlib object '+   
c                                   '(out of memory)Ü'                   
c                   exsr      exit                                       
c                   endif                                                
 *                                                                       
 *    Open new pdf file                                                  
c                   if        RPDF_begin_document(p:                     
c                                     %ucs2('hello.pdf'):n) = -1         
c                   exsr      geterrmsg                                  
c                   exsr      exit                                       
c                   endif                                                
 *    Set info "Creator"                                                 
c                   callp     RPDF_set_info(p:%ucs2('Creator'):          
c                                                %ucs2('hello.rpg'))     
 *    Set info "Author"                                                  
c                   callp     RPDF_set_info(p:%ucs2('Author'):           
c                                       %ucs2('Thomas Merz'))            
 *    Set info "Title"                                                   
c                   callp     RPDF_set_info(p:%ucs2('Title'):                   
c                                       %ucs2('Hello, world (RPG)Ü'))           
 *    Start a new page                                                          
c                   callp     RPDF_begin_page_ext(p:a4_width:a4_height:n)       
 *    Unicode Encoding                                                          
c                   eval      font=RPDF_load_font(p:                            
c                                               %ucs2('Helvetica-Bold'):        
c                                               %ucs2('unicode'):n)             
 *                                                                              
c                   callp     RPDF_setfont(p:font:24)                           
c                   callp     RPDF_set_text_pos(p:50:700)                       
 *    Write unicode text constants                                              
c                   callp     RPDF_show(p:%ucs2('Hello worldÜ'))                
 *                                                                              
c                   callp     RPDF_continue_text(p:                             
c                                       %ucs2('(says ILE RPG in unicode)'))     
 *    Close page                                                                
c                   callp     RPDF_end_page_ext(p:n)                            
 *    Close PDF document                                                        
c                   callp     RPDF_end_document(p:n)                            
 *    Delete the PDF object                                                                        
c                   callp     RPDF_delete(p)                                                       
 *                                                                                                 
c                   exsr      exit                                                                 
 *********************************************************************************************     
c     geterrmsg     begsr                                                                          
c                   eval      error=%char(RPDF_get_errmsg(p))                                      
c                   endsr                                                                          
 *********************************************************************************************     
c     exit          begsr                                                                          
c                   if        error<>*blanks                                                       
c                   eval      error='Error: '+error                                                
c     error         dsply                                                                          
c                   endif                                                                          
c                   seton                                        lr                                
c                   return                                                                         
c                   endsr