Au secours (HELP)
I have been using PDFinclude to generate forms using PDF form fields with success using Progress 9 and
OpenEdge 10 32 bit.
I recently had to upgrade my version of OpenEdge 10.2A from 32bit to 64bit on AIX 6.1 64bit.
I made sure to extract the libz.so.1 64bit version from the zlib-1.2.3 library.
But now, the decompress function call (function found in the zlib library) returns the error code -5, so it no longer works.
Can anyone help me ?
OpenEdge 10.2A 64bit, AIX 6.1 64bit, PDFInclude 3.3.3, zlib 1.2.3
PDFinclude with OE 64bit - zlib problem
You need to modify the compress and uncompress "External Zlib procedure definitions" in pdf_inc.p Change the iDestSize and iSourceSize parameter definitions from "Long" to "Int64". That should resolve the problem.
Solution
Hello, we had the same problem. Our solution:
1) change avail_out data type in zlib.h from uInt to uLong
remove data type casts from uncompr.c to get that form:
stream.avail_out = *destLen;
if (stream.avail_out != *destLen) return Z_BUF_ERROR;
2) compiling the library with 64bit option. Use GCC with -aix63 and ar with -X64 (change in makefile)
3) in Progress source:
From help:
„On 64-bit platforms, long integers passed from a shared library to Progress will lose their upper four bytes.”
altough zlib works well, Progress get wrong pointer and length will be zero.
To function decompressbuffer in pdf_inc.p, after RUN uncompress (first define j as int):
/* calculating new size */
do j=1 to (inputsize * 200):
if get-byte(tempbuffer,j) = 0 then do:
j = j - 1.
leave.
end.
end.
if retcode=0 and outputsize=0 then outputsize=j.
if zlib returns 0 (OK) but the new size is 0, we find the new length (first byte 0)
In our AIX system the above works.