Hej Jep,
Can you please therefore also write down some initial thoughts of how to call the rexx funtions to use with parameters, what they should do and mean etc.
that's easy as duck soup. OK, so you want some details?
This is what I need the DLL to do in its
first release:
Note 1: No error-handling implicitly described. Obviously, each function should set an RC variable...
Note 2: All of the below is available in PdfLib 7 AFAIK ...and also part of any standard "printer object" API... more or less "flavored"...
pdfLoadFuncs()
- Loads the library and makes all functions available to rexx.
pdfDropFuncs()
- obvious, eh?
pdfStartDoc( title, author, comments, keywords ) RETURNS doc_handle
- starts the print job, sets the document information accordingly to the parameters (all optional except "title" BTW)
- The doc_handle enables creating more than 1 PDF doc at the same time...
pdfEndDoc( doc_handle )
- ends print job for the document specified by "doc_handle"
- this is when the output to the "print device" starts
pdfStartPage ( doc_handle, [ height, width] | [ pagesize, orientation ] )
- creates a blank page in the document specified by "doc_handle" at the end of the page list
(or, to put it like this: It appends a new page in the doc)
- syntax 1: creates a page by specifying height and width in "dots" or whatever unit is supported in PDF (don't know)
- syntax 2: creates a page by specifying a mnemomic like "A4", "legal", ... and whether it's "landscape" or "portrait"
- the new page becomes the "current" page (the one that receives all text and graphics output)
- the previously "current" page (if any) is implicitly "closed" (also see "pdfEndPage below)
- the internal page counter is incremented
pdfEndPage ( doc_handle )
- closes processing for the "current" page
- Comment: This would mostly be used only for the last page in the doc since pdfStartPage() closes a previous page implicitly
(in your code, you would only "start new pages" and explicitly "close" only the last one before using pdfEndDoc...)
So, these were the "bones" - here is the "flesh":
pdfLoadFont ( fontname ) RETURNS font_handle
- makes a known, installed font available. "fontname" is an alias-like name, e.g. "Helvetica"
pdfLoadFontFile ( filename ) RETURNS font_handle
- loads a font by specifying the font file name, e.g. "COURBD.TTF" (if TTF supported - don't know) or "HELVB.OFM"
- Note: I don't know enough on how Acrobat handles fonts (or font files). PLease bear with me
- Note: I don't have OS/2 or eCS at hand. Sorry if the postscript font files use a different extension (PFM? ATM? WTF?

)
I guess you know what I meant here...
pdfFontSize ( font_handle, pointsize )
- sets the text size to "pointsize" points, e.g. "12" means 12-point ...for the font associated by font_handle
pdfFontWeight ( font_handle, style )
- sets the text style (any combination of "italic", "bold", "underlined" ) for the font associated by font_handle
pdfShow ( doc_handle, font_handle, textstring )
- outputs the text specified by "textstring" at the current cursor location on the current page of the doc_handle document
- updates (increments) the current writing position to after the end of the text just printed
pdfGetTextSize ( font_handle, textstring ) RETURNS sizepoints
- calculates the width in POINTS (measure of page) for the string specified by "textstring" if it would be printed using
the font as specified by font_handle
pdfGetCurrPos ( doc_handle ) RETURNS pos_x, pos_y
- retrieves the x/y coordinates (in POINTS, measure of page) of the current writing position
(e.g "0,0" = left/top corner)
pdfSetCurrPos ( doc_handle, pos_x, pos_y )
- sets the coordinates (in POINTS, measure of page) of the current writing position (offset for next output function)
pdfShowAt ( doc_handle, font_handle, textstring, pos_x, pos_y )
- for the lazy: combines pdfSetCurrPos() and pdfShow() into 1 function
pdfLoadPicture ( filename ) RETURNS pic_handle
- allocates a buffer to hold the file contained in the graphics file "filename" (fully-qualified; drive-path-filename-exstension)
- loads the picture from the graphics file specified by "filename" into memory buffer
- makes that buffer being accessible as "pic_handle"
- Note: Formats supported initially: BMP, PNG (no transparency support needed at first), JPG
pdfShowPicture (doc_handle, pic_handle, [size_x, size_y] )
- outputs the picture specified by pic_handle at the current writing position with no scaling/clipping/shrinking
- if size_x and size_y are specified, the picture is resized accordingly to these new dimensions before printing it
pdfLine ( doc_handle, pos_x1, pos_y1, pos_x2, pos_y2, thickness )
- draws a line from coordinate pos_x1/pos_y1 to coordinates pos_x2/pos_y2 using "thickness" points width
(e.g. 12,100,100,150,3 -> draws a line of 3pt thickness from x=12,y=100 to x=100,y=150)
Well, that's all I need for the first round.

- text justification stuff can be easily figured out by using pdfTextWidth and pdfSetCurrPos
- no line feed stuff needed in first round, this can be programmed by using pdfSetCurrPos
- no watermark or signature or hyperlink crap needed now
- almost everything basic is feasible with these functions
Hope I was able to somehow explain what I meant.
Cheers,
Thomas