CentraDoc 7.1 - Summary of Changes since 6.13

Table Of Contents


These are the changes to CentraDoc since the initial 6.13 release up to Version 7.1.3 2022-03-01

This includes 6.13.5 through 6.13.14, and 7.0.0, 7.0.1, 7.0.7, 7.1.1, 7.1.2, and related changes.


  • Multithreaded RIP engine, with example integrated into RIP tester
  • Full support for PDF output embedded & reference fonts using Unicode encodings
  • C# wrapper for parts of the CentraDoc API
  • PDF annotation import/export/round trip engine: "PDF Marks"
  • Improved support for import/export of the PDF Structure Tree ("Tags")
  • GCO/GCOM updates for improved C++/COM compatibility
    • renamed all .d files as .lidl files to avoid confusion with the D language
    • Potential conflicts with <windows.h>; #include it before CentraDoc includes
  • Moved all third party libraries out of cdoc into vendor folder
  • Updated third party libraries:
    • libpng 1.6.37
    • IJG JPEG-9e (with patched jdapimin.c, from JPEG-9, plus)
    • Little CMS 2.12 (current is 2.13.1)
    • ZLib 1.2.11
    • FreeType 2.10.4 (current is 2.11.1)
    • OpenJPEG (JPEG2000) 2.4.0


PDF Reader

  • #2372 PDF degenerate structure tree entries caused object management error on page unload
  • #2369 PDF detect some bad ToUnicode maps in fonts; gxc->pdf_substitute_all didn't always pass fonts to the driver
  • #2366 PDF Marks API no longer exports push buttons
  • #2365 XFA Fixed oddities with Linux build of V8 XFA engine
  • #2360 PDF Improved reading PDF Structure (Tags) elements, added support for MCR and OBJR
  • #2356 PDF Marks API fixed some cases of rotated page exports
  • #2354 PDF fixed null pointer crash on invalid PDF layers input
  • #2352 PDF relax parsing of numbers slightly to handle an invalid input
  • #2348 Reduce accidental oversample of Axial sampled functions
  • #2346 & #2345 & #2251 improve processing of stroked type 3 fonts, scaling & line widths
  • #2338 & #2132 PDF improved unload logic for PDF reading structure (Tags) out of memory issue
    • also: don't load structure if it's not in requested by the driver
  • #2332 PDF fix parsing of CMaps for PDF with unusual CMap syntax
  • #2328 PDF structure (tags) missing type name for some cases
  • #2324 PDF shader do smarter clipping to reduce excessive processing
  • #2323 PDF Marks import will no longer set NeedAppearances True, so Acrobat won't want to save changes
  • #2322 PDF encoding: fixes for cmap selection for embedded TrueTye font
  • #2319 PDF RIP support for filtering/reading simplified combined layers (OCMD, e.g. "LayerOne|LayerTwo")
  • #2318 PDF parser got stuck (out to lunch) on some specific syntax errors
  • #2318 the PsDvText driver was not reading to end of grabbed images, which is a problem for inline images
  • #2314 PDF remove old PDF specification limit on number of indirect objects
  • #2307 PDF soft mask transparency requires special handling of color spaces, switches to vanilla color spaces
  • #2304 PDF track bounding rectangle for structure Tag content, pass to DvEndMarker
  • #2284 PDF crash from pages using the same resource dictionary, invalid object management
  • #2275 PDF some improvement of error handling when requested output image size is unreasonable
  • #2270 PDF null pointer from missing DA entry in annotation, parse DS entry
  • #2265 PDF shortcut transparency group rendering when alpha is 0
  • #2262 PDF set italic flag for fonts with italic angle != 0
  • #2246 PDF advanced modification checking for signed PDF files (examples added DSS to Catalog)
  • #2241 PDF text handle rendering up to 1024 characters
  • #2240 PDF generating annotation appearance, DS default style overrides DA default appearance
  • #2226 PDF handling corrupted page stream producing unexpected output (ref #1534)
  • #2220 PDF improved recovery logic for example corrupted file
  • #2218 PDF unexpected Failure reading PDF file with invalid object reference
  • #2216 PDF signatures, ignore specified signature handler, only sub type is relevant
  • #2211 PDF improved recovery logic for example corrupted file
  • #2208 PDF improve handling for very large pathological pattern
  • #2204 PDF PDFPage_GetRotatedSpace to help resolve rotated extents issues
  • #2199 PDF generate appearances for Ink annotations
  • #2197 PDF crashing checking for empty appearance
  • #2193 PDF issues using external Symbol font
  • #2189 PDF Axial rendering requires more function points if input color model is different from output
  • #2187 PDF reading combined layer specification (OCMD) with only one layer in it, treat as single layer
  • #2186 PDF exception verifying signature
  • #2182 PDF signature annotation appearance misidentified as empty
  • #2183 PDF not handling symbolic truetype encoding for Wingdings font
  • #2179 PDF replace annotation highlight for cases where Acrobat will do so
  • #2167 PDF add sanity checks to pdf color operator parameters
  • #2164 PDF allow substitution for non-embedded (reference) Type 1 font, fixes encoding issue
  • #2162 PDF Marks add support for layers
  • #2153 PDF reader problems with matrix sanity checks for specific case
  • #2151 PDF handle empty annotation rectangle
  • #2150 PDF clip check error in get outer clip
  • #2139 PDF handle bogus name tree entries in structure tree
  • #2135 PDF HAVE_OPENSSL #ifdef test was backward, needed for signature code
    • NOSSL is the default in the shipping builds. For PDF Signature support:
      • define HAVE_OPENSSL
      • add OpenSSL include path to build.
      • link with libeay32.lib
      • CentraDoc builds with OpenSSL 1.0.2l
  • #2134 PDF don't load default encoding for symbolic TrueType fonts
  • #2131 PDF allow bogus /DefaultRGB entry without complaint
  • #2129 PDF allow empty clip path without complaint & minor fix for PDF file recovery
  • #2128 & #2126 PDF handle Unicode BOM in hex string and in empty strings
  • #2127 PDF increase limit on dash segments to 64, ignore excess in the future
  • #2122 PDF add support for 4 bits per component Flate image with TIFF predictor 2 (PNG)
  • #2119 PDF reset alpha when generating pattern template, don't stomp stroke alpha when filling pattern
  • #2118 PDF trap exceptions during rendering, stops current page only
  • #2117 PDF Marks, don't export signed signatures
  • #2106 PDF improve Image Matte handling for white Mattes
  • #2104 PDF ToUnicode CMap loader better handling of narrow entries listed as wide
  • #2092 PDF View API for determining (or setting) page mode/layout defaults, see pdfdoc/pdfview.h
  • #2090 PDF file has extreme pattern intended for drawing once, failed size check - fixed
  • #2089 PDF Image Matte implementation
  • #2086 PDF added FRECT to PSDXCLIP to handle some extreme cases - very small clip areas
  • #2085 PDF with 0 sized font causes problems
  • #2081 PDF fix resource management bug in appearance generation
  • #2067 PDF allow external mapping for standard fonts
  • #2066 PDF JPX (JPEG2000) stream didn't signal EOF correctly; pass image_source to DvImgGrab
  • #2058 PDF FAILURE when approximating explicit mask from 16 bit mask
  • #2049 PDF mismatched encoding names caused repeated loading of encoding file
  • #2046 PDF PdfBlockAllText=Y to remove all text from a rendering
  • #2041 PDF add sanity checks on input path coordinates, examples caused integer overflow (>2**31)
  • #2036 PDF ToUnicode map glitch with narrow input, multiple wide output
  • #2031 PDF high level clip check for XObjects speeds rendering for some cases
  • #2029 PDF add official support for reading PDF 2.0 files
  • #2028 PDF Wingdings and Webdings fonts encoding glitches
  • #2024 PDF trap and ignore syntax errors during pattern rendering
  • #2023 PDF ignore font all caps flag for embedded fonts
  • #2020 PDF make graphics state stroke adjust flag ("SA") available as gxs->stroke_adjust
  • #2018 PDF export PDF font dictionaries and FreeType face from font objects for driver's use
PdfDictionary *FntPT0_Dictionary(FntPtr fnt);
PdfDictionary *FntPT1_Dictionary(FntPtr fnt);
struct FT_FaceRec_* FntFT_GetFace(FntPtr f);
  • #2017 PDF Internals, making smart objects type safe
  • #2016 PDF error in color state maintenance across gfx/dv layers
  • #2006 PDF driver work around: set cap->image_ignoresoftmask to ignore soft masks, otherwise converts to 1 bit explicit mask
  • #2005 PDF Don't call DvCharEm when fully clipped
  • #2001 PDF fix problems with implementation of #1499 pass through alpha for drivers without group support
  • #1990 PDF remove limits on number of parameters to PDF fine text operator
  • #1984 PDF Type 0 font with 0 default width caused the Widths array to be ignored
  • #1981 PDF create Signature appearance if blank
  • #1977 PDF initial ticket regarding vanilla color management for soft masks, speeds up rendering considerably
  • #1972 PDF/RIP fix issues in CMK implementation of Luminosity blend mode
  • #1953 PDF add PdfAnnot_GetUIFieldName
  • unticketed PDF disable AES warnings nobody cares about
  • unticketed PDF better synthesis of missing fonts, scaling individual glyph widths according to PDF widths

PDF JBIG2 Reader

  • #2282 PDF JBIG2 invalid access crash
  • #2279 PDF JBIG2 issues with fixes for #2249
  • #2272 PDF JBIG2 reader additional unfortunate problems from #1973
  • #2249 PDF JBIG2 reader issues
  • #2154 PDF JBIG2 handle extra noise at end of stream and missing endstream
  • #2013 PDF JBIG2 add FFsJBig2_GetPageInfoOnly(in, &width, &height) info call
  • #2004 PDF JBIG2 increase image limits, esp. 64 bit builds
  • #1987 PDF JBIG2 fix glitch in #1973: 0xffffffff allowed for header length
  • #1973 PDF JBIG2 example file contains degenerate symbols tables

PDF Writer

  • #2327 PDF marking PDF/A-1a output, don't overwrite existing StructTreeRoot for exported tags
  • #2325 PDF Virtual Unicode Font output requires ToUnicode for copy/paste out of Acrobat
  • #2321 PDF Output, PdfAnnot_SetRichText for setting rich text content on an annotation
  • #2306 PDF high level copier, output PDF/A if input is PDF?A
  • #2300 PDF output PDF/A requires Type 1 font subsets have FontDescriptor/Charset entry
    • repaired off-by-one error writing Type 1 fonts; font couldn't contain 256 characters
  • #2294 PDF output PDF/A issues with fractional time zone
  • #2290 PDF output improved mechanisms for creating masked images:
//  added mask helpers:

void *Pdf_LoadJBIG2AsMask(Instance self, const char *name, int *oWidth, int *oHeight);
void *Pdf_LoadJBIG2Masked(Instance self, const char *name, void *maskImage, int *oWidth, int *oHeight);
void *Pdf_LoadJPXMasked(Instance self,  const char *name, void *maskImage,int *oWidth, int *oHeight);

void * Pdf_NewIndexedImageMasked(
    Instance self,   /**< Pdf */
    void *maskImage,
    int width,       /**< width of image in pixels */
    int height,      /**< height of image in rows */
    int bitsPerIndex,/**< size of the index value */
    int nComponents, /**< number of components in the index table */
    const unsigned char *table,  /**< color table, 8 bits per component */
    int tableSize    /**< number of bytes in color table (must be == nComponents * 2^bitsPerIndex)*/

//  modified this method::

void *Pdf_LoadJBIG2(Instance self, void *optIntoImage, const char *name, int *oWidth, int *oHeight);

// by removing the optional parameter:

void *Pdf_LoadJBIG2(Instance self, const char *name, int *oWidth, int *oHeight);

//  added these methods instead, for consistency

void *Pdf_LoadJpegInto(Instance self, /**< Pdf */
    void *optIntoImage,
    const char *fileName, /**< jpeg file to open */
    int *oWidth, /**< returns Width of jpeg file */
    int *oHeight /**< returns Height of jpeg file */
void *Pdf_LoadJPXInto(Instance self, void *optIntoImage, const char *name, int *oWidth, int *oHeight);
void *Pdf_LoadJBIG2Into(Instance self, void *optIntoImage, const char *name, int *oWidth, int *oHeight);
  • #2289 PDF output fixed multiple issues with Virtual Unicode Fonts
  • #2274 PDF output APIs for SetOpenAction and ParseOpenAction
  • #2239 & #2237 PDF virtual unicode output, embedding & reference extensions.
    This is principally throught the Pdf_EmbedFont API. This allows font referencing, full font embedding, and embedded subsets. Embedded subsets are converted to Type 1. Use of the sfntly library to embed TrueType subsets is not currently supported, sfntly doesn't build with the current MS C++ compilers.
void * Pdf_EmbedFont(
    Pdf* self,          /**< Pdf (PdfRW) */
    const char *name,   /**< font file path OR WINDOWS FONT NAME (from registry) */
    int faceNumber,     /**< index into TTC font, or 0 */
    const char *fontNameOverride, /**< optional override for fontName */
    int usageFlags,     /**< see PdfFontEmbeddingFlags */
    int *oStatus        /**< ESimpleError more info if something goes wrong */

typedef enum
    kEmbedFontForceEmbed=1,     /**< ignore font license flags */
    kEmbedFontSubset=2,         /**< embed a (Type1!) font subset only (otherwise whole font) */
    // ...
    kEmbedFontReferenceOnly=32,     /**< Don't actually embed the font, just reference it */
    kEmbedFontPostscriptName=64,    /**< fetch the Postscript name, and use that */
    kEmbedFontNarrowIsUTF8=128,   /**< use UTF-8 in the ShowText call */
    // ...
} PdfFontEmbeddingFlags;

// e.g.

void *font = Pdf_EmbedFont(pdf, "Arial", 0, 0, kEmbedFontReferenceOnly, 0);
  • #2214 PDF/A-3u output, file attachments require AF entry and MIME type
  • #2201 PDF/A output add support for embedding CMYK profiles
  • #2198 PDF/A output compatibility push button requires empty appearances to satisfy Acrobat
  • #2176 PDF Marks import/export incorrect check box font and button state
  • #2170 PDF embed reference font option re #2237
  • #2165 PDF Marks import/export on rotated pages
  • #2161 PDF/A output fixes, missing rdf wrapper and handle XML escapes
  • #2113 PDF added some support for creating FDF files
  • #2109 PDF Marks export with matrix
  • #2105 PDF handle alpha when generating free text annotation appearance
  • #2095 PDF option to generate free text annotation background or default to transparent
  • #2094 PDF add annotation In Reply To API:
/* replies must be on the same page as the in-reply-to annot
void PdfAnnot_SetInReplyTo(PdfAnnotPtr reply, PdfAnnotPtr irt);
void PdfAnnot_SetInReplyToD(PdfDictionary *reply, PdfDictionary *irt);
PdfAnnot *PdfAnnot_GetInReplyTo(PdfAnnotPtr reply);
PdfDictionary *PdfAnnot_GetInReplyToD(PdfDictionary *reply);
  • #2075 PDF Marks add support for radio buttons
  • #2072 PDF Marks example XFAF file Acroform/Fields is a tree instead of an array
  • #2062 PDF added Pdf_CreateLinkType
  • #2060 PDF Marks adapted for round trip annotations
  • #2040 PDF workaround for generating free text appearance streams with Unicode
  • #2034 PDF create mask work around methods for JBIG2 images
rt_Bool Pdf_SetImageMask(void *image);
rt_Bool Pdf_InvertImageMask(void *image);


  • #2242 PDF distiller reduce output size by cleaning up font leakage
  • #2230 PDF distiller font state tracking error
  • #2203 PDF distiller errors with glyph capture

PDF Enhancements

  • #2038 PDF Geo modules: pdfgeo and pdfterra - read and write GeoSpatial PDFs, read TerraGo Geo PDFs
  • #2195, #2019 PDF Marks and BlueBeam interoperability: pdfmarks
  • #1955 PDF 3D annotation I/O modules: pdf3da pdf3dio


XFA is a very slippery spec and rendering is constantly improved to handle example files.

Some of the many issues addressed:

  • #2349 XFA handle item named 'all', and missing script references for Time, Num2Time
  • #2303 XFA exception in old UTF-8 conversion function
  • #2266 XFA runaway bind logic, out to lunch
  • #2261 XFA file caused load error
  • #2252 XFA phone number picture with ()
  • #2247 XFA missing dates, same file as #1877
  • #2236 & #2159 XFA missing dingbats
  • #2235 XFA redundant % in picture format
  • #2234 & #2232 XFA more text picture format issues
  • #2219 XFA misc
  • #2215 XFA field font autosizing is difficult
  • #2213 XFA footer issues with example file (from #2084)
  • #2212 XFA change reported version to circumvent scripting error in file
  • #2210 XFA choking on Webdings font usage
  • #2207 XFA added PdfXfaAcroformFontScale= to tweak generated widget appearances from PdfXfaToAcroform=Y
  • #2200 XFA DIB image handling corrupting memory
    • improved DEBUG heap to better catch prefix corruption
  • #2184 XFAF file with missing elements on page 7
  • #2178 XFA file from #1932 footer alignment
  • #2173 XFA mmisc
  • #2172 XFA more picture format issues
  • #2168 XFA multiple
  • #2157 XFA vertical placement problems
  • #2156 XFA PdfXfaToAcroform=Y fields require multiline flag
  • #2152 XFA vertical layout
  • #2145 XFA add support for <div>
  • #2138 rename the v8 bin files according to build type
    • 32 bit release:
      • snapshot_blob.bin
      • natives_blob.bin
    • 64 bit release:
      • snapshot_blob.64.bin
      • natives_blob.64.bin
    • 32 bit debug:
      • snapshot_blob.d32.bin
      • natives_blob.d32.bin
    • 64 bit debug:
      • snapshot_blob.d64.bin
      • natives_blob.d64.bin
  • #2137 XFA XML parser allow symbol to start with high bit character
  • #2133 XFA PdfXfaToAcroform=Y multiple fixes, radio groups, wrong constant for red
  • #2123 XFA handle overlapping contentAreas in page definition
  • #2101 XFA multiple issues
  • #2100 XFA multiple issues
  • #2084 XFA handle child named 'name'
  • #2082 XFA XML parser allow symbol to start with underscore
  • #2080 XFA PdfXfaToAcroform=Y font issues generating Japanese fields
  • #2042 XFA badly formed XML input overflowed parser stack
  • #2037 XFA binding issues
  • #1992 XFA V8 build upgraded to 7.2.505
  • #1970 XFA files auto-detect CJK text and override font selection
  • #1937 XFA lots of improvements to PdfXfaToAcroform=Y
  • #1810 XFA default number format with commas, and fracDigits
  • #1666 XFA fracDigits behavior in Acrobat doesn't match XFA specification


Preview SDK


MultiThreaded RIP

Multithreaded RIP and additional riptest crop options

CDocRIPPtr CDocRIP_MTOpenFile(const char *fileName, const char *etcPath, int nThreads);
CDocRIPPtr CDocRIP_MTOpenFFs(FFs *ffs, const char *etcPath, int nThreads);