CentraDoc 6.2.3 - Summary of Changes since 6.2.1


CentraDoc 6.2.3 includes a small number of high profile bug fixes, and a large number of lower profile bug fixes. There are also some significant enhancements to the new RIP, including CMYKA and Overprint support.

Most of the issues addressed are listed here by ticket number. This material comes from the check-in and ticket logs, and although it has been edited, it is still somewhat "raw". If you have any questions about a specific ticket or issue, please contact Liberty Technology Systems.


#2 More PDF Transparency issues, including:
  • blend mode not updated in lower level (#74)
  • BBox issues with transparency groups (#367 & #368, #481)
  • Soft mask ownership issues causing bombs in RIP

#318 Fixed random problems with PostScript CIE DEFG color spaces

#348 Saturation misspelled (PDF Transparency blend mode not working)

#359 RIP fixes, reenabling CMYK
  • Note that this actually renders CMYKA in the working buffer, to get correct / consistent results for PDF files with transparency. A new "NCha" color type has been introduced for use with the AGG code that replaces all the AGG colorspaces.

#362 RIP banding now goes from top to bottom (instead of bottom to top)

#363 fix blue gradient rendering black The PDF file contains degenerate type 3 stitching functions where bounds[0]==domain[0], causing the sub-function interpolation to return crap. This fix also guarantees that at least the last sub-function will be called in other degenerate scenarios.

#364 multithread glitches, including
  • type42 had some FT_ calls outside the lock
  • sysalloc MEMTRACK stuff was glitchy
  • note that the GCO object tracking (for debug reporting) is known to be inaccurate in multithreaded mode; avoided putting more locks in. (GCO debug report can show funky object counts if running multiple threads).

#366 GetSpotColorCMYK broken - in DvImgStr, gxs->color_space will now contain the "original" image color space. Example code to get the separation name for the color (better than GetSpotColorCMYK):

const char *getSeparationName(ClrPtr clr)
  if (!clr)
      return 0;

  if (CLR_Type(clr)==cIndex)
      clr = CLR_BaseColor(clr);
  if (CLR_Type(clr)==cSeparation)
      return CLRSEP_GetName((ClrSepPtr)clr);
  return 0;

#367 Line emulation drawing partial circles; path flattening requires weeding points

#369 Not correctly handling mono image with explicit or soft mask. Resizing logic had some weird conditionals.

#370 PDF had Invalid object due to mis-cased encoding name. PdfDocEncoding shouldn't be used for fonts, anyway: see table PDF ref d.1

#371 PDF Bad text placement of annotation due to non-normalized rectangle

#372 Control JPEG output quality via ini setting JpegOutputQuality. Default==75, Best==100. Also FFsJpeg_SetOutputQuality() function - call before creating Jpeg output streams.

#373 Handle funky outline structure in example PDF file

#374 PDF embedded cff font with no charmap / wingdings example

#380 PostScript failures in example file
  • File has troublesome LZW encoding (extra code before reset, causing a Fatal Error)
  • Execution of strings had a problem if the string did a restore - the temporary file object got freed. So, we no longer "track" these temporary objects, they get deleted on end-of-file during execution, which means they can still leak if the execution doesn't run to end of string.

#381 Windows driver example implementation handling /G## style encodings

#383 PDF quick fix allowing UCR_LETTERLIKE_SYMBOLS in DefaultCharSet for font ToUnicode maps

#385 PostScript bogus matrix breaks shade fill in example file due to use of clippath pathbbox sequence causing undefined result error.

#386 PDF another font glitch like #204 (parsing FreeType glyph outline) (the #204 change had misplaced parentheses)

#387 Control jpeg output quality via ini JpegOutputQuality= default == 75, best==100. API FFsJpeg_SetOutputQuality function - call before creating jpeg output streams.

#389 Some predefined PDF CMaps missing from our collection.

#391 PostScript file allow for ZapfDingbats encoding - get the right encoding in the driver

#392 Color Manager - disable color conversion if input profile == output profile, and assume input profile == output profile if input not specified.

#393 PDF encryption related:
  • deal with XRefStm in encrypted PDF file
  • deferral of string decryption - can't decrypt strings in the /Root /Catalog until the /Crypt stuff is loaded
  • #448 Encrypted PDF file won't open - original bug #243 re-broken by fix for #393

#394 Tickler for pseudo progress - Windows application needs time slices for events psc->tickle_every = integer will call progressCB (with this value) after counting down this many driver calls. Throws Abort if the progressCB returns a non-zero value. Currently implemented for PDF conversion only.

#397 and 469 PostScript show inside CID font cshow requires special handling (see PLRM)

#398 PostScript file crashing - Type3 procs blowing up because psstrokepath changed gxs->path identity

#401 PostScript Font dictionary FreeType object lifetime issues. Moved the object to the baggage mechanism, like the color arrays. Also using the font change token to avoid excessive thrashing of the Type 42 objects.

#403 RIP put scale and clipping API calls back in the RIP interface

#404 PostScript issues with example file
  • limitcheck - clip paths exceeds PSG_MAXCLPS - bumped to 64
  • handling CharStrings proc in type 1 and type 42 similar to type 3
  • gxc->embedded_font_metrics - set this to tell PostScript to use the driver to measure embedded fonts grabbed by the driver. This used to be somewhat haphazard.
  • #465 gxc->embedded_font_metrics (#404) not handling type 3 correctly
  • #465 for font type 203 (driver type 3) re-flush after measure in case it uses a sub font

#406 #411 PostScript JPEG decode that doesn't close due to wrapping the filter in procs

#407 Postscript save/restore - If a local object is getting removed from a global dictionary, we still need to track the change.

#408 (and #426) broken in r6813 for ticket #333 before 6.2 release (Type42 Sanity Checks still suspect)

#409 RIP Overprint
  • CMYK does full channel overprint and value overprint
  • RGB emulates value overprint with Darken blend mode
  • RGB does not emulate full channel overprint
  • testing discovered a memory management glitch/bomb in ClrDev_Clone
  • #482 #485 #486 #487 all overprint issues, fixed

#410 Nasty glitch in rt_strcpyz when target == source (if compiler is not Visual Studio 2005)

#412 Trap pathologically excessive PDF patterns. Count pattern operators, and stop executing pattern if MAX_PDF_PATTERN_OPERATORS limit is exceeded. Includes friendly rt_Warning_Message. (original PDF example file has a pattern definition > 100K text including > 3000 operators).

#413 CDocRIP API cleanups and riptest changes
  • remove cdocrip.h unused color manager fields to avoid confusion
  • riptest calls psbbox incorrectly, breaking scale option
  • riptest renamed -siz to -size for consistency,
  • riptest @infile mode for running multiple files at once
  • riptest report errors
  • riptest adding -rot to riptest (rotation) (#479)
#414 Fixed a variety of QA issues
  • PostScript issues using external TrueType fonts
  • qa/fonttest.ps type 3 fonts broken, leak
  • qa/encstd.pdf ligatures broken
  • cheshire.pdf leaks fixed
  • several issues detected by Purify including returning a local in makefont
  • a charenc memory change exposed a bug in charenc_isligature - returning the argument instead of the global, and all of a sudden the argument is going away at some later point
  • Windows image AlphaBlend problems
  • cdocrip looking in the wrong place for error return
  • PostScript images, driver must read all rows. 3 cases:
    • mono sizer doesn't read all input rows
    • vg_Canvas_Image may discard an image that won't appear; return status
    • PsDvNull caps must disable DvImgSrc or the image won't read (for skipping pages in the RIP)
  • Windows driver DvTextData could lose the encoding for next DvText in some circumstances
#416 PostScript several issues with example file
  • The PostScript file keeps creating RLC filters on the base, which eventually exceeds the RefCount limit. Fix closes the RLC and Discards the base file at EOD. RefCount limit is now a warning instead of a fatal error.
  • RLC change required PDF changes for compatibility (#459)
  • bit by LZW not pre-reading EOD if base buffer aligns "just right"

#417 PDF WinAnsiEncoding characters less than space to be bullet. PDF file uses character decimal 31 as bullet (real bullet is 149) Doesn't actually fix the problem if the font is emulated, because Acrobat will render unknown characters as bullet, and our emulation doesn't. Also, fixed a separate bomb in charenc from this file.

#419 #460 #461 PostScript local and global resources not working correctly - (Still possible issues with FontDictionary)

#422 FreeType hack to allow a broken glyph in a PDF embedded font

#423 PDF Text placement problem - r6437 broke GFX SetTextMatrix

#427 PostScript CCITT End Of Data sync problems
  • also: CCITT would process an entire input buffer, which forced the output buffer to resize often, unnecessarily
  • for the sake of completeness, fixed potential flate buffer boundary glitch, never seen in the wild

#433 #455 DvCharEm and Text mode fixes

#437 As requested, eliminate CMap symbol due to conflict with MFC (although CMap was PSI internal, and we don't use MFC).

#438 PostScript signed/unsigned char bug in pstext wide conversion

#439 PDF color problems caused by nasty glitch in str2double - parser got confused if given lots of significant digits.

#445 PostScript - convert idiom resource names to strings

#446 Windows Driver makeimage left nasty crumbs for releaseimage

#447 Image Limits and CMYK 1 bit per component (4 bits per pixel) handling

  • Example PDF has large CMYK-1 image (21819 x 27373) -

  • Added filter that converts CMYK-1 to RGB Indexed - speeds up ICC conversion

  • Installed Image Resizer to resample large images to improve performance

  • Here are the image resizer defaults:

    #define MAX_IMAGE_SIZE  (512*1024*1024)
    #define MAX_IMAGE_OVERSAMPLE (8)
    #define MAX_IMAGE_RESOLUTION (720)
  • disable any of the defines by setting them to 0 on compile command or in rt_config.h

#451 Changes for image floating point (r6945) had unexpected consequences (naturally). The <1 checks for delta mean something different if the deltas are float. there are still cases where the images will be filtered out, but they will be the same as before (6.1)

#454 PDF AI Layer names not handling Unicode correctly

#456 FreeType bomb - ttgload.c had a problem in the incremental interface with composite glyphs. Save and restore the loader->stream in load_truetype_glyph.

#458 Windows Preview SDK EMF failure - EMFReserveVM=MEG configuration workaround. This reserves address space in LS_EWMF for the metafile close, because the close remaps the file into contiguous address space, and it will fail if there isn't enough contiguous space available. (Needed for very large EMF file output).

#463 Radial shading extend lockup in line clipper
  • don't divide by zero when calculating tangents
  • added a safety check to the line clipper
#474 Color Manager Fixes
  • nasty typo in clrmgr: Intent = Absolute would break transform creation (because flags picked up from intent array)
  • RIP specifically clarifies which color manager output model is active RIP might have multiple output models configured in config. Other drivers might also want to do this to prevent possible confusion Color Manager needs a specific output model to work correctly, so if driver doesn't explicitly specify output model and multiple output models are configured, default is RGB.

#476 add ini_AppendGlobalFile as an alternative approach to reloading ini settings

#477 RIP re-enabled AGG image resampler to fix some image clarity problems
  • also start CMYKA target output as white w/100% alpha
  • #484 RIP AGG resample goes out to lunch if target for image is too small
#480 #487
  • Overprint issues and RIP AGG clipping fix - increase simple rectangle clip width and height by 1

  • Add ini control over RIP AGG gamma setting. Default was 0 which is flat, now the default is 0.75:

  • For Gamma=, -1 and -2 are special values for aliasing, which are both similar to AggDraftMode=Y

#483 PostScript issues with example file
  • flushfile shouldn't choke if the file is already closed
  • detect CRD staleness in cached CIE color spaces avoiding bomb
  • fix memory leaks in CIE matrix clone

#485 RIP AGG fix emulation of dashed lines (non-AGG stroke emulation still has some odd placements of dashes)

#486 PostScript example file invalidfont error - type 1 font has hstem and vstem operators with no parameters

#493 PDF DvClip: fixup clip segment points if dropping rectangles. Also GetSpotColorCMYK fix for stencil masks.

#494 PostScript Type 1 external fonts left file open after load. Also, some error handling issues:
  • errors signalled directly in psldsysd ipc code don't go through the exception handler
  • signalerror wasn't passing anything up to the application
  • now it does, but we're still missing details, like file offset and other useful stuff

#496 PostScript SubFileDecode not seeking correctly at end in some circumstances

#498 Several RIP issues:
  • Turn off overprint if overprintmode and shading
  • Enable overprintmode for stencil masks
  • RIP "totally clips" mode didn't clip out images
  • RIP Clip now uses gamma -2 ("greedy") for drawing the alpha mask
  • Path rectangle detection a little more forgiving (clipping fix)

#500 PostScript Type 0 font with FMapType 6 and driver grabs subfont, passed wide text to the driver even if the subfont wasn't wide (Wide data but dbcs==0).

#501 Windows Driver font name matcher made smarter to deal with common PDF spellings of common Windows fonts, like Arial-Black, ArialBoldMT, etc..

#502 Work around for a problem with DvFontEm/DvCharEm if similar fonts share the same name and the same font descriptor but different encoding. The driver would mistake them for the same font.

Some unticketed issues

  • rt_utils.h no longer deprecates strcpy and sprintf by default; this is too intrusive and too much burden on clients. (Pass -deprecate to builder to turn deprecation back on).
  • Profiler module: if running the profiler, stick to a single processor; this fixes some weird timer issues on some multiprocessor machines.
  • riptest: don't turn on the profiler unless NDEBUG mode
  • Reenable JasPer I/O for temporary files (PDF JPEG2000)
  • Preview SDK minor optimization of JPEG write: don't modify the DIB
  • make FILE *gGcoReportFile public for debugging purposes