PDF output from Progress OpenEdge

Posted by mugwisievans on 30-Oct-2019 07:01

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.

All Replies

Posted by jamesmc on 30-Oct-2019 09:18

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.

Posted by Jean-Christophe Cardot on 30-Oct-2019 09:55

Hi

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.

Regards

JC

Posted by mugwisievans on 30-Oct-2019 12:37

Am I right that PDF4Net does not do for 4GL?

Posted by jamesmc on 30-Oct-2019 12:49

We interact with the assembly through ABL code.  We also use it with other languages that we use too.

Posted by mugwisievans on 31-Oct-2019 07:53

how can I understand it better? I am curious, it can be the solution to my problem

Posted by avtar.jain on 31-Oct-2019 11:10

Hi,

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").

Wordappl:ActiveDocument:SaveAS("c:\temp\testfile.pdf",17).

wordappl:QUIT(FALSE).

RELEASE OBJECT wordAppl.

end.

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.

Posted by Pierre Blitzkow on 31-Oct-2019 11:38

Great solution @avtar.jain. This way I didn't know.

Thanks for share.

This thread is closed