CRTBNDDIR BNDDIR(PDFLIB/PDFLIB) TEXT( PDFlib Binding Directory )
ADDBNDDIRE BNDDIR(PDFLIB/PDFLIB) OBJ((PDFLIB/PDFLIB *SRVPGM))
CRTBNDRPG
CRTBNDRPG PGM(PDFLIB/HELLO) SRCFILE(PDFLIB/QRPGLESRC) SRCMBR(*PGM) DFTACTGRP(*NO)
BNDDIR(PDFLIB/PDFLIB)
2.12.2 RPG
Hello world
*****************************************************************************************
d/copy QRPGLESRC,PDFLIB
*****************************************************************************************
d p S *
d font s 10i 0
*
d error s 50
d errmsg_p s *
d errmsg s 200 based(errmsg_p)
*
d filename s 256
d fontname s 50
d fontenc s 50
d infokey s 50
d infoval s 200
d text s 200
d n s 1 inz(x 00 )
d empty s 1 inz(x 00 )
*****************************************************************************************
c clear error
*
*
PDFlib
c eval p=pdf_new
c if p=*null
c eval error= Couldn t create PDFlib object +
c (out of memory)!
c exsr exit
c endif
*
*
PDF
c eval filename= hello.pdf +x 00
c if PDF_begin_document(p:filename:0:empty) = 1
c exsr geterrmsg
c exsr exit
c endif
*
c eval infokey= hypertextencoding +x 00
c eval infoval= ebcdic +x 00
c callp PDF_set_parameter(p:infokey:infoval)
* Creator
c eval infokey= Creator +x 00
c eval infoval= hello.rpg +x 00
42
2
: PDFlib
footer
Our partners:
PHP: Hypertext Preprocessor Best Web Hosting
Java Web Hosting
Inexpensive Web Hosting
Jsp Web Hosting
Cheapest Web Hosting
Jsp Hosting
Cheap Hosting
Visionwebhosting.net Business web hosting division of Web
Design Plus. All rights reserved