How to setup and config PDFInclude in windows server

Posted by vinhng on 04-Dec-2018 02:29

Hello guys.
I'm newbie,I have a project auto export to PDF when running a Report Framework in QAD software.
I downloaded PDFInclude 3.3.3 tool and I compiled in Character Client (CHUI) with example file code " Hello.p " but it didn't work, not create file PDF and not error message. 
+ Please help me to tell the reason.
+ Please tell me, How to setup and config with source code PDFInclude to run in Windows Server 2008 and Linux (step by step). 

My example Code : Hello.p
/*====================================*/
{ pdf_inc.i }

RUN pdf_new ("Spdf", "C:\trunk\hello.pdf").
RUN pdf_new_page ("Spdf").
RUN pdf_text ("Spdf", "Hello World!").
RUN pdf_close ("Spdf").
IF RETURN-VALUE > '' THEN
MESSAGE RETURN-VALUE
VIEW-AS ALERT-BOX ERROR BUTTONS OK.

/*===================================*/
Thanks so much.

Posted by Jean-Christophe Cardot on 06-Dec-2018 10:08

Hi

Then your OpenEdge is 64 bits, and the zlib.dll which is in pdfInclude 3.3.3 is only 32 bits. So you have to find a 64 bits dll for zlib, and update pdf_pre.i in order to point to this one instead of the zlib.dll which comes with pdfInclude.

Regards

JC

PS: it would be nice to mark the question as answered now, as the original question is answered.

All Replies

Posted by Jean-Christophe Cardot on 04-Dec-2018 14:05

Hi

You do not give enough detail. If there is really no error message then the pdf file should be generated.

In which kind of session do you run this? Under Windows, Appbuilder?

If it is in a kind of Appserver then check the logs.

Regards

JC

Posted by vinhng on 05-Dec-2018 06:58

Hello @Jean-Christophe Cardot.

Please ,Could you help me how to use the source code "PDFInclude3.3.3" in with Progress developer studio.

I created project in tool Progress Developer Studio but it not work and no error message.

My example code: "Hello.p"

/*==================================================================*/

{ D:\HUUNHAT\Openedge\Develop_studio\pdfinclude\src\samples\support\config.i }

{ D:\HUUNHAT\Openedge\Develop_studio\pdfinclude\src\pdf_inc.i "THIS-PROCEDURE"}

RUN pdf_new ("Spdf",cPdfIncludePath + "hello.pdf").

RUN pdf_new_page ("Spdf").

RUN pdf_text ("Spdf", "Hello World!").

RUN pdf_close("Spdf").

IF RETURN-VALUE > '' THEN

   MESSAGE RETURN-VALUE

       VIEW-AS ALERT-BOX ERROR BUTTONS OK.

/*===================================================================*/

This file : "config.i",  i using in "Hello.p"

/*==================================================================*/

DEFINE VARIABLE cPdfIncludePath AS CHARACTER   NO-UNDO.

DEFINE VARIABLE cWinDir AS CHARACTER   NO-UNDO.

ASSIGN

   cPdfIncludePath = 'C:\Fadiese\temp\pdfinclude\'

   cWinDir = 'C:\winnt\'

   .

/*==================================================================*/

Regards

Vinhng.

Posted by Jean-Christophe Cardot on 05-Dec-2018 08:59

You have to add D:\HUUNHAT\Openedge\Develop_studio\pdfinclude\src to PROPATH.

In config.i, I doubt cPdfIncludePath is correct: should not it be also D:\HUUNHAT\Openedge\Develop_studio\pdfinclude\src?

Posted by vinhng on 06-Dec-2018 09:45

Hi @Jean-Christophe Cardot,

yup,when i add D:\HUUNHAT\Openedge\Develop_studio\pdfinclude\src to PROPATH then my code worked. But when loading pdf template :" Could not load DLL procedure zlib.dll due to mismatch between 32-bit and 64-bit images.(16883) ".

please help me.

Regards

Vinhng.

Posted by Jean-Christophe Cardot on 06-Dec-2018 10:08

Hi

Then your OpenEdge is 64 bits, and the zlib.dll which is in pdfInclude 3.3.3 is only 32 bits. So you have to find a 64 bits dll for zlib, and update pdf_pre.i in order to point to this one instead of the zlib.dll which comes with pdfInclude.

Regards

JC

PS: it would be nice to mark the question as answered now, as the original question is answered.

Posted by vinhng on 06-Dec-2018 10:26

Hi @ Jean-Christophe Cardot.

I have search 64 bits dll for zlib but i haven't find it. could you attach this file dll for me. please.

Regards.

Vinhng.

Posted by Jean-Christophe Cardot on 17-Dec-2018 19:47

Hi

Sorry for the late answer.

Try this: http://jice.free.fr/pdf/zlibwapi.zip

Regards

JC

Posted by Jean-Christophe Cardot on 17-Dec-2018 19:48
This thread is closed