V4.0.3 (June 20, 2002) ====================== Bug fixes and enhancements ========================== - PDF_show_boxed() erroneously applied user-defined wordspacing if another show function had been called before PDF_show_boxed(). This could result in text running beyond the right margin of the box (p_text.c). - Annotations erroneously were colored black instead of the selected color when PDF_set_border_color() was called with (0, 0, 0) arguments near the end of a page; similarly with PDF_set_border_style() (p_annots.c.). - Implemented parameter checks for negative values of linejoin or linecap (p_gstate.c). - Implements a workaround for bad entries in PFM metrics files which otherwise would result in an Acrobat error message (p_pfm.c). - Additions to the parameter handling (p_params.c, p_params.h): - Implemented the "pagewidth" and "pageheight" parameters for PDF_get_value(). - Implemented the "scope" parameter for PDF_get_parameter(). - Relaxes the scope of the currentx/currenty parameters to also include scope path (p_params.h). - Implements the "colorize" parameter for GIF images. Although this works for all GIFs it is really only meaningful for grayscale GIFs in which the palette index equals the gray value for all elements of the colormap (p_gif.c, p_image.c). - Avoids problems with duplicate spot color definitions: PDFlib didn't catch multiple definitions of the same spot color name with different color definitions. Now the same handle is returned for any subsequent attempt at defining the same color name with PDF_makespotcolor() (p_color.c). - Added the Acrobat 5 CJK fonts to the list of known CJK fonts (p_cid.h). - Finetuning in the TrueType engine (p_truetype.c, p_truetype.h): - Detect and properly reject Apple bitmap TrueType fonts. - Accept TrueType fonts with a format 65535 name table. This format is not documented in the specs but is nevertheless used by some Apple fonts. - Amends the TrueType parser so that the OS/2 table is no longer required. If it is missing the required information is pulled from other tables. This was necessary to accommodate some Apple fonts which do not contain any OS/2 table. Fonts with an OS/2 table but zero entries in it are now detected and correctly handled. - TrueType fonts with a format 6 cmap with more than 256 entries were incorrectly rejected. This was caused by the new cmap 6 code introduced in PDFlib 4.0.2 which incorrectly assumed that cmaps with format 6 never contain more than 256 entries. Previously this kind of cmaps wasn't read at all (p_truetype.c, p_truetype.h). - Fixed a memory leak in the TrueType handling. This bug has actually already been fixed before the 4.0.2 release, but the entry was omitted from the change log (p_truetype.c). - Avoids the Acrobat message "Unable to find or create the font. Some characters may not display or print correctly" for fonts which are not embedded and use macroman or ebcdic encoding (p_font.c). - 1-bit uncompressed TIFF images with PHOTOMETRIC_MINISWHITE erroneously got inverted (bug introduced in PDFlib 4.0.2 with the compression fix for uncompressed TIFF images). - TIFF images which didn't contain the required StripByteCounts Tag could provoke an out-of-memory situation. This was caused by a bug in TIFFlib which failed to calculate the proper file size in an attempt at estimating the missing StripByteCounts value (tiff/tif_unix.c). - Fixed a few bugs on EBCDIC platforms: - spot color names were treated incorrectly (p_color.c). - Added several EBCDIC conversions for hypertext items as a convenience for EBCDIC developers (p_annots.c). - Added EBCDIC conversion of fileref and url for PDF_open_image() (p_image.c). - Fixed a problem with spot colors: setting "both" colors or "stroke" color to the same as the current "fill" color didn't actually generate the required color values due to some bad optimization (p_color.c). - The value of the /Subtype key for embedded files (PDF_attach_file()) had been written as a string instead of as a quoted name. This went unnoticed because Acrobat doesn't actually use this value (p_annots.c). - Slightly modified the zlib sources to improve portability (flate/*). - Fixed a bug related to custom memory management functions in TIFFlib. This bug resulted in a crash when PDFlib was used with PHP on OS X and possibly other environments, too (tiff/tif_open.c). - The tests for the values of CropBox and the other *Box entries were too strict, and allowed only positive values (p_params.c). - Rewrites the code for setting the Mac file type and creator to be Carbon- compatible, and enables it under OS X (p_basic.c). - Adds support for Mac-style resource-based PostScript Type 1 fonts, also known as LWFN fonts (p_font.c). - Adds host font support on the Mac using the Carbon API, currently only for TrueType and OpenType fonts (p_font.c). - URLs and filenames used in PDF_add_weblink(), PDF_add_launchlink(), PDF_add_pdflink(), and PDF_attach_file() didn't get quoted correctly. This could result in bad PDF output in rare occassions, e.g., when unbalanced parentheses occurred in an URL (p_annots.c). - 13 #defines for renaming PNG functions were missing, which resulted in an incompatibility when PDFlib was linked against a program which another instance of libpng, version 1.2.1 (png/pngconf.h). - PDF_add_pdflink() generated wrong output for the destination page (a local object reference instead of a page number). This resulted in incorrect PDF output (which Acrobat happily digested nevertheless), and the target PDF always being opened on the first page (p_annots.c). - PDF_add_pdflink(), PDF_add_launchlink(), and PDF_attach_file() resulted in a file specification with the wrong /FileSpec key instead of /Filespec. This went undetected for a long time since Acrobat accepts both flavors, although only /Filespec is correct according to the reference (p_annots.c). Bindings ======== - C: - Introduces auxiliary functions and modules for using PDFlib as a DLL, and loading it dynamically at runtime (explicit linkage): - PDF_get_api() function for retrieving function pointers (pdflib.h, p_basic.c). - A module for loading the PDFlib DLL at runtime, and retrieving API function pointers in a structure (bind/c/pdflibdl.c/h). - Java: - Searches for JDK 1.4 (configure.in). - Removes the EBCDIC conversion of Unicode strings supplied by the client (pdflib_java.c). - p.add_note with Unicode contents resulted in a core dump due to a missing conditional in GetStringUnicodePDFChars() (pdflib_java.c). - No longer exit() if the PDFlib DLL cannot be loaded, but rethrow the UnsatisfiedLinkError. In addition, the value of the java.library.path property is printed (pdflib.java). - Finetunes the Java context pointer and cleanup machinery (pdflib.java, pdflib_java.c): - Calling the delete() method multiply resulted in a crash. - Now it is allowed to call delete() multiply. - Attempting to call methods other than delete() after a call to delete() will raise an exception. - Increased the supported maximum number of Java threads on the AS/400. - The wrapper functions for get_buffer() and setpolydash() crashed on the AS/400 because a required macro was missing (pdflib_java.c). - The wrapper function for get_parameter() was missing a call to ReleaseStringPDFChars() (pdflib_java.c). - PHP: - PDF_open_image() didn't work with a "memory" parameter (pdf.c). - Minor modifications for PHP 4.2 (pdf.c). - PDF_get_value() and PDF_get_parameter() can be called without a PDF object for the parameters minor/major/revision/version/pdi (pdf.c). Build process and platform support ================================== - Fixes a bug which resulted in garbage data being read for certain data files (fonts and images) (p_config.h, p_util.c). - Fixed a buglet related to installing pdflib-config to a non-existing bin directory (Makefile.in). - Fine-tuned the #defines for MVS and OS390 (png/pngconf.h, p_intern.h, p_config.h, p_util.c, p_font.c). - Renamed tiff/tif_aux.c for better compatibility with our internal processes for MVS (tiff/tif_auxx.c). - Added support for building PDFlib as a shared library on the Mac (pdflib.h). - The configure script didn't work on Mac OS X (configure.in) - Added "all" targets to the CodeWarrior project files (*.mcp). - The CodeWarrior test project file contained a few wrong output paths for the Mac projects (PDFlib-test.mcp). - Changed all CodeWarrior Mac targets to use the Carbon library. This is mainly useful for the Mac host font feature, and will ease the transition to CW 7 (*.mcp). - Reworked the handling of platform-specific preprocessor symbols on the Mac. V4.0.2 (February 01, 2002) ========================== Bug fixes and enhancements ========================== - The color of attachment icons wasn't written to the output file. This was especially evident in Acrobat 5 since the default color has been changed from blue to gray (p_annots.c). - Long link targets with the functions PDF_add_pdflink, PDF_add_launchlink(), PDF_add_weblink(), and PDF_attach_file() could result in a buffer overflow due to incorrect use of pdf_printf() (p_annots.c). - Added special handling for the /Trapped info key (p_hyper.c). - Improves CMap support (p_cid.h): - Adds several new CMaps for use with Acrobat 5 (GBKp-EUC-H/V, GBK2K-H/V, HKscs-B5-H/V). - Introduces PDF version checking for CMaps since not all CMaps are supported in all Acrobat versions. - Adds an MD5 digest for the /ID string in the PDF output (p_md5.h, p_md5.c). - The resolution values returned for PNG images were wrong, since PDFlib failed to convert the values returned by libpng from pixels per meter to pixels per inch. Similarly, aspect ratios weren't returned correctly for PNG images (p_png.c). - CCITT-compressed images could result in bad PDF output on big-endian machines due to a missing cast. The problem did not affect page display in Acrobat, but PostScript printing (p_image.c). - Resets all graphics state parameters to their default values before placing templates if the new "inheritgstate" parameter is set to "false". Note: this will be the dafault behavior in future versions (p_image.c, p_gstate.c). - Optimizes content streams by eliminating redundant graphic state parameters. Setting a parameter to its current value is now a no-op (p_gstate.c, p_color.c). - Relaxes the scope of PDF_makespotcolor() and PDF_setcolor() to also include document scope (p_color.c, p_basic.c). - Fine-tunes transparency and image masking support (p_image.c, p_tiff.c, p_jpeg.c, p_png.c, p_color.c): - Implements the "colorize" parameter for images. - Supports the "mask" parameter for TIFF images. - Implements the placing of images which have been opened with the "mask" parameter (as opposed to using them as a mask for another image). The image will have the current fill color applied to it. - Add the /Type key for form XObjects. This key is optional according to the PDF reference, but is actually required by some brain-damaged PDF-capable RIPs (p_template.c). - PFM processing (p_pfm.c): - The PFM reader accepts PFM files with a bad length entry in the header since such files actually exist. - The name of the offending file is included in the error message when a bad PFM file is rejected. - Removed a redundant comment line with a superfluous version number which was written to the PDF output in PDF 1.4. compatibility mode (p_basic.c). - Implements and documents strict scope checking for all parameters (p_params.h). - In rare cases pdf_printf() could produce "-0" output for very small negative values, which didn't cause any harm but was redundant (p_stream.c). - Enhancements in the code page tables (fonts/*): - Removed some garbage at the end of code page 1252. Accidentally winansi encoding has been suffixed to the 1252 codepage file, but this data has been ignored anyway (fonts/cp1252.cpg). - Adds code page definitions for ISO 8859-13, -14, and -16. Note that ISO 8859-14 doesn't completely work in Acrobat since it uses characters outside the Adobe Glyph List AGL (iso8859-13.cpg etc.). - Changes positions 0xA1 and 0xA2 in the ISO 8859-7 code page to the correct left and right quotation characters (iso8859-7.cpg). - Changes position 0xF0 in ISO 8859-2 code page from U+00F0 = eth to U+0111 = dcroat (iso8859-2.cpg, iso8859-2.enc). - Adds U+200E and U+200F at positions 0xFD and 0xFE in the ISO 8859-8 code page (iso5589-8.cpg). - Reads resolution information from JPEG images generated by Adobe Photoshop (p_jpeg.c). - Changes and improvements in TrueType/OpenType handling (p_truetype.c): - Accepts fonts where the names[6] entry in the name table is missing, and substitutes names[4] instead. - Supports OpenType fonts with PostScript outlines (OTF, aka CFF fonts). - Supports cmap table format 6 which is used for the Mac encoding of Adobe OpenType fonts. - The quoting functions for PDF names didn't correctly quote the special characters (, ), /, <, >, [, ], {, }, %, and #, which may occur as part of spot color names or (in rather obscure cases) as part of TrueType font names (p_util.c). - Changes and bug fixes in the text engine (p_text.c): - Fine-tunes the behavior of PDF_stringwidth() (p_text.c): - Increased the number of encodings which can be used simultaneously in PDFlib in order to facilitate testing (p_intern.h). - Extends the scope of PDF_stringwidth() to path and document. - Includes the last character's charspacing amount in the calculation of the complete stringwidth. - Removes the projected text rise adjustment from the stringwidth calculation, since it only affects the position of the rendered text, not its length. - The textrise, horizscaling, charspacing, and wordspacing can now be set in document scope, and will be reset at the end of pages. - PDF_show_xy(p, text, 0, 0) didn't work if the previous text position was different from (0, 0). - PDF_show2() didn't correctly implement overline mode. - Fixed a bug in PDF_show_boxed() where initial characters could get lost (p_text.c). - Fixed a bug in PDF_show_boxed() which could result in an exception with the message "floating point value too large in pdf_ftoa" (p_text.c). - Implements an unsupported PDF_encoding_get_char() function for querying glyph names from an encoding vector (p_font.c, pdflib.h). - Changes and improvements in the TIFF engine (p_tiff.c): - Uncompressed TIFF images have been passed through directly without any compression applied, resulting in output file bloat. - Fixed a bug in the TIFF code which resulted in illegal memory access. The bug was triggered by uncompressed CMYK TIFF images. - Eliminates some informational messages which zlib emitted in debug mode (flate/zutil.h). - Allows PDF_get_parameter() and PDF_get_value() to be called with a NULL argument for the PDF *. Affected parameters are "major", "minor", "revision" (for PDF_get_value()) and "version", "pdi" (for PDF_get_parameter()) (p_params.c). Build process and platform support ================================== - Updates the CodeWarrior project files to CW 6 (*.mcp). - Minor configuration changes for Mac OS X 10.1 (config/aclocal.m4). - Switches to libtool 1.4 (config/*). - Modifies type names in the TIFF library in order to avoid non-ANSI C problems on some platforms (tiff/*.c, tiff/*.h). - Improved support for building PDFlib on AIX. - More MVS modifications (*.c). - Changes for Windows CE compatibility. Documentation ============= - Enhances the PDFlib manual with the help of the FrameMaker-to-Acrobat TimeSavers (see www.microtype.com): - Fixes several broken links at the end of the manual. - Reduces file size be several hundred KB due to eliminated named dests. - Open document with first-level bookmarks expanded for better overview. - Highlight first-level bookmarks with bold text (visible only in Acrobat 5). - Introduces a separate manual edition for IBM eServer iSeries and zSeries (PDFlib-manual-ibm.pdf). Bindings ======== - C++: - Renames the PDF class to PDFlib. This is transparent to clients since a mapping is provided through preprocessor macros (pdflib.hpp). - Implements a new scheme for exception handling which is more suitable for use with C++ than the previous scheme which was still based on a user-supplied errorhandler callback function. For compatibility reasons the old scheme is still the default, and the new one can be activated by #defining PDF_THROWS_CPP_EXCEPTIONS (pdflib.cpp, pdflib.hpp, except.h, except.c). - Java: - Added "@deprecated" Javadoc comments to the the setgray* and setrgbcolor* functions (pdflib.java). - Added JSP and servlet versions of all standard examples (jsp/*, servlet/*). - Removed obsolete declarations for the following native functions from the Java interface file (pdflib.java): PDF_get_image_width, PDF_get_image_height - Removed the following functions from the C wrapper, and maps them to the new PDF_color() interface in the Java interface file (pdflib.java, pdflib_java.c): PDF_setgray_fill PDF_setgray_stroke PDF_setgray PDF_setrgbcolor_fill PDF_setrgbcolor_stroke PDF_setrgbcolor - Out-of-memory situations in PDF_new() could result in a crash, caused by a bug in the Java wrapper (pdflib_java.c). - Exposes the delete() method which may be useful to explicitly free PDFlib resources in case the GC fails to call the supplied finalizer (pdflib.java). - Fixes a bug in the Unicode handling of the Java wrapper which could cause characters to get lost when native Chinese or Japanese encodings were used for the Java source (pdflib_java.c). - Perl: - Removed the "unknown" entry in the Perl version string since the respective version #define is no longer available in Perl >= 5.6 (pdflib_pl.c). - PHP: - Supports PHP 4.1.x - Major rewrite of the PHP build and support machinery: - new mega build script for PHP modules for internal use (buildphp.pl). - added several support files (bind/php/ext/pdf/*) - removed several unneeded files (*.mk, *.stub) - PDF_get_value() didn't work correctly for the capheight, ascender, and descender parameters because the wrapper code failed to adjust the supplied font handle by PDFLIB_FONT_OFFSET (pdf.c). - Synchronizes the wrapper code with the PHP CVS version (ext/pdf/pdf.c): - added PDFlib 3 compatibility (imagewarning parameter) - several enhancements for the PHP build process - comments for vi folding - added warning_undef_function for unsupported functions - RPG: - Fine-tunes the RPG binding. V4.0.1 (May 18, 2001) ===================== Bug fixes and enhancements ========================== - Removed the time-bomb feature of the beta versions which accidentally was still present in the release version of PDFlib 4.0.0 (p_basic.c). - PDF_show_boxed() erroneously returned the value 1 if the text completely fit in the box, and the last character was a newline (p_text.c). - Fixed a bug in the image mask handling which had some interaction with the total number of images, and the fact whether or not images had been closed and therefore image handles reused (p_image.c). - Non-interlaced PNG images were erroneously rejected when used as a mask (p_image.c). - Individual strips of separate multi-strip TIFF images could get mixed up under certain circumstances when the first image had already been closed before placing subsequent images (p_image.c, p_image.h, p_intern.h, p_basic.c). - The values of ascender and descender were wrong for TrueType fonts since we picked tab_hhea->ascender instead of tab_OS_2->sTypoAscender (p_truetype.c). - The scope check in PDF_stringwidth2() was too strict (p_text.c). - /FontName was garbled on EBCDIC platforms, but it's unused anyway (p_font.c). - Due to a bug in pdf_make_quoted_name() quoted characters in spot color names could appear with wrong hex codes (p_util.c). - Creating and deleting a PDFlib object without any documents created resulted in a wrong exception (p_stream.c) - Implements host encoding support for AS/400 and S/390 (p_util.c, p_font.c, p_intern.h) - Using a CID font caused a crash due to inappropriately freeing static strings (p_cid.h) - EBCDIC and CID encoding were rejected in PDF_show_boxed() even when no box justification was requested (width=0 and height=0) (p_text.c). Build process and platform support ================================== - Minor modifications for AIX compatibility (configure.in, tiff/tiff.h). - AS/400 fine-tuning (p_config.h, several *.c). - Fixed MVS-related macros (p_config.h) - Removed unnecessary PHP make targets which caused an error (Makefile.in, configure.in) Bindings ======== - C: - Replaced the deprecated function setrgbcolor() with PDF_setcolor() in the pdfclock sample. - C++: - Replaced the deprecated function setrgbcolor() with PDF_setcolor() in the pdfclock sample. - Java: - Replaced the deprecated function setrgbcolor() with PDF_setcolor() in the pdfclock sample. - A few mainframe-related fixes in the wrapper code (pdflib_java.c). - Clear pending exceptions if any of the JNI functions in the initialization fails since JNI doesn't allow more than one pending exception. (pdflib_java.c). - Makes the private functions PDF_new() and PDF_delete() in the PDFlib Java object synchronized (pdflib.java). - Modified the internal version of the Java wrapper for use on the AS/400 (pdflib_java.c). - Perl: - Replaced the deprecated function PDF_setrgbcolor() with PDF_setcolor(). in the pdfclock sample. - PHP: - Replaced the deprecated function PDF_setrgbcolor() with PDF_setcolor(). in the pdfclock sample. - A required image handle conversion was missing in the wrapper code for PDF_open_image_file(), resulting in erroneous error messages when trying to mask images (pdf.c). - Python: - Replaced the deprecated function PDF_setrgbcolor() with PDF_setcolor(). in the pdfclock sample. - Tcl: - Replaced the deprecated function PDF_setrgbcolor() with PDF_setcolor(). in the pdfclock sample. - RPG - Introduced a new binding for ILE-RPG on the AS/400 (bind/rpg/*). V4.0.0 (April 18, 2001) ======================= Bug fixes and enhancements ========================== - Implements a check in PDF_delete() in order to make sure that the caller acutally fetched the last chunk of PDF data via PDF_get_buffer() (p_intern.h, p_basic.c, p_stream.c). - Several modifications in the TrueType module (p_truetype.c): - Allow TrueType symbol fonts (such as Webdings and Wingdings) to be used with "builtin" encoding. - When font warnings are enabled (default) issue a concise error message when a TrueType font file can't be opened or read, or is empty. - The TrueType module didn't always correctly distinguish between exception and error return when a problem with a font was detected. - Fine-tuned the trace debug facility (several *.c). - Optimize the underline/overline/strikeout functions for empty text strings (p_text.c). - PDF_continue_text2() didn't correctly deal with a NULL text argument under certain conditions, and failed to enter a text block and set the text parameters (p_text.c). - Throw an exception in PDF_show_boxed() if the current font uses CID or EBCDIC encoding (p_text.c). - Change the scope back to object if fopen() fails in PDF_open_file(). This guards against clients which fail to check the return value of PDF_open_file() (p_basic.c). - PDF_open_image() didn't set the use_raw flag for JPEG- and CCITT- compressed images, resulting in bad output filters (p_image.c). - Implements hooks for fetching encoding definitions from the host system (p_font.c, p_util.c). - Modifies the error handling machinery so that the error handler is never called with a NULL PDF pointer, even when the initial PDF allocation in PDF_new2() goes wrong. This way error handlers installed by the client are guaranteed to have access to thread- or object-specific data in all cases (p_basic.c). Build process and platform support ================================== - Adjusts more language bindings to Mac OS X (see below). - Disable the PHP binding if an external library was configured (configure.in). - Moves an inherited LDFLAGS variable to the front of EXTERNALLIBS in order to make external -L paths work (configure.in). - Installs the pdflib-config script to make it more useful (Makefile.in). - Extends the pdflib-config script to include auxiliary information such as PDFlib's install path, binding information, PDI existence, and a summary (pdflib-config.in). - AS/400 portability mods and support for more compile-time code pages (p_stream.c, p_config.h). - More MVS portability fixes (p_config.h tiff/port.h). - Change the libtool version number to 2:0:1 in order to somehow fix the bug in 3.03 which incorrectly increased the age entry (configure.in). Bindings ======== - Perl: - Always call PDF_delete() in the error handler since the PDF pointer is now guaranteed to be different from NULL (pdflib_pl.c). - Removed -lm for $PERLLINK on HP-UX (configure.in). - PHP: - Cleans up the configure machinery which no longer must check for the presence of any auxiliary library (config.m4). - Python: - Always call PDF_delete() in the error handler since the PDF pointer is now guaranteed to be different from NULL (pdflib_py.c). - Introduces a hack for renaming the Python wrapper library on Mac OS X from libpdflib_py.dylib to pdflib_py.so(!), which apparently is what Python expects (Makefile.in). - Tcl: - Removed the pkgIndex.tcl Makefile target and rule because we no longer must build the index file dynamically (Makefile.in). - Introduces a hack for renaming the Tcl wrapper library on Mac OS X from libpdflib_tcl.dylib to pdflib_tcl.dylib (Makefile.in). V4.0.0beta3 quick fix (April 9, 2001) ===================================== Bug fixes and enhancements ========================== - Add /Matrix and /FormType entries to the form xobjects dictionary. Although these are not required according to the PDF reference (new edition), they _are_ required according to the PDF reference (old edition) and -- more importantly -- by several PDF consumers such as Ghostscript, some Adobe RIPs, and the PostScript output of Acrobat 4.0 (but not 4.05). (p_template.c, pdi.c). V4.0.0beta3 (April 5, 2001) =========================== Bug fixes and enhancements ========================== - Consistently use the Windows API name for TrueType fonts, regardless of whether they have been read from file or retrieved from the host system (p_truetype.c). - TrueType symbol fonts couldn't be used (p_truetype.c). - Implements support for flate-compressed TIFF images (p_tiff.c, tiff/*.c). - Start a new text block when a font set if we are not currently in a text block. This seems to be required by some Adobe RIPs and some third-party PDF consumers, although explicitly allowed in the PDF reference (p_font.c). - Throws an exception when the PDF document is empty (p_basic.c). - Fixed a memory overwrite in XObjects handling (p_image.c). - Fixed several memory leaks in the PNG module, and dropped support for libpng versions older than 0.88 (p_png.c). - Changes the PNG handler so that we can process simple PNG images even without libpng attached (p_png.c). - Resources were dropped between documents, meaning that for example fonts had to be configured again and again for multiple output documents with the same PDFlib instance (p_basic.c). - Reworked parameter handling, and introduced a new table for important parameter properties such as the scope (p_params.c, p_params.h). - Updated the utility for converting font metrics to a C header file (util/compile_metrics.c). - Regenerated the built-in metrics for the core fonts with the following changes (p_metrics.h): - Uses the new Adobe AFMs as input which have minor changes. - Correctly use the width of the space character for all undefined characters instead of the fixed value 250. - Uses the current encoding definitions, which had a few updates. - Generate more tense output. - Modified the getopt() stuff for easier building the demo clients on Windows (clients/*.c). - Fixed a memory leak in the GIF reader when the requested file couldn't be opened (p_gif.c). - Fixed memory leaks in the font engine, related to TrueType fonts and the builtin core fonts (p_font.c, p_truetype.c). - The default for floating point output accuracy (3) was too small, as evidenced by the pdfclock example. Increased to 4 (p_basic.c). - Fixed a nasty bug in pdf_compress_init(): due to missing initialization importing PDF pages on an otherwise empty page could result in a crash on some platforms (p_stream.c). Build process and platform support ================================== - Changes a few details for better MVS support. - Updates the Mac project files including support for the language bindings (*.mcp). - Updated the project files for Borland C++ Builder (*.brp, *.bpf). - Consolidated the predefined encodings into a single header file (p_encoding.h). - Improved portability in code and build process for a number of Unix platforms. - Replaced the GIF test image with a new one (test/machine.gif). - Statically links all C samples and demo programs (*/Makefile.in, configure.in). Bindings ======== - C: - Changes all clients to return 0 from the main program (*.c). - Runs the tests without libtool since we link statically (Makefile.in). - C++: - Adds typedefs to support the notion that all functions which are passed to PDFlib must be pure C (as opposed to C++) functions (pdflib.h, pdflib.hpp, pdflib.cpp). - Runs the tests without libtool since we link statically (Makefile.in). - Drops support for the Watcom compiler (pdflib.hpp, pdflib.cpp). - Changes namespace handling for non-gcc compilers (configure.in). - Adds casts to pacify the Sun compiler (image.cpp, personalize.cpp). - Java: - Adds a hack for Mac OS X to help the test and install process run even though OS X has its own idea of JNI library naming conventions (Makefile.in). - Perl: - Runs the tests without libtool since we supply -I options (Makefile.in). - Adds -lm (or equivalent) to the list of libraries against which the Perl wrapper is linked. This is required, for example, for some builds of Perl on Solaris (configure.in). - PHP: - Fixed a crash which was caused by a typo in the PDI memory functions. - Adds documentation on the PHP/PDFlib build process (readme.txt). - Python: - Fixes a systematic bug in all wrappers for the new 4.0 functions (pdflib_py.c, pdflib/pdflib.i). - Adds PDI examples (personalize.py, quickreference.py). - Tcl: - Renames the Tcl/PDFlib wrapper library on the Mac to pdflib_tcl.shlb, which is the name returned by Tcl's [info sharedlibextension] command (*.mcp). V4.0.0 beta2 (March 23, 2001) ============================= Bug fixes and enhancements ========================== - Removes all attempts to "repair" the file if API calls are incomplete, or in bad order. This greatly simplifies cleanup in case of errors. - Fully implements a scoping system which enforces the scoping rules documented in the manual. This may break clients which do not adhere to the scoping rules, but got away with the old implementation, potentially producing bad PDF output (pdflib/*.c, p_intern.h). - The "imagewidth" and "imageheight" parameters are now supported for templates, too (p_template.c). - Implements custom memory handlers for libpng and tifflib (png/pngmem.c, pdflib/p_png.c, pdflib/p_tiff.c). - Relaxed the encoding check for AFM files since so many AFM files out there are just plain wrong (mostly those generated by Fontographer (p_afm.c). - Improves the Unicode bookmark samples so that they work correctly on EBCDIC platforms (pdftest.c). - Implements pdf_vsprintf() which does the "right thing" for all kinds of formatted PDF output. In addition, we finally get rid of cursed NLS (pdflib/*.c, pdi/*.c). - Moved the PDI dummy functions to p_template.c, and removed p_pdi.c from the distribution fileset. - Delays resource cleanup until PDF_delete() (instead of PDF_close()) in order to keep configuration information across PDF output documents (p_basic.c). - Implements a real tree structure for the /Pages tree instead of a linear array. This greatly improves Acrobat's performance when navigating _very_ large documents (p_basic.c, p_intern.h). - Fixes a problem related to TrueType font names which resulted in bad font cache misses due to internal name mismatches. We cured this by storing the PostScript name of a TrueType font separately (name table entry 6. The fullName field is used for this since fullName was unused anyway (p_font.h, p_font.c, p_truetype.c, p_afm.c, p_pfm.c, p_metrics.h, util/compile_metrics.c). - pdflib.upr was loaded to early. This especially affected host fonts where no upr file is required, but an exception was thrown nevertheless (p_util.c). - Added "CharacterSet" to the list of recognized AFM keywords (p_afm.c). - Modifies the TrueType parser to gracefully deal with Unicode-based Mac fonts, although these are not yet supported (p_truetype.c). - Replaces the core 14 AFM files with newer versions which cover the ExtendedRoman character set (315 instead of 229 glyphs), and are therefore better suited for PDFlib's powerful encoding machinery (fonts/*.afm). - Changed the accuracy of imagewidth and imageheight from int to float to account for imported PDF pages and templates (p_image.h, p_tiff.c, p_ccitt.c, p_jpeg.c, p_gif.c, p_image.c, p_template.c). Build process and platform support ================================== - Supports local (uninstalled) static versions of the auxiliary libraries via the LDFLAGS environment variable (configure.in). - A variety of portability fixes in the auxiliary libraries (tiff/*, png/*, flate/*) plus a few more in PDFlib (pdflib/*). - Modifies the MSVC++ project files for the new library structure (*.dsw, *.dsp). - Brings the CodeWarrior project file for Mac up to date (PDFlib.mcp). - Several bug fixes and improvements in the configure machinery (configure.in, pdflib-config.in, */Makefile.in). Bindings ======== Java: - show_boxed didn't correctly retrieve its text argument as a Unicode string, resulting in wrong output for non-Latin-1 characters (pdflib_java.c). - stringwidth() didn't retrieve its text argument as a Unicode string (pdflib_java.c). Tcl: - Fully implements the use of Tcl's stub feature which allows us to use a single library with different Tcl versions (pdflib_tcl.c). - Modifies the index file so that it no longer requires the library name and the list of function names (pkgIndex.tcl). - PDF_show_boxed didn't correctly retrieve its text argument as a Unicode string, resulting in wrong output for non-ASCII characters (pdflib_tcl.c). - PDF_stringwidth() didn't retrieve its text argument as a Unicode string (pdflib_tcl.c). V4.0.0 beta1 (March 02, 2001) ============================= New features ============ - Implements support for the pattern color space (p_pattern.c, p_intern.h, p_basic.c, pdflib.h). - Adds support for spot color (p_color.c, p_intern.h, pdflib.h). - Adds a hook for attaching the PDF import library PDI (p_pdi.c). - Adds Unicode handling for TrueType and PostScript fonts (p_unicode.c, p_font.c, p_truetype.c). - Implements new parameters: major/minor/revision/version pdi pdiwarning CropBox/llx/lly/urx/ury BleedBox/llx/lly/urx/ury TrimBox/llx/lly/urx/ury ArtBox/llx/lly/urx/ury Bug fixes and enhancements ========================== - Major restructuring in order to better localize data types and related functions (most *.c and *.h). - Fixed a bug in the MacRoman encoding table: guilsinglleft and guilsinglright had a letter missing in their name. Since we never write MacRomanEncoding explicitly, the characters were available, but their widths were retrieved wrongly from an AFM file (e_macroman.h). - Added the missing Euro glyph to the cp1250 encoding table (cp1250.enc). Build process and platform support ================================== - Changes the library file name suffix for Mac OS X server (Rhapsody) from .so to .dylib (config/ltconfig). - Integrated zlib into the PDFlib distribution, configure, and make process, including a libtool-based Makefile. Similarly for parts of libpng and libtiff (configure.in, */Makefile.in, tiff/*, png/*, flate/*). - The search for Python's shared lib path could result in multi-line output under certain circumstances. We work around this with more sophisticated filtering of Python's sys.path, contributed by a user (configure.in). Distribution ============ - Adds the Lucidux Sans PostScript font as a sample (fonts/lcdxsr.*). - Adds code page definitions for all ISO 8859 flavors and Windows 125X code pages (fonts/*.cpg). - Adds a PDI demo client in C (pdfimpose.c), and the quick reference and personalize demos for all supported language bindings. - Adds a few user-contributed improvements to the image client (pdfimage.c). - Removes config/pdflib.m4 since it is no longer required. Bindings ======== PHP: - Adds a supported language binding for PHP (bind/php/*). Java: - Introduces PDF_VOLATILE in order to prevent scores of compiler warnings when building the wrapper (pdflib_java.c). Perl: - Introduces PDF_VOLATILE in order to prevent scores of compiler warnings when building the wrapper (pdflib_pl.c). Python: - Introduces PDF_VOLATILE in order to prevent scores of compiler warnings when building the wrapper (pdflib_py.c). Tcl: - Implements an initialization function to make the PDFlib extension work with safe builds of the Tcl interpreter (pdflib_tcl.c). - Introduces PDF_VOLATILE in order to prevent scores of compiler warnings when building the wrapper (pdflib_tcl.c). V3.5.0 (February 01, 2001) ========================== This version has only been released to a few customers. New features ============ - Makes the CMYK functions supported API members (p_color.c). - Makes PDF_arcn() a supported API function (p_draw.c). - Makes PDF_add_thumbnail() a supported API function (p_draw.c). - Implements the template feature (p_image.c, p_template.c, p_intern.h, p_basic.c, p_text.c, pdflib.h, Makefile.in). - Implements TrueType font support (p_font.c, p_afm.c, p_pfm.c, p_font.h, p_util.c, p_basic.c, p_truetype.c, p_truetype.h, p_intern.h, p_cid.h, p_metrics.h, Makefile.in). Bug fixes and enhancements ========================== - PDF_open_mem() didn't work due to a typo (p_basic.c). - PDF_set_parameter(p, "flush", "none") didn't work due to a typo (p_basic.c). Build process, distribution, and platform support ================================================= - Improvements for Mac OS X: - Makes libtool generate shared libraries (.dylib) on Mac OS X (ltconfig, ltmain.sh). Distribution ============ - Introduces the new major.minor.revision version numbering scheme (many files). Bindings ======== Java: - Makes the Java wrapper compatible with Mac OS X (pdflib_java.c). Tcl: - Configure now finds the Tcl header on Mac OS X (configure.in). V3.03 (December 22, 2000) ========================= Bug fixes and enhancements ========================== - Contrary to the documentation, a == sequence in the UPR file didn't guarantee absolute file names (no directory prefix applied) if a prefix has been set using PDF_set_parameter(). This especially affected the ActiveX edition where the wrapper always set a prefix, and absolute resource names couldn't effecitvely be used. Similarly, the "==" syntax now works with when resources are set dynamically via PDF_set_parameter(). (p_util.c, p_basic.c). - Makes the JPEG reader more robust against damaged files (p_jpeg.c). - Implements an option in the image converter for printing details for damaged image files (clients/pdfimage.c). - Implements PDF_get_value() for the following parameters: leading, textrise, horizscaling, textrendering, charspacing, wordspacing. Implements PDF_get_parameter() for the following parameters: overline, underline, strikeout. - Reworks implementation and documentation of PDF_arc(), and fine-tunes several other graphics functions in the process (p_draw.c): - Re-implements the algorithm for cutting down arcs into smaller segments. This fixes a number of subtle bugs with certain parameter combinations, and introduces clearer documentation for all cases, including degenerate ones. - Defines the magic arc variable for the PDF_circle() algorithm with 8 instead of 4 decimal places in order to increase the accuracy (p_draw.c). - Introduces clear semantics for the behaviour of PDF_arc() and other functions when a current point is available, and when no current point has previously been set. - Introduces a (currently unsupported) PDF_arcn() function for drawing arcs in clockwise direction. - Removes the clearing loop for debug flags in PDF_new2() since the memset() for the PDF structure clears those anyway (p_basic.c). - Fixes subtle bugs in the text handling (p_text.c): - The combination of word or character spacing != 0 and underline/ overline/strikeout text resulted in wrong text positioning. - After PDF_show_boxed() the call PDF_get_value("texty",0) returned a vertical position which was one line too high under the same circumstances as above. - Allows the external and internal data types for floating point calculations to be redefined via a #define. This is intended for applications which require improved accuracy, and not supported in the general case due to platform and binary compatibility issues (pdflib.h). - Implements a check to make sure that PDF_save() and PDF_restore() calls are balanced at the end of a page (p_basic.). - Removed the SWIG preprocessor conditionals since we don't use SWIG any more (pdflib.h). - Fixes a bug in PDFlib's object machinery, related to PDF page object numbers. Fortunately, the bug occurred only under very rare and subtle circumstances, but was severe nevertheless because it resulted in damaged PDF output, and erroneous "allocated but not used" messages (p_basic.c). - Changes the output accuracy of floating point numbers from four to six decimal places. This slightly affects output file size, but was necessary to defeat some accuracy problems. For example, stitching individual stripes of striped TIFF images could lead to visual artifacts in Acrobat (p_util.c). - Corrected a typo in the error message for bad page sizes with Acrobat 4 compatibility (p_basic.c). - Implements support for setting the document's base URI (p_intern.h, p_basic.c). - Changes the PNG error handling in order to make it source- and binary- compatible with libpng 1.08. and 1.1 (p_png.c). - Fixes two problems in PDF_show_boxed() (p_text.c): - Certain forced line breaks could cause a single character to disappear. - Forced line breaks could cause the preceding line to be ragged even in "justify" or "fulljustify" mode. - Improves TIFF handling: - Does no longer throw an exception if the imagewarning parameter is set to true, and the requested image number in a multi-page TIFF can not be retrieved (p_tiff.c). - Moves an increment operator outside a function call because the variable has been used as function parameter twice. This is not portable because the order of parameter evaluation is platform- dependent. The Compaq True64 compiler correctly spotted this (p_tiff.c). - Rejects TIFF images with a color depth other than 1, 2, 4, or 8 bits per sample since other values are not supported by PDF (p_tiff.c). - Changed the parameter handling for CCITT G3-compressed TIFF images, preventing "Read less image data than expected" messages in Acrobat (p_tiff.c). - Failure of the TIFF library to read an image file could result in a crash (p_tiff.c). - Made the AFM parser stricter in checking the 'StartCharMetrics' entry against the actual number of character entries in the file. This makes PDFlib more robust in case of bad AFMs, but may result in AFMs being rejected which previously have been accepted (p_afm.c). - Implements support for an arbitrary number of user-defined document information fields (p_hyper.c, p_intern.h). - The allowed range in the encoding parser was wrong, and must be 0-255 instead of 1-256 (p_util.c). - Changed two entries in the Latin 2 encoding file since Adobe fonts use the character names T/tcommaaccent instead of T/tcedilla (fonts/iso8859-2.enc). - Adds unsupported code for generating the Crop, Bleed, Trim, and Art boxes in addition to the MediaBox. Later these will be adjustable by the client (p_intern.h, p_basic.c). - Prevents multiple PDF_open_*() calls without a matching PDF_close() (p_basic.c). - Referenced images were lacking an endobj token at the end of their (empty) data section (p_image.c). - Prevents the use of flush points from language bindings other than C or C++ (p_basic.c). - Two format strings for error messages were wrong in PDF_get_parameter() (p_basic.c). - Issue a NonfatalError when the obsolete function PDF_endpath() is called (p_draw.c). - Calling PDF_get_parameter(p, "resy", image) with an invalid image parameter resulted in a crash. Ironically, the crash occurred due to a malformed argument when the error message was formatted (p_basic.c). - The test program accidentally set the embedding parameter in several samples to 1 instead of 0 (pdftest.c). - Implements the "fontwarning" parameter. The default value is "true"; setting it to "false" makes PDF_findfont() return -1 instead of throwing an exception (p_basic.c, p_font.c, p_util.c, p_intern.h). - Using PDF_findfont() before a document has been opened now results in a RuntimeError (p_font.c). - Implements a thumbnail hook for a customer. However, this hook is not available in the general version, and not yet supported in language bindings other than C (p_image.c). - Allows the base 14 fonts to be embedded (p_fonts.c). - Documents and implements the fact that /Producer and /CreationDate are not allowed as user-defined info keys (p_hyper.c). - Ensures that PDF_setfont() and PDF_stringwidth()/PDF_stringwidth2() cannot be called outside of page descriptions (p_text.c, p_font.c). - Safeguards against internal attempts at malloc()'ing 0 bytes (p_basic.c). - Fixes a number of EBCDIC-related bugs: - The description and author fields in PDF_attach_file() haven't been properly converted to PDFDocEncoding (p_annots.c). - PFA font files were treated wrongly (p_font.c). - PFM metrics file handling didn't work (p_pfm.c). - The "ebcdic" value of the encoding enum was wrong. This resulted in the compiled-in metrics not being found on native EBCDIC platforms (p_intern.h). - The debug array in the PDF struct was too small for use with control characters from the EBCDIC character set (p_intern.h). - The test for compilation on EBCDIC platforms didn't work reliably (p_config.h). - Introduces a flavor of the poem text where German special characters are encoded for EBCDIC (pdftest.c). - The Unicode sample for document info entries was defined too ASCII- centric in the demo program, and produced bad results (pdftest.c). - Fixes a typo in the unsupported CMYK functions (p_color.c). - Fixes the compile_metrics utility which was broken (util/compile_metrics.c). - Font metrics read in from a PFM file caused a memory leak. The function pdf_cleanup_font_struct() now works with all types of fonts, and is also called for fonts read in from PFM files (p_font.c, p_afm.c, p_intern.h). Build process, distribution, and platform support ================================================= - Fixes a few configure buglets, and adds a new option (configure.in): - The --disable-cxx and --enable-cxx=no options didn't work; - The --disable-shared-pdflib and --enable-shared-pdflib=no options didn't work; - Implements --enable-profile. - Modifies "make install" in the pdflib subdirectory to do different things with the static vs. shared library (pdflib/Makefile.in). - Added an encoding file for Windows code page 1250 (central european) (fonts/cp1250.enc, fonts/pdflib.upr), and changes T/tcedilla to T/tcommaaccent in order to match Adobe conventions (fonts/iso8859-2.enc). - Enhancements for MacOS X server/Rhapsody 5.6/Darwin (configure.in). Set with_gnu_ld=yes which is required for GNU libtool (not to be confused with Apple's libtool). - S/390 enhancements: - Adds a new branch for shared library/DLL options on the S/390 in the libtool database (ltconfig). - Patches the libtool input for EBCDIC compatibility, and moves the source file names in compiler commands to the end for c89 (ltmain.sh). - Introduces a dedicated distribution kit for S/390, which has all text files converted to EBCDIC already (Makefile.in). - Uses compress instead of gzip for the S/390 distribution (Makefile.in). - Removes the PDF_PLATFORM since it is now supplied by the configure script (p_config.h). - Adds -DOS390 to the compiler options if appropriate, and sets the CC and LD variables (configure.in). - Changes a test for OS/2 in order to not catch S/390 (pdflib.h). - Introduces a compile-time switch to distinguish between Unix System Services and MVS on the S/390 (p_config.h, p_util.c). - Installing the static C library didn't work due to a typo (pdflib/Makefile.in). Bindings ======== - Added a call to PDF_close_image() in the image samples for all language bindings (bind/*/image.*). - C++: - Implements unsupported wrapper functions for the CMYK functions (pdflib.hpp, pdflib.cpp). - Java: - Adds information on building the Java wrapper on S/390 (readme.txt). - Adds information about Apple WebObjects (readme.txt). - Adds information about J2EE and Apache JServ deployment (readme.txt). - Adds the JNI header path for MacOS X server (configure.in). - Adds the JNI header path for S/390 (configure.in). - Searches $JAVAINCLUDE/mvs for machine-dependent JNI headers (configure.in). - Makes the Java wrapper EBCDIC-safe, and implements changes required for the JNI on S/390 (pdflib_java.c). - Perl: - Searches for Perl 5.7.0 (configure.in). - Sets the standard output to binary mode in the CGI sample (pdfclock.pl.cgi). - Python: - Includes an "oldpython" configuration to build the PDFlib extension for Python < 2.0 on Windows (Python.dsp). PDFlib binaries for Python 1.x and 2.0 are included in the Windows binary distribution. - Updates the configure script for Python 2.0 (configure.in). - Tcl: - Searches for Tcl 8.4 (configure.in). Documentation ============= - Splits the manual in an ActiveX edition and another one for all other language bindings (doc/PDFlib-manual.pdf). - Improved the form fields in the PDFlib order form (PDFlib-purchase-order.pdf). - Documents a workaround for problems when viewing the PDFlib purchase order form with Acrobat Reader on Unix/Linux (doc/readme_unix.txt). - Adds ColdFusion examples and documentation to the ActiveX edition. V3.02 (August 22, 2000) ======================= Bug fixes and enhancements ========================== - Added state checks to the text functions (p_text.c). - Refined the error handling in PDF_open_image (p_basic.c, p_image.c). - Deactivated the default prefix entry in the UPR file because it could cause confusion with the ActiveX edition (pdflib.upr). - Multi-strip TIFF images didn't work correctly when placed with a scaling factor != 1 (p_image.c). - Implements a macro which aids in overcoming differences in libpng versions when it comes to accessing the setjmp buffer (p_png.c). - Fine-tuned the OS/2 test in p_config.h. - Allow negative box width and height in PDF_show_boxed() (p_text.c). - Added the debug version of the C runtime library to the debug configuration of the MSVC test and pdflib projects (test/test.dsp, pdflib/pdflib.dsp). - Under certain circumstances the GIF reader didn't work correctly due to missing variable initialization (p_gif.c). - pdftest.c couldn't be compiled in strict ANSI mode by some compilers due to two misplaced statements (which actually only serve as warning preventers) (pdftest.c). - Added an #if conditional because the Intel version of the Metrowerks compiler doesn't have setmode() (p_basic.c). - PDF_open_fp() resulted in a crash or PDFlib exception because the file pointer got overwritten due to wrong initialization order (p_basic.c). Build process, distribution, and platform support ================================================= - Adds more AS/400 relevant information (doc/readme_ebcdic.txt). - Includes the files in the fonts directory in the binary distributions. - Extended the CodeWarrior project file for dual use on both Mac and Windows, and updated to CodeWarrior Pro 5 (PDFlib.mcp). - Fine-tuned support for S/390 (p_config.h, p_util.c). - Removed an obsolete file (pdflib/makefile.bcc). Bindings ======== - C: - PDF_delete() was missing from two C samples (hello.c, image.c) and a demo client (clients/text2pdf.c); - Java: - No longer calls PDF_delete() in the Java exception generating mechanism since this may lead to multiple calls due to interference with PDFlib's finalize() method. This should fix long-standing problems with exceptions in some Java environments, especially Servlet engines (pdflib_java.c). - Adds a classFinalize() method (pdflib.java). - Adds throws clauses to all PDFlib Java and native methods. This change required the addition of an import statement (pdflib.java). - Adds throws clauses to all examples. - Renames the Java servlet example to PDFlibServlet.java. - Adds notes on using PDFlib with IBM WebSphere Application server and Allaire JRun (bind/java/readme.txt). Documentation ============= - Marks PDF_endpath() as deprecated (pdflib.h). - Replaced the order form with an interactive version (doc/PDFlib-purchase-order.pdf). V3.01 (July 1, 2000) ===================== New features and API ==================== This release is binary-compatible to 3.0, but adds a few new features which are accessible through additional parameters to existing functions: - Implements the "fontencoding" parameter for retrieving the encoding of the current font (p_basic.c, p_font.c). - Implements "blind" mode in PDF_show_boxed() in order to check whether or not a string fits in a given box (p_text.c). - Adds support for multipage TIFF images via the "page" parameter of PDF_open_image_file() (p_tiff.c). - Implements pass-through mode for a variety of TIFF compression schemes. Compressed image data is no longer decompressed and recompressed, resulting in much faster TIFF procecessing. Correctly dealing with multi-strip images required rewriting parts of the image machinery (p_tiff.c, p_image.c, p_intern.h). - Adds support for CMYK TIFF images (p_tiff.c). - Implements pass-through mode in the GIF handler. This results in much faster GIF processing, but unfortunately restricts the number of supported GIF flavors to 8-bit, non-interlaced. As a side effect, this decreases the memory footprint of each PDF instance by more than 64 KB (p_gif.c, p_intern.h). - Implements the "openmode" parameter for setting the initial display of bookmarks, thumbnails, or fullscreen mode (p_intern.h, p_basic.c, p_hyper.c). - Implements the "bookmarkdest" parameter which allows changing the destination view of individual bookmarks (p_intern.h, p_hyper.c, p_basic.c). - Implements the "imagewarning" parameter which allows the client to get more detailed information about why PDF_open_image_file() or PDF_open_CCITT() failed (p_basic.c, p_jpeg.c, p_gif.c, p_tiff.c, p_png.c, p_ccitt.c). Bug fixes and enhancements ========================== - Outputs \r and \n in strings with a preceding backslash which seems to be required for proper handling of linebreaks in annotations (p_text.c). - Eliminate the exception caused by unknown category entries in the resource files. This behavior caused unnecessary exception when UPR files were created with the makepsres utility (p_util.c). - Implements an unsupported "memory32" mode for 32-bit aligned memory images in PDF_open_image() (p_image.c). - Negative horizontal scaling was taken into account for the underline/overline/ strikeout distance from the baseline including its sign, which is wrong (p_text.c). - Increased several of the initial allocation chunk sizes since we saved 64K by the rewrite of the GIF module (p_intern.h). - Uses pdf_end_path() more efficiently in PDF_endpath() (p_draw.c). - After an image was rejected the next image could suffer from left-over information from the rejected image since proper initialization was missing (p_image.c). - Allows the compression level to be changed within a page description (p_basic.c). - Removed the warning about page sizes which are incompatible to Acrobat 3 which was issued by default when a page was too large or too small. Now a RuntimeError is generated only in Acrobat 3 compatibility mode (p_basic.c). - PDF_close() closed the file handle even if it was provided by the client through PDF_open_fp() which is a bad attitude towards clients (p_basic.c). - PDF_open_mem() was broken: it provoked a wrong error message due to missing initialization (p_basic.). - Removed a number of obsolete functions which were no longer supported in PDFlib 3.0 but still available (p_jpeg.c, p_gif.c, p_tiff.c, p_gstate.c, p_text.c, p_hyper.c, pdflib.h, p_intern.h, p_basic.c, bind/[perl|tcl|python]/pdflib_*.c). - PDF_add_note interprets an empty icon parameter equivalent to a NULL value (p_annots.c). - Setting the transition parameter to an empty string is now equivalent to a NULL string value, and resets the transition to default (p_hyper.c). - Replaces the GIF test image with a non-interlaced version (test/pdflib.gif). - Eliminates a superfluous moveto in PDF_arc() when the current point and the starting point of the arc coincide. The redundant moveto broke subsequent closepath and fill behaviors (p_draw.c). - Changed several hex characters in strings to octal notation (pdftest.c). - Added a few casts to satisfy C++ compilers (p_font.c, p_pfm.c). - Re-implements PDF_set_text_matrix(), which is currently neither documented in the manual nor supported (p_text.c, pdflib.h). - Adds the "nativeunicode" parameter to Unicode-aware language wrappers in order to disable native Unicode processing. The default value is false (p_basic.c). - The "defined" preprocessor instruction was missing for the __BORLANDC__ identifier (p_config.h). - Safeguards the interpretation of encoding and UPR files on Unix from Windows-style lineends (p_util.c). - An infinite loop could result when trying to attach a non-existent file with PDF_attach_file (p_basic.c). - The return type of PDF_get_buffer() was missing a const qualifier (pdflib.h, p_basic.c). - Separates the generation of a multi-threaded test program from the WIN32 environment in order to simplify building non-threaded tests with non-MS compilers (test/pdftest.c). - Removes several warnings about redundant variable assignments which were uncovered by the Borland compiler (p_afm.c, p_basic.c, p_draw.c, p_filter.c, p_font.c, p_jpeg.c, p_pfm.c, p_util.c, test/pdftest.c). - PDF_get_value() could crash when called with bad parameters. Ironically, the crash was not caused by the bad parameters but by a bug in the error message complaining about the bad parameters (p_basic.c). - PDF_setfont() and PDF_stringwidth2() now accept negative font sizes. The horizontal scaling factor may now also be negative. The underline/overline/strikeout functions use the absolute value of the calculated line width to ensure that the line width will be positive (p_font.c, p_text.c). - Changed the name of the "byte" typedef to "pdf_byte" (p_intern.h, many *.c). - Changed the default encoding in text2pdf.c from "winansi" to "host", and adds a command line option for the text encoding (pdftest.c). - The formula for calculating Bezier control points for the arc approximation gave wrong results due to a missing cast (!) in the C expression, resulting in ugly circle segments for certain parameter combinations (p_draw.c). - The vertical start position of the text line could be reset to 0 if graphics operators were issued between the PDF_show_xy and PDF_continue_text() calls (p_text.c). - Text output could be positioned one line too high if the character or word spacing was set != 0 because the leading value was not set correctly in PDF_show() and PDF_show_xy(). This bug also affected the horizontal positioning of PDF_show_boxed() (p_text.c). - PDF_continue_text now honors empty strings, i.e., moves to the start of the next line if the supplied string is empty (p_text.c). - The ISO 8859-2 encoding file had typos in the Zacute and Racute entries (iso8859-2.enc). - CMYK JPEG images resulted in corrupt PDF output due to a typo (p_image.c). - Fixed a non-portable construct involving the increment operator which resulted in wrong code when optimizing on True64 Unix (test/pdftest.c). Build process, distribution, and platform support ================================================= - Introduced a new configuration "no auxiliary libs" for MSVC for building PDFlib without any auxiliary library present (*.dsp). - Changes the sample projects for MSVC++ from pdfclock to hello because this is better suited as the first example (c.dsp, cpp.dsp). - Makes the math library linker option (usually -lm) configurable via an option. This is only rarely required. The option is empty on MacOS X/Darwin (configure.in). - On Windows, switches to static versions of libpng, tifflib, and libz, and renamed libpng_static.lib to libpng.lib (*.dsp). - Adds support files for Borland C++ Builder 5.0 (*.bpf, *.bpr). - Adds -pthreads to the compiler options on OSF1 (configure.in). - Libtool output was sent to /dev/null in the bind Makefiles, which is a bad idea, and was changed (bind/*/Makefile.in). - By default the C++ binding is no longer enabled, since few people seem to actually use it and inconsistent handling of the standard C++ library causes frequent configuration trouble on several systems. It can be enabled with the --enable-cxx configure option (configure.in). - Changed the name of the C++ configure option from --with-cxx to the more appropriate --enable-cxx (configure.in). - Removes -ljpeg and -lz from the TIFFlib tests in the configure script, since these are't always required for libtiff, and missing additional libraries may cause linker error messages on some platforms if not installed. Platforms which require auxiliary libraries for TIFFlib can configure those with the new --with-tiffauxlib option (configure.in). - Changes the shared library mechanism in order to avoid problems with multiple dependent shared libs on platforms which don't support inter- library dependencies, or when the user doesn't have root privilege for installing the PDFlib shared library, for example on an ISP's server (configure.in, pdflib-config.in, all Makefile.in): - PDFlib is built as a libtool convenience library by default. - C/C++ language clients which prefer a shared PDFlib can request this via the --enable-shared-pdflib configure option. Other language bindings will not be available when this option is used. - Using non-installed versions of the auxiliary libraries now works as expected, but requires them to be built as static libs. Problems may arise if a local library directory contains a shared version of some auxiliary lib. The configure script will warn about this situation. - The PDFlib library will only be installed if it was built as a shared object. "make install" will install pdflib.h always, however. - All language wrapper libraries are still shared, but pull in the PDFlib core into the respective shared library. - Removes the dependencies from the client Makefile (clients/Makefile.in, configure.in). - The client and util Makefiles didn't use the configure-supplied macro for the name of the PDFlib core library (clients/Makefile.in, util/Makefile.in). - Switches to libtool 1.3.5 (config/*). - Removed all space characters after the -I compiler options since some compilers don't like this (configure.in). - Includes an encoding definition file for ISO 8859-9/Turkish, also known as Latin Alphabet No 5 (!) with additional character entries for Windows codepage 1254, and includes a corresponding entry in the UPR file (fonts/iso8859-9.enc, fonts/pdflib.upr). - Removes an obsolete file (test/graphdata). - The "clean" target didn't check whether or not a certain language binding actually had been built, resulting in errors for a global "make clean" (configure.in, Makefile.in). - Sets the LANG variable to empty string before calling the date command. Otherwise %p depends on the LANG setting, and may not work (Makefile.in). - Adds the list of dependent libraries (PDFLIBLINK) when linking the PDFlib shared library via libtool. Some platforms such as AIX require the names of all dependent libraries to be coded into the shared library file (pdflib/Makefile.in). - Fixed a number of EBCDIC-related bugs: - Bookmarks and annotation text didn't get converted to ASCII (p_hyper.c). - User-defined document information field names got converted to ASCII just one time too often, resulting in bad output (p_hyper.c). - The open mode for fopen() must be set to binary ("rb" and "wb"), otherwise PDF output will be screwed up, and images don't work (p_config.h). - Removed all occurrences of "-lc" in configure.in. - When searching for the TIFF library configure didn't check the lib subdirectory of any directory supplied via the --with-tifflib= option, contrary to the search applied for zlib and libpng, and the TIFFlib header files (configure.in). - Implements config/pdflib.m4 for use with the configure process of other packages which need to test for the availability of PDFlib. - Includes pdflib-config as an aid in configuring other packages which want to use PDFlib (configure.in, pdflib-config.in). - Fixed a typo in the SUFFIXES line which adversely affected some non-GNU makes (pdflib/Makefile.in). - Added a precompiler test for the EMX compiler on OS/2 (p_config.h). Bindings ======== - C: - Includes an image sample (image.c). - The improved libtool scheme revealed a bug in the ordering of object files in the Makefile (Makefile.in). - C++: - Changed the name of the preprocessor define BROKEN_BOOL to PDF_BROKEN_BOOL (pdflib.hpp, pdflib.cpp). - Changed the C++ test files to return 0 (hello.cpp, image.cpp, pdfclock.cpp). - Added several casts to properly deal with the size method of C++ strings (pdflib.cpp). - get_parameter() was accidentally missing from the wrapper code (pdflib.hpp, pdflib.cpp). - Adjusted the return type of PDF_get_buffer() (pdflib.hpp, pdflib.cpp). - Includes an image sample (image.cpp). - The improved libtool scheme revealed a bug in the ordering of objects in the Makefile (Makefile.in). - Changed the preprocessor conditionals for name space handling (pdflib.hpp). - Separates out the name of the standard C++ library, and sets it from the configure script. Determining whether it is required is however not yet finally implemented (configure.in, Makefile.in). - Java: - Adds /jdk1.2.[123] to the list of directories to be searched for the Java header files for the benefit of Cygwin users (configure.in). - Adds /usr/local/java and /usr/local/java/alpha to the list of directories to be searched for the Java header files (configure.in). - Implements the "nativeunicode" parameter (pdflib_java.c). - Includes a servlet sample (hello_servlet.java). - Makes the exception handling in the Java wrapper thread-safe, which was the last step to a completely thread-safe Java binding (pdflib_java.c). - Adds some notes on using PDFLib with Borland/Inprise JBuilder (readme.txt). - The error message for a bad PDFlib version used only a single significant digit (pdflib_java.c). - PDF_concat() had accidentally been declared public instead of private (pdflib.java). - Includes an image sample (image.java). - Implements several changes which are necessary for the AS/400 JNI implementation where jlong is a struct (pdflib_java.c): - Removes an unneccesary jlong initializer in the wrapper code of PDF_new(). - Casts NULL to jbyteArray in the wrapper of PDF_get_buffer(). - Adds a cast to the (jbyte *) argument of ReleaseByteArrayElements(). - Conditionally uses a JNI-supplied macro for the assignment of jlong to long. - Made changes to the configure script in order to support the Kaffe VM which doesn't use the common jni_md.h in its JNI implementation (configure.in). - Relaxed javadoc generation since Kaffe doesn't have a javadoc implementation (Makefile.in). - The Unicode converter didn't report back the correct string length if the string was empty (pdflib_java.c). - libtool versioning information was missing (Makefile.in). - Perl: - Links the Perl wrapper against the Perl library on AIX, Cygwin, and OSF/1 (configure.in). - Removed a number of obsolete functions which were no longer supported in PDFlib 3.0 but still available (see doc/compatibility.txt for details). - PDF_concat still didn't work due to a glitch in the module file and a missing newXS entry (pdflib_pl.pm, pdflib_pl.c). - Adds a CGI variant of the pdfclock sample (pdfclock.pl.cgi). - Adjusted the return type of PDF_get_buffer() (pdflib_perl.c). - Includes an image sample (image.pl). - Cleaned up a few of the many warnings produced by the SWIG-generated wrapper code (pdflib_pl.c). - Implements a number of changes to make the wrapper compatible with Perl 5.6, mostly required by the discontinued use of PERL_OBJECT in the ActivePerl build: - Introduced another configuration called "oldperl" for building the wrapper for older ActivePerl versions (perl.dsp). - Added the XS macro to the export declaration of boot_pdflib_pl (pdflib_pl.c). - Searches for perl5.6.0 in the configure script (configure.in). - Changed the include and lib paths for Perl 5.6.0 on Windows (Perl.dsp). - Changed the include path in the VC project file to the Perl/lib/CORE directory (Perl.dsp). - Removed the /Tp option in the VC project file (no longer use C++ mode). (Perl.dsp). - Removed the PERL_OBJECT #define on Windows (pdflib_pl.c). - Changed all occurrences of CPerl to CPerlObj, and removed the respective macro definition (pdflib_pl.c). - Changed a preprocessor directive to make the wrapper code compatible with Perl 5.6 on Unix (pdflib_pl.c). - libtool versioning information was missing (Makefile.in). - Python: - Includes an image sample (image.py). - Changed the include and lib paths for Python 1.5.2 on Windows (Python.dsp). - Removed some dead code from the wrapper code (pdflib_py.c). - "make test" tried to make a hard link to a symbolic link, which doesn't work on all platforms (bind/python/Makefile.in). - libtool versioning information was missing (Makefile.in). - Tcl: - Implements the "nativeunicode" parameter (pdflib_tcl.c). - Removed a number of obsolete functions which were no longer supported in PDFlib 3.0 but still available (see doc/compatibility.txt for details). - Makes the exception handling in the Tcl wrapper thread-safe, which was the last step to a completely thread-safe Tcl binding (pdflib_tcl.c). - Adjusted the return type of PDF_get_buffer() (pdflib_tcl.c). - Includes an image sample (image.tcl). - Changed the include and lib paths for Tcl 8.3.1 on Windows (Tcl.dsp). - The wrapper now requires Tcl 8.2 or higher. - If appropriate, calls Tcl_InitStubs() for Tcl Stubs support (pdflib_tcl.c). - Queries the version number of the Tcl interpreter instead of relying on the static version number in the Tcl header used for compiling the wrapper (pdflib_tcl.c). - Added some preprocessor directives necessary for the mingw environment under Windows (pdflib_tcl.c). - Removed the DllMain function from the wrapper since it wasn't actually required but could cause trouble with some wrong precompiler settings (pdflib_tcl.c). - PDF_get_value and PDF_set_value were not properly reported to the Tcl interpreter, and were therefore unavailable (pdflib_tcl.c). - The Unicode converter didn't report back the correct string length if the string was empty (pdflib_tcl.c). Documentation ============= - Adds many clarifications to the manual, as well as some basic text and graphics handling algorithms (PDFlib-manual.pdf). - Includes a PDF with point grid measures for common page sizes (grid.pdf). - Updated the Web locations of the png and zlib libraries (readme.txt, PDFlib-manual.pdf). - Added some information on forcing a certain compiler, or certain compiler flags (doc/readme_unix.txt). - Updated the PDFlib license (PDFlib-license.pdf). - Included the PDFlib order form (PDFlib-purchase-order.pdf). V3.0 (March 1, 2000) ==================== New features and API ==================== - Implements the "invert" parameter for PDF_open_image() in order to work around problems with certain 1-bit TIFF images (p_tiff.c). - Implements ascender, descender, and capheight parameters for get_value() (p_basic.c). Bug fixes and enhancements ========================== - Fixed a bad memory leak for all TIFFs which couldn't be handled in pass-through mode (p_tiff.c). - Track the text position even if the supplied string is NULL or empty (p_text.c). - PDFlib attempted to load the UPR resource file too early, even if the resource query could have been satisfied with dynamically loaded resources (p_util.c). - Empty resource file names (e.g. produced by an empty, but existing environment variable) were not handled correctly (p_util.c). - The y position calculations for PDF_show, PDF_show_xy, and PDF_continue_text were wrong for nonzero word spacing values. This also affected PDF_show_boxed (p_text.c). - Re-enabled the #ifdef'ed /EncodedByteAlign code (p_tiff.c). - Change the cleanup_...() functions in order to make them multiply callable. This was not the case for certain rare situations when an exception occured during cleanup (p_annots.c, p_basic.c, p_font.c, p_hyper.c, p_util.c, p_image.c). - The handling of font files with DOS line ends was broken on Unix systems (p_font.c). - The error machinery didn't recognize a certain recursive error situation related to the handling of corrupt font files (p_basic.c). - The font machinery now treats the AFM entry "StandardEncoding" like "AdobeStandardEncoding" since some AFMs use the former (wrong) variation (p_font.c). - The UPR resource names didn't work in PDF_set_parameter() due to a typo (p_basic.c). - CCITT-compressed TIFFs with multiple strips haven't been handled properly, and resulted in corrupt output. As a quick fix we revert to uncompressing and recompressing with Flate (p_tiff.c). - The PDF properties sheet in Windows explorer doesn't work when the Info dictionary keys are not followed by space characters. (This should be considered an Acrobat bug!) We therefore removed this optimization in order to work around this misfeature (p_hyper.c). - PDF_stringwidth2() didn't take the length argument into account (p_text.c). Build process, distribution, and platform support ================================================= - configure improvements (configure.in): - configure failed to include -I in the include paths for the auxiliary libs. - configure failed to accept library paths supplied on the command line. - Unified the handling of the -I option for the various language include directories. - Adds -lm to the libpng tests. - The --disable-shared option didn't work. - Changed the install target so that it creates the install directories for library and header files if they don't exist. This was a problem especially on RedHat systems where /usr/local/include doesn't exist (pdflib/Makefile.in). - Removed the FORCE: target in the main Makefile (Makefile.in). - Added some preprocessor lines for Cygwin support (p_config.h, p_basic.c). - Switched to a static version of the PNG library due to problems with libpng.dll when used with static C runtime (*.dsp). Bindings ======== - Java: - get_value didn't work because of a missing comment terminator (pdflib.java). - An exception in get_parameter could result in an access violation in Windows due to a bug in the wrapper code (pdflib_java.c). - Relaxed the compiler setting "strict ANSI" in the CodeWarrior project for the Java binding on the Mac, since the Apple-supplied Java headers for MRJ 2.2 do no longer compile in strict mode (pdflib.mcp). - Perl: - PDF_concat didn't work due to a glitch in pdflib_pm.pl. - Python: - PDF_open_image_file() was missing from the set of registered functions, and was therefore unavailable (pdflib_py.c). - Tcl: - Changed the Windows project file for Tcl 8.3 paths (tcl.dsp). - The Tcl install target didn't check whether the install directory already existed (Makefile.in). Documentation ============= - Switched to version 8 of the Aladdin license (aladdin-license.txt). V2.30 (February 15, 2000) ========================= New features and API ==================== - Implements the ignoremask parameter for PDF_open_image_file() to allow the user to disable PDFlib's automatic transparency support. - Reactivates the disabled PDF_open_mem/writeproc interface for installing a callback to fetch the PDF data (p_basic.c, p_annots.c, p_image.c, p_font.c, p_stream.c, pdflib.h, p_intern.h). - Removes PDF_set_text_matrix() which has bad interactions with internal functions and properties of PDF, and doesn't offer any advantage to the client (p_text.c). - Path segment functions no longer reset the text position and matrix (p_text.c). - Implements PDF_get_value() and PDF_set_value() which (along with PDF_set_parameter()) replace the following functions (p_basic.c): get_font get_fontsize get_image_height get_image_width set_fillrule set_leading set_text_rise set_horiz_scaling set_text_rendering set_char_spacing set_word_spacing set_duration set_transition In bindings other than Java and ActiveX these are still available, however. - Interprets the image resolution in the image converter client, and adjusts both page size and scaling factors accordingly (pdfimage.c). - Reads the resolution or aspect ratio values from all image formats which support it, and passes the values to the client (p_jpeg.c, p_png.c, p_tiff.c, p_gif.c); - Implements and documents PDF_concat() (p_gstate.c). - Makes the default zoom factor (open action for the first page) user- settable through PDF_set_parameter() (p_basic.c). Bug fixes and enhancements ========================== - PDF_delete() didn't PDF_close() if called from the error handler (p_basic.c). - PDF_arc() didn't handle movetos correctly (p_draw.c). - Due to a subtle bug in the exception handling machinery non-fatal errors could cause recursive errors (p_basic.c). - PDF_show_boxed() didn't fully justify the second but last line under certain circumstances, and didn't get forced newlines right sometimes (p_text.c). - PDF_show_boxed() didn't take the text matrix into account correctly (p_text.c). - End the text object if the text render mode is set to one of the clipping modes (p_text.c). - Added an endpath operator to the clip operators to save the client from doing so (p_draw.c). - PDF_open_image() didn't check for a valid params pointer for one- component images (p_image.c). - Non-fatal errors could result in corrupt output due to a glitch in the error handling machinery (p_basic.c). - Implements data pass-through for CCITT-compressed TIFF images. This decreases the PDF output, and accelerates image processing (p_tiff.c, p_image.c, p_intern.h). - Changed the key of the duration setting from /D to /Dur. The former is only correct within a transition dictionary (p_basic.c). - Implements a complete text and graphics state tracking machinery, including save/restore (p_intern.h, p_gstate.c, p_draw.c, p_text.c, p_basic.c). - Disallows the use of the null character in user-defined encodings (p_util.c), and documents the fact. - Implemented a stricter state checking machinery for switching between path objects, text objects, image objects, and the general page description state (p_text.c, p_draw.c, p_gstate.c, p_image.c, p_intern.h). - The parameter checks in the text output functions were too strict, and erroneously rejected strings starting with a character code < 256 in Unicode mode (p_text.c). - Removed several remains of an obsolete filename in comments and a project file (p_intern.h, pdflib_static.dsp). - Checks for a degenerate matrix in PDF_set_text_matrix() (p_text.c). - Renamed pdf_concat() to pdf_concat_raw() (p_gstate.c). - Simplifies the old and new stringwidth/show/show_xy/continue_text functions pairs such that the old simply relay to the new functions. A zero length parameter for the new functions is interpreted to mean C-style text (p_text.c). - Fixes the underline/overline/strikeout handling (p_text.c). - Made the prefix parameter public (p_basic.c.). - Relaxed the handling of metrics files where the font name has been changed, and doesn't match the user-supplied font name (p_afm.c, p_pfm.c). - The AFM and PFM modules threw NonfatalErrors even in severe cases (p_afm.c, p_pfm.c). - Added an omitted pdf_begin_text() call which resulted in bad PostScript output when the PDF was printed (p_text.c, p_font.c, p_intern.h). - An erroneous byte was output in the header section (p_basic.c). Build process, distribution, and platform support ================================================= - Puts double quotes around all variables used in test statements in the configure script. This will make the script more resistant against test complaining when a variable happens to be empty (configure.in). - Moves the test for EBCDIC from configure to p_config.h. - Switches the language bindings on Windows to static C runtime libraries in order to avoid the dreaded problems with multiple versions of msvcrt.dll (*.dsp). - Added solaris as a subdirectory name in looking for jni_md.h, since it doesn't seem to be picked up via $ac_md_system (configure.in). - Added -lm -lc at a few places in order to help configure find the auxiliary libraries (configure.in). - Changed the handling of the PDF magic number to protect it from EBCDIC compilers (p_basic.c). - Introduces a binary distribution for Windows, generated with a JScript program run in Windows Script Host (shell programming a la Microsoft, oh my...). - Added "-ljpeg" to TIFFLIBLINK (configure.in). - Added "-lz -lm" to the TIFF library check (configure.in). Bindings ======== - C++: - The C++ Makefile failed to set the CXX variable correctly (Makefile.in). - Implemented concat() (pdflib.hpp, pdflib.cpp). - show_boxed() didn't return a value (pdflib.cpp). - Java: - Reworked and fixed the exception handling (pdflib_java.c). - Changed the string extraction routines so that they handle empty strings gracefully (pdflib_java.c). - Implemented concat() (pdflib_java.c, pdflib.java). - Calls java and javadoc after compiling the Windows DLL (Java.dsp). - Perl: - Removed the export-dynamic option for libtool (Makefile.in). - Implemented PDF_concat() (pdflib_pl.c, pdflib_pl.pm). - Python: - Removed the export-dynamic option for libtool (Makefile.in). - Implemented PDF_concat() (pdflib_py.c). - Tcl: - PDF_open_image_file() was missing from the set of exported functions in the wrapper code (pdflib_tcl.c). - Conditionally compiles the wrapper in order to avoid the use of binary strings when compiling against Tcl 8.0 (pdflib_tcl.c). - Implemented PDF_concat() (pdflib_tcl.c, pkgIndex.tcl). Documentation ============= - Documents the libtool library versioning scheme (readme_unix.txt). V2.20 (January 24, 2000) ========================= New features and API ==================== - Implements PDF_concat(), currently only for the C binding (pdflib.h, p_gstate.c). - Implements PDF_show_boxed(), the basis of which has been contributed by Leonard Rosenthol (pdflib.h, p_text.c, bind/*/*.c, pdflib_pl.pm, pkgIndex.tcl, pdflib.hpp, pdflib.cpp, pdflib.java). - Implements overline and strikethrough text, as suggested and contributed by Leonard Rosenthol. API, implementation and behavior parallel underlined text (p_intern.h, p_basic.c, p_text.c). - Implements PDF_get_buffer() for fetching the PDF output from memory for all language bindings. Bug fixes and enhancements ========================== - Fixed three bugs in the AS/400 codepage conversion table (p_stream.c). - Fixed a bug in the EBCDIC-safe handling of document info entries (p_hyper.c). - #ifdef'ed all code for dealing with the now obsolete flush parameter. - pdf_ebcdic2ascii() didn't return the correct string. Changed the caller such that the return isn't needed anyway (p_stream.c). - The binary PDF magic number was inadvertently written using pdf_puts() instead of pdf_write() which is wrong on EBCDIC machines (p_basic.c). - The debug and nodebug parameters are no longer documented nor supported. Nonfatal exceptions can be suppressed with the new warning parameter (p_basic.c). - Changes the error handling and memory management such that one pair of PDF_new()/PDF_delete() can accomodate multiple pairs of PDF_open_*()/ PDF_close() without leaking memory (p_stream.c, p_basic.c). - Fixed a possible crash under rare circumstances, related to an exception being thrown when no real work has been done (p_stream.c). - Changes the underline/overline/strikeout calculations such that the width of the line is no longer taken into account for calculating the distance from the baseline (p_text.c). - Fixes problems related to setting the current text position via PDF_set_text_matrix() and PDF_set_text_position() (p_text.c). - Removes the transition settings from all clock samples since these may significantly slow down PDF the screen presentation, especially when served via the Web (bind/pdfclock.*). - Removes the dynamic TIFFlib attachment on Windows, and directly links to TIFFlib. The TIFFlib DLL will also be included in the binary distributions (p_basic.c, p_tiff.c, p_intern.h). - Changes the TIFF code to use the PDFlib-supplied malloc/free routines instead of the TIFFlib-supplied ones. This makes the code for attaching the TIFFlib Windows DLL at runtime compatible with the generally available DLL (p_tiff.c, p_basic.c, p_intern.h). - Changes PDF_findfont() such that an exception is raised when the requested font can't be set, instead of returning -1 (p_font.c, bind/*/hello.*, test/pdftest.c). - An error message had a wrong printf format (p_state.c). - Accepts the image file type parameter of PDF_open_image_file() in both lower and upper case, although this will not be documented (p_image.c). - Removed the optimization which tried to keep track of redundant font changes (p_font.c). - "builtin" encodings no longer worked after the great encoding rehaul, but required only a simple fix (p_font.c). - Implements a safeguard against recursive I/O errors which may occur in rare situations when flushing the output raises an exception while being called from the exception handler already (p_intern.h, p_basic.c, p_stream.c). - The stream machinery didn't get initialized in PDF_open_fp(), resulting in an infinite recursion (well, a finite one...) when opening a PDF with a preexisting FILE pointer (p_basic.c). - Changes several places where #includes had filenames in "..." instead of <...>, resulting in bad dependencies in the Makefiles (pdflib/p_intern.h, util/compile_metrics.c, pdflib_pl.c, pdflib_py.c, pdflib_tcl.c). - The compile_metrics utility was not yet adapted to the new encoding include file logic (util/compile_metrics.c). Build process, distribution, and platform support ================================================= - Under Windows switched all language bindings other than C and C++ from a DLL to a static PDFlib library (bind/*/*.dsp). - Improves and simplifies the searching mechanism for Perl, Tcl, Python, and Java in configure (configure.in). - Simplifies and streamlines the configure code for detecting the TIFF, Zlib, and PNG libraries (configure.in). - Switches to libtool 1.3.4, and back to 1.3.c due to problems with the former (config/*). - Fixes many glitches in the configure and build machinery. - Makes the name of the core PDFlib library file configurable via the --with-libname configure option in order to work around a name clash on Digital Unix 4. The bindings are set up such that changing the core library name is transparent to the language binding (configure.in, all Makefile.in). - Includes an encoding file for ISO 8859-15 in the distribution (fonts/iso8859-15.enc), and changed the Latin 2 encoding file name (fonts/iso8859-2.enc). - Changed the ordering of libpng and zlib when linking programs against PDFlib since older linkers require this ordering (Makefile.in). - Moved the .PHONY targets in the Makefiles below the all target for combatibility with non-GNU makes. - Implements a suitable mechanism for patching the version number into numerous source files, and splits it from the distribution (version.pl). - Fixes a number of Makefile bugs which resulted in wrong dependencies (*/Makefile.in). Bindings ======== - C++: - Changes the data parameter of open_image() from String to const char * which is more appropriate (pdflib.hpp, pdflib.cpp). - Java: - Implements Unicode support for page descriptions (pdflib_java.c). - Changes the data parameter of open_image() from String to byte[] which is more appropriate (pdflib.java, pdflib_java.c). - Correctly implements setpolydash() (pdflib_java.c). - Includes javadoc comments and Makefile targets for generating Java documentation in HTML (pdflib.java, Makefile.in). - Implements package support for PDFlib, and generates a .jar file (*.java, *.c, Makefile.in). - Changes the version mechanism for the Java wrapper to use version number querying instead of matching version numbers in the name of the wrapper library (pdflib_java.c, Makefile.in, Java.dsp, pdflib.h). - Perl: - Correctly implements PDF_setpolydash() (pdflib_pl.c). - Python: - Correctly implements setpolydash() (pdflib_py.c). - Tcl: - Implements Unicode support for page descriptions (pdflib_tcl.c). - Searches for tclsh8.3 in configure (configure.in). - Correctly implements PDF_open_image() (pdflib_tcl.c). - Correctly implements PDF_setpolydash() (pdflib_tcl.c). - Changed all occurrences of atol() in the wrapper code to Tcl_GetInt() or Tcl_GetLongFromObj() with appropriate error handling (pdflib_tcl.c). - Implemented suitable conditionals to allow for compiling the Tcl wrapper with different versions of Tcl. This was necessary because of the Unicode support which is only available in Tcl 8.2 (pdflib_tcl.c). Documentation ============= - Addes a description of the PDFlib commercial license to the distribution (PDFlib-license.pdf). - Introduces javadoc comments. V2.10 (December 13, 1999) ========================= New features and API ==================== - Makes the page dimensions adjustable after starting a page, using PDF_set_parameter (p_basic.c). - Made a variety of changes to make PDFlib work when compiled on EBCDIC-based systems (most *.c, p_intern.h). - Made the Zlib compression level configurable (p_basic.c, p_stream.c). - Switched to in-core PDF generation through the new pdf_streams interface. This also allows us to compress page content streams and to simplify handling of compressed data streams (all *.c, p_intern.h). - Implements transparency support (masking by position or color) (p_gif.c, p_png.c, p_image.c, p_intern.h). - Implements a PNG handler (p_png.c, pdflib.h, p_intern.h). - Font handling: - Implemented support for null characters in text strings for all language bindings (p_text.c, bind/*/*.c). - Implemented support for CID fonts and CMap encodings (p_font.c, p_cid.h). - Implemented underlined text (except for CID fonts) (p_text.c). - Implements support for user-defined encodings, and includes a sample encoding file (p_fonts.c, fonts/pdflib.upr, fonts/latin-2.enc). - Implements EBCDIC encoding (p_font.c, e_ebcdic.h, p_intern.h, p_metrics.h, util/compile_metrics.c). - Implements support for PFB PostScript font files (p_font.c). - Implements support for PFM PostScript font metrics files (p_pfm.c). - Updates to the AFM parser (p_afmparse.c, p_afmparse.h): - The FONTBBOX is read as float which is required by the 4.1 spec. - Recognizes Multiple Master fonts by FamilyName ending in " MM". - Allows the WEIGHT entry to contain more than one word. - Implements limited Multiple Master handling for an in-house application (p_font.c): - As in PostScript, MM handling is transparent at the API level. All MM handling is done by extracting the parameters from the font name. - All instances of an MM font are required to have the same metrics (i.e., no support for /Width axis). - The required AFM file is that for the master. - Implements PDF_skew() in order to provide for a full set of coordinate transformation functions (p_gstate.c). - Reactivates ASCII85 encoding which lay dormant in previous releases (p_intern.h, p_filter.c). Bug fixes and enhancements ========================== - Fixed a bug where PDF_moveto() wouldn't set the text position correctly (p_text.c). - Corrects a small glitch where pdf_float() would return the correct result string, but fails to use the supplied buffer (p_util.c). - Makes the PDF compatibility user-settable (again). The reasoning behind this is not obvious, and discussed in the manual. If the compatibility level is set to PDF 1.2, asking PDFlib to generate any Acrobat 4 feature will result in a RuntimeError (*.c). - Adds a little PostScript utility for finding all glyph names in a font (fonts/print_glyphs.ps). - Implements support for dynamically loading TIFFlib at runtime (p_basic.c, p_tiff.c, p_intern.h). - Removed all references to PDFDocEncoding since it isn't required for hypertext elements, and can't be used for text fonts (e_pdfdoc.h). - PDF_arc() implicitly moves to the beginning of the arc segment in order to avoid unwanted connecting lines from the current point to the beginning of the arc segment (p_draw.c). - All public PDFlib functions perform a simple sanity check on their p argument before accessing any structure member. This reduces the chances for a crash due to client-supplied NULL or rogue pointers (*.c). - Include the names of the language binding and the platform in the /Producer entry (p_basic.c, p_intern.h, p_hyper.c, bind/*/*.c). - Added the width of the Euro character to the supplied internal and external metrics tables (*.afm, p_metrics.h). - Replaced the AFM files with newer versions, and used the additional data in the internal metrics tables. The kerning information has been stripped for size and performance reasons (fonts/*.afm). - When user-requested encoding and font-supplied encoding didn't match, PDFlib could try to reencode Symbol fonts with not adequate encodings (like Symbol with Winansi) -- despite issuing a warning message (p_font.c). - PDF_stringwidth() now takes the text state parameters into account, and protects itself from empty strings (p_text.c). - Removed the pdf_begin_text() calls in all functions that set the text state (p_font.c, p_text.c). - Do not set the leading parameter in PDF_setfont() since it may override a leading value set by the user (p_font.c). - Changed the name of the pseudo encoding vector from "default" to "host" (p_font.c, most bind/*/hello.*). - Checks the scale parameter of PDF_set_horiz_scaling() to be positive (p_text.c). - Write the colormap for an image also in compressed or ASCII format if requested (was previously the case only for the actual image data, but not the colormap) (p_image.c). - The 'w' debug parameter for enabling or disabling warning messages was erroneously implemented as 'e' instead. Now it works according to the documentation (p_basic.c). - Adds (void) casts to several fputc() and fputs() calls. - Changes the PDF output to avoid unnecessary blanks aside self-delimiting tokens in many places (most *.c). - Checks current font and font size in PDF_setfont() in order to eliminate redundant setting. This requires initializing the current font to an invalid value of -1 in PDF_begin_page() (p_font.c, p_basic.c). - Image handling: - When the error handler popped in for memory images with bad length it would try to free not yet allocated memory. We guard against this by prematurely setting the image file name to NULL (p_image.c). - The parameter checking code in PDF_open_image() and the documentation didn't account for images with other than 8 bits per component (p_image.c). - The test for the length of the image data in memory for PDF_open_image() could still be wrong when bpc was smaller than 8 (p_image.c). - GIF images with a local colormap ended up with a colormap with all black entries in the PDF because the local colormap was read when the (wrong) global colormap was already written to the PDF (p_image.c). - Detect and correctly handle transparent colormap entries in GIF images (p_image.c, p_gif.c, p_intern.h). - Changes the PATHSEP definition for VMS and moves HAVE_GETOPT to the top of the include file (p_config.h). - The pdfgraph.c and pdfimage.c sample clients incorrectly advertised a binary option in their usage messages although the option is no longer available. - Check the parameters of PDF_scale() for zero values (p_gstate.c). - Introduce parenthesis in a set of critical macro definitions (p_gif.c). - Changed the text2pdf client to PDF_findfont/PDF_setfont instead of the obsolete PDF_set_font(). - Unified the names of the encoding files to e_*.h (formerly *_e.h). - Removed the obsolete compatibility function PDF_set_font (p_font.c, pdflib.h, bind/*/*.c, bind/perl/*.pm). Build process, distribution, and platform support ================================================= - Removed the sample CGI script (bind/cgi). - Removed the pdfgraph demo program (clients directory). - Removed the optional getopt module (util directory, Makefile.in). - Adds support for the DJGPP compiler (p_config.h). - Adds support for libtool in order to cleanly deal with the gazillion kinds of shared library support (configure.in, Makefile.in, test/Makefile.in, pdflib/Makefile.in). - Introduces the new config directory for libtool and installation support scripts. - Added the ANSI option for native HP compilers (configure.in). - Properly implements all configure switches for disabling the language bindings (configure.in). - Starts adding support for OS/2 and VMS systems. - Adds support for EBCDIC-based systems, including source code changes and an EBCDIC test in the configure script (configure.in). Bindings ======== - SWIG: - No longer automatically generates the wrapper file with SWIG due to the necessary amount of manual changes in the wrapper files (bind/*/Makefile.in). - C: - The arguments to PDF_begin_page() were incorrectly cast to the wrong type instead of float. Incidentally, a particular compiler incorrectly produced zero values, thereby disclosing the bug in the source code by a compiler bug (pdfclock.c). - C++: - Implements support for strings containing null characters. - Added PDF_shutdown() to the PDF destructor (pdflib.cpp). - PDF_close_image() was missing from the C++ interface due to an oversight (pdflib.hpp, pdflib.cpp). - Added -lstdc++ to the Makefile. - Java: - On Windows separates the wrapper DLL from the PDFlib core DLL. - Implements support for strings containing null characters. - configure now looks in an additional subdirectory for the machine- dependent JNI include file. Formerly it used $MACHDEP only, but on some systems the subdirectory doesn't use the system version number (configure.in). - Rewrote the wrapper code so that it does the right thing with Unicode strings (pdflib_java.c). - Switched to a more object-oriented notation, and dropped the PDF_ prefix from the names of the PDFlib Java methods (pdflib_java.c, *.java). - Perl: - On Windows separates the wrapper DLL from the PDFlib core DLL. - Removed the unused and unsupported Makefile.PL. - Implements support for strings containing null characters. - Removed PDF_boot() and PDF_shutdown() which have accidentally been included in the wrapper code (pdflib_pl.c, pdflib.pm). - Integrated wrapper code changes in order to make the PDFlib wrapper compatible to versions of Perl newer thant 5.005_54 (pdflib_pl.c). - Added an export list to the pdflib Perl module. This makes it easier to use our module along with other modules. Clients need no longer write "package pdflib" at the beginning since all functions are exported (pdflib.pm, hello.pl, pdfclock.pl). - Python: - On Windows separates the wrapper DLL from the PDFlib core DLL. - Due to a necessary change in the name of the library, script must now use "from pdflib_py import *" (instead of "pdflib"). - Implements support for strings containing null characters. - Removed PDF_boot() and PDF_shutdown() which have accidentally been included in the wrapper code (pdflib_py.c). - Searches for the lib-dynload directory where to install the shared library for Python (configure.in). - Tcl: - On Windows separates the wrapper DLL from the PDFlib core DLL. - Changed the name of the wrapper library from pdflib.so to pdflib_tcl.so (pkgIndex.tcl). - Rewrote the wrapper code so that it does the right thing with Unicode strings (pdflib_tcl.c). - Implements support for strings containing null characters. - Tcl 8.0 is now required because of the support for binary strings (configure.in). - Removed PDF_boot() and PDF_shutdown() which have accidentally been included in the wrapper code (pdflib_tcl.c, pkgIndex.tcl). - Visual Basic: - Removed the Visual Basic binding since VB is much better covered by the new PDFlib ActiveX control (bind/vb/*). Documentation ============= - Added platform-specific readme files (doc/readme_.txt). - Added an appendix dealing with shared libraries to the manual. - Removed the redundant list of configure options from doc/install.txt. - Changed all occurrences of PDFlib's WWW address to www.pdflib.com. V2.01 (August 3, 1999) ===================== New features and API ==================== - Extends the JPEG reader to allow for progressive JPEG images which are supported in PDF 1.3/Acrobat 4 (p_jpeg.c). - Applies a workaround for Photoshop-generated CMYK JPEG images. The algorithm is taken from my jpeg2ps utility: detect the Adobe marker, and write a suitable /Decode array to invert the 4 color planes (p_image.c). - Introduces the concept of a "default" encoding which evaluates to macroman or winansi according to the current platform. This facilitates writing identical test programs for all platforms. All samples except those for Visual Basic (which is Windows-only) have been adjusted to use the default encoding. - Streamlines the image file interface in several ways: (pdflib.h, p_intern.h, p_image.c, p_gif.c, p_tiff.c, p_jpeg.c, p_ccitt.c, p_basic.c, bind/vb/pdflib_vb.idl, bind/vb/pdflib_vb.def, clients/pdfimage.c, bind/cpp/pdflib.[h|c]pp, test/pdftest.c). - Removes PDF_place_inline_image() since it doesn't seem to bring any real advantage to PDFlib clients. - Removes PDF_put_image() since the image data is "parked" in the ouput immediately on PDF_open_*(). The /Name key is no longer in Xobjects since it was only required by PDF 1.0. - Removes PDF_execute_image(). Instead, PDF_place_image() can now be called multiple times for re-using image data. - Consolidates all pdf_close_*() functions in PDF_close_image. All image-specific stuff is now done at the end of PDF_open_*(). - PDF_open_*() (along with the newly implied pdf_put_image()) is now allowed outside of page descriptions. This requires pdf_put_image() to do a pdf_begin_contents_section() in some cases. - Adds several symbolic names for new destination zoom values in PDF_add_pdflink() and PDF_add_locallink() (p_annots.c). - Added an undocumented hook for placing existing images as thumbnail for the current page. This is for a specialized application and is not supported at the scripting layer (p_image.c, p_image.c, p_intern.h). - Changed PDF_open_memory_image() to PDF_open_image(). This makes memory images accessible from the scripting languages, and adds support for file and url references as placeholders for the actual image data (pdflib.h, p_image.h, p_intern.h, bind/vb/pdflib_vb.idl, bind/cpp/pdflib.hpp, bind/cpp/pdflib.cpp). Bug fixes and enhancements ========================== - A static resource configuration file (pdflib.upr) was always opened when the client dynamically added resources. We skipped the file open step since it's well reasonable to work with dynamic configuration exclusively (p_util.c). - Fixes a crash due to an uninitialized member of the PDF struct (resourcefile_loaded). The bug showed up when trying to use non-standard fonts (p_basic.c). - Added a number of casts to avoid assignments to variables which are never used. This basically affected the contents of comment and notice lines in AFM files, which are not being used (p_afmparse.c). - Merged the metrics files for macroman and winansi core metrics (p_metrics_win.h, p_metrics_mac.h) to a single file (p_metrics.h, p_font.c, Makefile.in, pdflib/Makefile.in, PDFlib.hqx, *.dsp) - Makes DLLMain only visible when PDFLIB_EXPORTS is defined (p_basic.c). - Changed the default page transition duration to 0 in order to avoid unnecessarily writing the duration key to all page dictionaries (p_hyper.c). - Changes to example path prefix in pdflib.upr to make it clearer that the upr file has to be adjusted before it can be used (fonts/pdflib.upr). - The debug flags didn't work due to a typo (p_basic.c). - Debug flag 'u' (don't unlink PDF file on error) was implemented the wrong way, and didn't match the documentation (p_basic.c). - Improves the memory management by avoiding "semi-allocated" aggregated objects. This involves subtle changes around the realloc() calls, and cleaner initialization of the reallocated data. The benefit of this shows up in memory-out situations when the error handler pops in and tries to free memory blocks which are not completely initialized. This may especially happen in multi-threaded environments (p_intern.h, p_basic.c, p_font.c, p_images.c, p_hyper.c). - Fixes some inconsistencies related to link border style, color, and destination zoom (p_annots.c). - Removed the beveled, inset, and underlined link border styles since they don't work as advertised in the PDF specification (p_annots.c, pdftest.c). - Improves the handling of XObject resources: formerly all Xobjects used in the document up to the current page had been placed in the page's resource list, potentially cluttering up the print stream generated for the PDF. Now we only list the XObjects which are actually used on the current page. This change will not affect Acrobat's viewing behavior. - The bpc and components values of TIFF image weren't always properly reported by TIFFlib. We improved this by using TIFFGetFieldDefaulted() instead of TIFFGetField() for retrieving these (p_tiff.c). Build process, distribution, and platform support ================================================= - Several improvements in the configure machinery (configure.in, Makefile.in): - Added a --without-cxx option to the configure script in order to make life easier on systems where the C++ is not correctly recognized. - The include and lib paths for perl/zlib/tifflib shown with "configure --help" had some differences from the actual spelling of the supported options. - Included a number of changes to the configure script required to make the shared library versioning work on NetBSD systems. - The --with-perlincl option for configure didn't work. - Added a number of conditionals for the Cygwin environment. - Always puts the version number in the file names of the shared and static PDFlib libraries. Previously the static library ended up without a version number in its name, possibly leading to mismatches with later versions. - Introduces configure variables for the names of the shared and static libraries. This allows us to easily build the "other" library (as opposed to the one specified when configure was run) as well. - Removes the -g option from all Makefiles (pdflib/Makefile.in, clients/Makefile.in, util/Makefile.in, bind/c/Makefile.in, bind/cpp/Makefile.in, test/Makefile.in) - The util Makefile is no longer called by default since the utility programs are currently not needed by ordinary library users (Makefile.in). - Notes that the util Makefile needs an installed PDFlib library (util/Makefile.in). - Assorted changes suggested for supporting the Cygwin32 development environment. These involved several Makefile.in files, configure.in, and C source modules which make use of getopt(). Most of the changes enhanced the configuration machinery for other systems, too. - Removes the install targets for the C and C++ bindings in the main Makefile since those targets weren't used anyway (Makefile.in). - Changes the $@.$(OBJ) construct in all Makefiles to the actual name of the object (we don't want to use $< since it doesn't work everywhere) (*/Makefile.in, bind/Makefile.in). - Removed a leftover text file (util/readme.txt). - Cleaned up the configuration information in the MSVC project files. Most projects now only support a "Release" configuration; only pdflib and test have "Debug" configurations, too (pdflib.dsp, bind/*/*.dsp). - Includes a separate project for building PDFlib as a static library with MSVC. - Better supports the Mac distribution (Makefile.in): - Changes the CodeWarrior project file name suffix from the odd mu character to the more Unix-friendly .mcp. Since the project file doesn't contain a resource fork, there's no need to use binhex (.hqx) encoding. - Convert the lineends in all relevant text files to the Mac convention. - Implements a procedure for setting the correct file types for all relevant files (uses a utility program on the Mac). - Makes a self-extracting distribution fileset for the Mac. - Changes the Mac build of the shared library to link static C runtime libraries (instead of the previously used DLLs). This avoids the need for certain Metrowerks libraries at runtime (PDFlib.hqx). - Expands the Macintosh project file with support for the Java/MRJ, Python, Perl, and Tcl bindings. Bindings ======== - C: - One of the test programs didn't check the return value of PDF_open() (pdfclock.c). - Corrected a typo in the clean target of the makefile (Makefile.in). - C++ - Changes the C++ wrapper such that setting the define BROKEN_STRINGS reverts from ANSI C++ string handling to plain old C char pointers. As it turned out, ANSI C++ strings are badly supported by many compilers. Besides, there was a typo in the old construct (pdflib.hpp, pdflib.cpp). - All SWIG bindings - Introduces export pragma for exporting PDFlib routines for the SWIG bindings on the Mac (pdflib/pdflib.i, bind/*/pdflib_*.c) - Java: - Makes the Java binding work with the Macintosh Runtime for Java (MRJ) 2.1 (PDFlib.mcp). - The pdflib Java initialization sleeps some time if the shared library cannot be loaded. This is a benefit on systems where the Java console immediately disappears on exit. - The MSVC project file for the Java binding used file names with the path of a beta version for all source files (Java.dsp). - Perl: - The DEFINES variable was missing in the definition of CFLAGS (bind/perl/Makefile.in). - Makes the Perl binding work on the Macintosh (PDFlib.mcp). - Includes a first version of a MakeMaker-compatible Perl script for generating a Makefile which more closely fits the Perl environment. The Perl-generated Makefile can be used instead of the configure- generated one in bind/perl. Note that the Perl script itself must be generated by the configure script. - Notes how to build the PDFlib Perl binding with recent versions of Perl, e.g. 5.005_57 (bind/perl/readme.txt). - Python: - The DEFINES variable was missing in the definition of CFLAGS (bind/python/Makefile.in). - Makes the Python binding work on the Macintosh (PDFlib.mcp). - Makes the test programs exit cleanly in case of error (hello.py, pdfclock.py). - Tcl: - The Tcl package index file didn't get updated properly due to the LD_LIBRARY_PATH variable not being properly exported (bind/tcl/Makefile.in). - Fixed a typo in the hello test program. Apparently it worked correctly anyway because of some particular circumstances and missing type checking in the SWIG-generated code (hello_tcl.pdf). - Makes the Tcl binding work on the Macintosh (PDFlib.mcp). - Visual Basic: - The return value of all image open functions was erroneously declared void instead of int. We had to change the GUID after this correction, but the 2.01 API lost some image functions anyway (pdflib_vb.idl). Documentation: - Slightly expands the comments in pdflib.upr. - Adds several clarifications and minor additions to the manual, and cuts down the size of the PDF manual by optimizing font and image handling. - Adds information to the manual about configuring the shared libraries for scripting under Unix, Windows, and Mac. - Adds descriptions of the few new features to the manual. - Removes the bind/*/pdflib_*.doc text files since they don't add any real value to the big PDFlib manual which is supplied in PDF format. - Brings the sections in pdflib.h in sync with the sections in the main manual (although the SWIG-generated doc files are no longer distributed). V2.0 (June 30, 1999) ===================== Bug fixes and enhancements: - Implements a better scheme for making sure the ordering constraints for PDF page descriptions are obeyed while not bothering library clients with most of the details (p_gstate.c, p_draw.c, p_text.c). The remaining constraints are documented in the manual. Build process, distribution, and platform support: - Further tweaks the support for shared libraries on OpenStep 4 (configure.in). Bindings: - All bindings: - The shared libraries built for a specific language binding inadvertently referred to a hard-coded path to the actual PDFlib library (../../pdflib). In order to avoid this, the -L and -l options are used instead of supplying the relative name of the library file for linking the shared libraries or test programs (bind/*/Makefile.in, configure.in). This means LD_LIBRARY_PATH has to be set for testing. - Java: - Removes the pointless import statement from the Java samples (hello.java, pdfclock.java). - Tcl: - Added LD_LIBRARY_PATH when generating the Tcl package index file in order to find the PDFlib shared library (bind/tcl/Makefile.in). Documentation: - Explains more of the PDF graphics model, and documents the restrictions and interactions among graphics-related functions (doc/PDFlib.pdf). V1.92 (June 27, 1999) ===================== Bug fixes and enhancements: - PDF_translate() erroneously used the same value for both coordinates (p_gstate.c). - A subtle "unreachable code" warning was issued by the Watcom compiler, and he was right (p_util.c). - Fixed a bug in the GIF code which caused a crash on the Mac due to an improper variable initialization. The bug had been introduced in the transition to thread-safe GIF handling in 1.91, and didn't affect other platforms. - Cleaned up several places which look like empty statements within a conditional (p_gif.c). - Slightly changes the PDF output. Although legal PDF, some properties caused problems with PDFviewer, a non-Adobe PDF viewer for OpenStep written by Detlev Droege: - Don't count the newline character into the /Length key of colormap objects because this leads to problems in the PostScript output generated from the PDF (p_image.c). - Don't compress inline images (p_image.c). - A missing initialization caused a crash on Windows (p_hyper.c). API: - Implemented PDF_set_fillrule() for setting the area algorithm used by PDF_fill(), PDF_fill_stroke(), PDF_closepath_fill_stroke(), and PDF_clip() (pdflib.h, p_gstate.c, p_draw.c). This change was requested and implemented by Evgeny Stambulchik . - Allows for dynamic font configuration by adding all UPR categories to the list of supported parameters in PDF_set_parameter() (p_basic.c, p_util.c). Build process, distribution, and platform support: - Added some compiler-dependent conditionals in order to make the C++ binding work with non-ANSI compilers (bind/cpp/pdflib.hpp, pdflib.cpp). - Improves compatibility with OpenStep 4.x: - Added an include file required for getopt (util/compile_metrics.c). - Enhanced configure for shared libraries on OpenStep 4.x (configure.in). - Don't build the C++ binding (configure.in). - Removed the additional Makefiles for MS VC++ and the complete port subdirectory from the distribution (port/msvc/*). Bindings: - SWIG: - Made PDF_boot() and PDF_shutdown public in order to avoid problems with the SWIG wrapper files which may use them (pdflib.h). - Made the exception jump buffers for the SWIG bindings static which they should have been anyway (pdflib.i). - Adds the define PDFLIB_STATIC to the project files for the SWIG bindings on Windows because we don't want to export the core PDFlib functions from the DLL in the SWIG case. - Java: - Adds a MS VC++ project file for the Java binding (bind/java/Java.dsp). - Tcl - Adds a MS VC++ project file for the Tcl binding (bind/tcl/Tcl.dsp). - Perl - Adds a MS VC++ project file for the Perl binding (bind/perl/Perl.dsp). - Introduces patches and quirks to support PDFlib with ActivePerl on Win32. Although our configuration works for a certain software combination, all issues are documented (pdflib/pdflib.i, perl/readme.txt). - Changed the order in which Perl executable names are searched. The more likely name "perl" now is searched first (configure.in). - Don't map bool to char in the Perl module on NeXT, since the Perl include files contain special handling for bool which breaks with our usual defines (configure.in, bind/perl/Makefile.in). - Python - Adds a MS VC++ project file for the Python binding (bind/python/Python.dsp). Documentation: - doc/compatibility.txt had some deprecated advice on the use of PDF_close(). - Added several clarifications and corrections to the manual. - Adds a table of tested version numbers for the language bindings to the manual. - Reduced the number of fonts used in the manual. - Delivers the manual in PDF 1.2 format to avoid triggering a PostScript error when printing PDF 1.3 files with color images from Acrobat 3. - Changed the page size format of the manual in order to cut down the total number of pages. V1.91 (June 18, 1999) ===================== Bug fixes and enhancements: - Fixed a typo involving a printf %s format in an error message (p_font.c). - Fixed two NULL pointer accesses for AFMs without a Weight entry (p_afmparse.c, p_font.c). - Extends the AFM parser which was required for correctly processing certain non-Adobe AFM files (p_afmparse.c): - Added the new key "Characters" to the AFM parser. The value is ignored since it is duplicated in "StartCharMetrics". - Changes the handling of the "Version" key in AFMs such that arbitrary strings are allowed after the keyword, not only single tokens. - Changes the handling of the "Encoding" key in AFMs such that it is optional, not required (p_afmparse.c). - Allow blank lines and comment lines in upr files (p_util.c). - Removed the remaining non-const globals in the GIF module, thus making GIF processing thread-safe (p_gif.c, p_intern.h). - Adds multithreading for Win32 to the test bed (test/pdftest.c). This nicely demonstrates PDFlib's thread-safety. - Changes the debug configuration and output machinery to a more flexible system with control over individual debug facilities. - Adds const to the PDF_set_font declaration and definition. - Removed sys_errlist from makepsres in order to make it POSIX compliant. - Added some cleanup code for places discovered with a purify session: - The resource handling machinery didn't close the handle to the resource file (p_util.c). - The client-provided resource file name wasn't freed (p_basic.c). - The base structure for ligatures in the AFM parser wasn't freed (p_afmparse.c). - Changed the cleanup routines to make sure the output file is closed in case of error (p_basic.c). - Two non-initalized members of the PDF struct caused a core dump at clean-up time under rare circumstances (p_basic.c, p_image.c). - Adjusted the output format of float values to the limits documented in the PDF spec (p_util.c). - The annotation border style and color were not correctly initialized due to a typo (p_basic.c). - The transition info didn't get properly initialized (p_hyper.c). API: - (Again) bundles PDF_close_file() and PDF_close_fp() to PDF_close() since clients should not be affected by the way in which the PDF had been opened. - Slightly rearranged some functions to other C modules in order to make the API structure and manual clearer. - Removed PDF_finalize() from the API and reworked PDF_delete() so that it may be used for cleanup in case of error. - Changed the error handler's signature to include PDF * to make it easier for client-supplied handlers to do a PDF_delete(p) (p_basic.c, p_intern.h, pdflib.i). - Changed the first argument of the memory management procedures back to PDF *, since the client can retrieve his own opaque pointer via PDF_get_opaque(). Build process, distribution, and platform support: - Added several casts in order to pacify the CodeWarrior compiler. - Added a Macintosh-encoded variant to the sample text in pdftest.c. - The configure script set the TIFF include path even when no TIFF support was installed/found (configure.in). - Adds the AFM files to the distribution (again), and moves pdflib.upr to the directory where the AFMs live (fonts/*.afm, fonts/*.upr). - Adds a --with-debug option to the configure script which activates the debugging facilities, and implies building PDFlib as a static library. - Adds a test for the JPEG library to the configure script since the JPEG library is needed by some versions of the TIFF library. - Changes a couple of places for compilation with the Watcom compiler: - Maps the __WATCOMC__ #define to WIN32 (p_config.h). - Introduced a typedef for the first function argument of PDF_new2() since the Watcom compiler issues a dubious warning otherwise (pdflib.h). - Includes io.h for the unlink() declaration (p_basic.c). - Changed the sample images included in the distribution (pdflib.gif, tm.g3, acroweb_j.tif) - Removed the makepsres program from the distribution. - Adds compiler optimize flags by adding $CFLAGS to $DEFINES (configure.in). Bindings: - All SWIG bindings: - The dist target in the main makefile called the version target, resulting in updated access times for the SWIG-generated wrapper files. This in turn resulted in SWIG being launched unnecessarily on the client system. We now simply touch the wrapper files before preparing the tar file. - Java: - PDF_boot() and PDF_shutdown need not be available to the Java API since PDFlib booting is done automatically for the Java binding. - The hello example didn't obey the new PDF_findfont() semantics (bind/java/hello.java). - Perl: - Fixed a typo (1 should be -1) in the font error handling line (hello.pl). - C: - Moved hello.c and pdfclock.c to a separate directory bind/c. - A bug in the configure.in script prevented the test rules for the C and C++ bindings from being executed. - The C hello example didn't obey the new/open_file semantics (bind/c/hello.c). - C++: - Renamed the bind/c++ directory to bind/cpp in order to avoid problems with some older build environments (Makefile.in, PDFlib.dsw, configure.in). - Reworks the C++ binding in order to make it work with the Watcom compiler: - Don't use namespaces - Special string handling, including conversion to chars. - Adds a macro to change the conversion of C++ string to C chars since Watcom doesn't support the ANSI conforming c_str() method. - Removes the page loop and the sleep() call which had inadvertently been left over. - A bug in the configure.in script prevented the test rules for the C and C++ bindings from being executed. - Changed the PDF constructor in order to allow for client-supplied error and memory management routines, and adds default NULL values for these. Documentation: - Switches to version 7 of the Aladdin Free Public License, and includes the license text as PDF (doc/license.pdf). - Includes brief API documentation files for the SWIG-generated language bindings (bind/*/*.doc). - Includes the updated and reworked edition of the PDFlib manual (doc/PDFlib.pdf). V1.90 (June 2, 1999) ==================== New Features: - Makes PDFlib thread-safe by removing the remaining few writable globals. - Use magic numbers for image file formats (imagepdf.c) - Supports Unix PostScript Resource files (*.upr) for describing the AFM and font file names, and an environment variable pointing to the resource file. - User-defined document information field (in addition to Title, Author, etc.) - Unicode-enables bookmarks, text annotations, and document info entries (p_hyper.c, p_annots.c, p_text.c). - Changed the encoding vectors according to PDF 1.3. The most relevant change is the inclusion of /Euro in WinAnsi and PDFDoc encodings (ansi_e.h, pdfdoc_e.h) - File attachment, launch, link, weblink and text annotations (p_annots.c). - Add file type and creator on the Mac (p_basic.c). - Nested bookmarks (p_hyper.c). - Changes the API name of the bookmark function from PDF_add_outline to the more intuitive PDF_add_bookmark (p_hyper.c) - Removes the limits on number of pages, page contents, and number of objects and introduced dynamic reallocation (p_hyper.c, p_basic.c, p_annots.c). - Generates a PDF-1.3 header (Acrobat 4 files). According to the PDF spec this should work OK also for older viewers as long as no PDF 1.3 specific feature is used in the PDF file. - Introduces Zlib compression for images and file attachments. - Completely reworked the font handling. Font metrics caching now avoids many AFM lookups, which dramatically speeds up PDFlib (up to a factor of 20!). - Implemented in-core font metrics data. This completely eliminates the need for external AFM files. Using the supplied utility compile_metrics arbitrary metrics files can be compiled into the PDFlib source code. - Adjusted the page size validation to Acrobat 4's larger limits (p_basic.c). - New functions to query current font name and size (p_font.c) - Introduced version numbers for the shared library and versioning schemes for the scripting API (except Python) - Eliminated all enums at the API level and replaced them with string arguments. - Eliminated the individual PDF_close_[TIFF|GIF|JPEG|CCITT|memory_image] since PDF_close_image handles it all. - User-adjustable debug level. - Introduced PDF_new(), PDF_new2(), and PDF_delete, as well as PDF_open_file() and PDF_close_file() and PDF_open_fp() and PDF_close_fp(). - Made the page size parameters float in order to accomodate PDF 1.3. Bindings: - Largely improved the Perl, Tcl, and Python bindings. - Introduced the Java binding via JNI (bind/java). - Introduced a C++ wrapper class for PDFlib (bind/cpp). - Introduced versioning if the language supports it (currently Perl and Tcl; the Java binding uses transparent shared library versioning). - Binds the TIFFlib and zlib libraries into the shared library for the PDFlib scripting bindings, thereby making the TIFF and compression features available to all SWIG bindings. - Improved the SWIG-generated documentation for the scripting APIs. - Introduced language-specific exception handling as offered by SWIG. Exception handling for Java is done outside of SWIG. - Explicitly sets the "C" locale in order to avoid the Java VM messing up our decimal separators by setting a bad locale. - Introduced a Visual Basic binding with a specialized DLL and a type library. Other: - Restructured the distribution directory tree. - Streamlined the API for better scripting support. - Added a file which documents changes to the API. - Introduced versioning also at the API level and in the shared object naming. - Changed the error handler interface to a fixed string, as opposed to a variable number of arguments. - Introduced error/exception classes which replace the former error types, and are passed through to the scripting API. - Reworks and cuts down the AFM parser, and makes it re-entrant. - Installs NULL error and warning handlers in TIFFlib in order to avoid messages from opening corrupt TIFF files. The caller will be notified via the return code. - Introduced "const" for all char * arguments in the API. V1.0 (February 1999) (not publicly released) ============================================ No new featues, only bug fixes and improved platform support. Platform support: - Changed all library clients so that main() is declared with return type int. - Many casts and other minor changes in order to get rid of MS Visual C++ 6.0 warnings (*.c, *.h). - Included project and workspace files for MS Visual C++ 6.0 in the fileset (PDFlib.dsp, PDFlib.dsw). - Removed Watcom makefile from the fileset (makefile.wat). - Switch to autoconf support (configure, configure.in, Makefile.in) - Added Mac build support and file type/creator entries (p_basic.c) Bug fixes: - Extended close routine (p_gif.c, p_jpeg.c) - Page height and width were exchanged in the interface of PDF_begin_page() as well as in the manual. Funnily enough, the MediaBox was also written with both in the wrong order, thereby correcting things. However, the demo clients used the parameters in the intended order. This fix only clarifies the meaning of width and height, but doesn't change the behavior of clients. - PDF output file is no longer closed in the library in order to be consistent with the opening in the client. This INCOMPATIBLE change means that all library clients now must close the PDF output file themselves! - Fixed a core dump bug in the TIFF handler (p_tiff.c) - Fixes bug where a font could get written to the PDF with wrong encoding information. V0.7b2 (August 1998) (only for a single customer) ================================================= New features: - Added CCITT support for passing through G3 or G4 compressed bitmap data (p_ccitt.c, pdf.h). - Changes to the image interface (p_ccitt.c, p_jpeg.c, p_tiff.c, p_gif.c, pdf.h) Bug fixes: - Changed the get_2bytes macro to a function since the macro didn't guarantee the evaluation order, which lead to problems when analyzing JPEGs on BeOS (p_jpeg.c). - Added a check for Acrobat-compatible page size (1"-45", or 72pt-3240pt) in PDF_begin_page(). This is necessary to work around restrictions in Adobe's Acrobat implementation (p_basic.c). Minor enhancements: - Several makefile cleanups (makefile.gcc). V0.6 (08 July 1998) =================== New features: - Added SWIG support, as suggested and basically implemented by Rainer Schaaf (Rainer.Schaaf@T-Online.de). SWIG support allows us to use PDFlib routines from Tcl, Perl, and Python. (makefile, pdflib.i, pdftcl_wrap.c pdfperl_wrap.c, pdfpython_wrap.c, pdflib.pm). - New directory structure: BINDINGS directory contains subdirectory for several PDFlib language bindings. Currently these are C, CGI, Perl, Tcl, Python (yes, I know that CGI is not a language). - Included scripting samples (BINDINGS/*/pdfclock.[pl|tcl|py], BINDINGS/*/hello.[pl|tcl|py]). - Added new function PDF_setpolydash, suggested and implemented by Evgeny Stambulchik (p_gstate.c, pdf.h). Bug fixes and minor enhancements: - Fix trivial (but fatal) free/fclose bug (p_font.c) - Slightly change syntax of pdfgraph sample program: fill and stroke is denoted by 'F' instead of 'B' (pdfgraph.c) - Shorten the version string (pdf.h) - Add cast (p_basic.c) - Conditionally typedef bool because of conflicts in VC++ (pdf.h and p_port.h) - Add cast (p_font.c) - Delete old BOOL typedef (pdf.h) - Renamed function parseFile to pdf_parseFile in order to avoid name clashes with other software packages. This change was requested by Evgeny Stambulchik for the xmgr package. This package uses T1lib which also includes a copy of Adobe's AFM parser. (afmparse.c, afmparse.h, p_font.c). - Fixed typo in the Goethe demo text (pdfdemo.c). - Adjusted demo data to new setrgbcolor interface (test/graphdata). - Add PDF_HAS_BOOL define. However, it doesn't really fix the multiple boolean define/typedef/enum problem (p_port.h). - Removed const from PDF_info struct members. This change is related to SWIG support, although the necessity of the change is not yet fully understood (pdf.h). - Enhances the AFM parser to recognize AFM files according to the AFM 4.1 specification, especially the "CharWidth" keyword. V0.5 (25 February 98) ===================== Portability aids, bug fixes and other improvements from several contributors: - JPEG images could be closed multiply (p_jpeg.c) - Introduce Mac and Win32 porting defs (p_port.h) - Use define for path separator which is needed for the Mac's ":" (p_port.h, p_font.h) - Rename structure member private to private_data for C++ compatibility (pdf.h, p_font.c, p_gif.c, p_jpeg.c, p_tiff.c) - NeXT portability: include libc.h (imagepdf.c, pdfclock.c, pdfgraph.c, text2pdf.c) - Don't use malloc.h (afmparse.c) - Change variable handling in make build process (makefile) - Fix bug in octal character representation (p_text.c) - Introduce word and character spacing functions (p_text.c) - Fix subtle bug in font embedding: fonts with additional data after the zeros portion were not properly embedded (p_font.c) Environment bindings: - Introduces BINDINGS directory which will collect several language and environment bindings for PDFlib. - Sample CGI script for the PDFclock example (BINDINGS/CGI/clock.cgi) Several bugfixes, due to Detlev Droege's comments after testing with his PDFviewer: - Avoid empty /Filter arrays for uncompressed binary images (p_image.c). - Change erroneous number of color components in demo page (pdfdemo.c). - Implement consistency check for color components vs. color space (p_image.c) - Write binary magic number for all files (ASCII and binary) (p_basic.c). - Change "Producer" to "Creator" in sample application (hello.c). - AFM handler crashed in case the AFM parser gave up on certain AFMs (p_font.c). - AFM parser didn't correctly handle newer version 4.0 AFMs (afmparse.c). - Use AFM 4.0 key "StdVW" for a more accurate /StemV in font descriptor (p_font.c). - API CHANGE: Change RGB parameters from byte to float since gray values are float parameters too (p_color.c). V0.4 (8 September 97) ===================== First public release. - Generating multiple PDFs with embedded images resulted in wrong XObject numbers for the second and following PDFs. Use image_number from the PDF structure instead of a static variable. (p_image.c, p_basic.c) - Makefile for Watcom C 10.6 included in the distribution, support Windows build (makefile.wat).