Besides PDFInclude for pdf output from Progress OpenEdge database, is there another latest Library which I can use for pdf output. On the other hand, if I need additional fonts apart from the 14 base fonts in pdfinclude, how do I add extra custom fonts, for example, all from Microsoft Office.
You don't mention what platform you want to build your PDF's on so this may or may not be of use, but I switched from using PDFInclude to using PDF4NET (www.o2sol.com/.../overview.htm) (a .NET assembly) for our PDF production. It is much faster and has many more features (as you would expect from a commercial package). We still use PDFInclude in places but it does show its age a little now.
To answer your other question, we load external fonts into PDFInclude, like so...
RUN pdf_load_font IN h_pdfinc ("Spdf","Code39", "fonts\code39.ttf", "fonts\code39.afm", "").
RUN pdf_set_font IN h_pdfinc ("Spdf", "Code39", 12.0).RUN pdf_text_color IN h_pdfinc ("Spdf", 0, 0, 0).RUN pdf_text_xy IN h_pdfinc ("Spdf", "1234567890", 185, 43).
You do need to generate the afm file from your ttf file for this to work though, instructions on how to do this are int he PDFInclude documentation.
pdfInclude also is now a commercial package, with lots of new funcionalities and big performance enhancement, And you'll have the source code; being 4GL it will still work for the years to come. Current version is 5.1, and lots of it has been rewriten since version 3,3 you must be using.
The new version also allows you to load fonts without having to generate an afm file, and is able to embed only the used glyphs in the generated pdf (for size sake).
If you are interested you can go to http://pdfinclu.de and contact me from there. You have the new documentation there where you can see all the new functionalities.
Am I right that PDF4Net does not do for 4GL?
We interact with the assembly through ABL code. We also use it with other languages that we use too.
how can I understand it better? I am curious, it can be the solution to my problem
If you are on a windows machine then there is quite an easy way to directly generate PDF from within openedge.
Here is simple 4GL for your persual -
DEF VAR wordappl as com-handle.
DEF VAR Word-Func-OK AS LOG.
CREATE "Word.Application" wordAppl.
do on error undo, LEAVE:
Word-Func-OK = wordappl:Documents:OPEN("c:\temp\testfile.docx").
RELEASE OBJECT wordAppl.
c:\temp\testfile.docx is a pre-formed template created using MS WORD. If you know about handling MergeMarks wihtin MSWORD using 4GL then this will give you added advantage to dynamically modify content within template before converting it to PDF.
Great solution @avtar.jain. This way I didn't know.
Thanks for share.