Skip to content

v5.3.0

Latest

Choose a tag to compare

@unidoc-alip unidoc-alip released this 25 Nov 14:01
1adfb2c

Release notes - UniPDF v5.3.0

This release contains new features, improvements and bug fixes.

New Features

  • US-2005 Transparent color stops in creator gradients via NewColorPointWithAlpha and AddColorStopWithAlpha on LinearShading and RadialShading, with transparent, #rgba and #rrggbbaa stops in templates and stop-opacity in SVG
  • US-1853 Long-term validation of signatures: a trusted later document timestamp serves as proof of existence, so signatures and timestamps it covers that no longer validate at the current time are validated at the time of that timestamp
  • US-1962 Creator.DrawTagged for tagging creator content under caller-built structure elements, and the new public model/tagcheck package for checking tagged-PDF structure
  • US-1828 Loading template fonts, images and subtemplates from an fs.FS via TemplateOptions.FS and TemplateOptions.SubtemplatePatterns, with placeholders drawn for missing resources
  • US-1829 Template tags <document> (page size, orientation, margins, language and title), <toc>, <header> and <footer>
  • US-1830 Built-in template helpers for numbers, dates, strings and data, such as formatNumber, formatCurrency, formatTime, truncate and default
  • US-1831 Template tags <svg>, <grid>, <polygon>, <polyline>, <curve> and <bezier-curve>, and more component setters exposed as template attributes
  • US-1917 Template tags <br/> for line breaks and <pre> for preformatted text
  • US-1832 TemplateOptions.HTMLEntities for HTML named entities in templates, and a documented guarantee that a ParsedTemplate can be rendered concurrently into different creators

Improvements

  • US-1854 Signature validation checks revocation on every certificate chain instead of only the first, and the new SignatureValidationOpts.StrictCARevocation treats any CA certificate revocation other than a hold as revoking every chain through that CA key
  • US-1821 Rebuilt creator auto tagging so marked content and the structure tree come from one source: invoices are now tagged, and charts and SVGs without alternate text are marked as artifacts
  • US-1982 Manually tagged content is linked to its pages, so tagged output no longer has missing /Pg, missing /StructParents or shared /StructParents keys
  • US-1834 The renderer pools transparency group buffers and composites only the painted region
  • US-1863 Template execution errors name the template file instead of reading executing ""
  • US-1919 FDF loading resolves indirect references in field entries and values
  • US-1838 US-2059 The metered license state file is written atomically and locked across processes, so concurrent processes no longer lose each other's usage counts, and it keeps its group when replaced
  • US-2001 UniPDF builds no longer link testing, testify or yaml: the JBIG2 test helpers moved out of the library and github.com/unidoc/pkcs7 was upgraded to v0.4.2
  • US-2069 Upgraded github.com/unidoc/pkcs7 to v0.5.0
  • US-2093 Removed the golang.org/x/net dependency to clear its advisories on Go 1.25; SVG charset decoding now uses golang.org/x/text

Bug Fixes

  • US-1965 US-1973 US-1984 US-1995 US-1996 US-1997 Fixed small pages being able to allocate without bound through repeated inline images, image XObjects, masks, /Contents, shared ICC profiles, JBIG2 globals and font streams: these now decode once per page and count toward a new per-page limit of 1 GiB by default, configurable via ReaderOpts.MaxDecodedPageSize, ParserOpts.MaxDecodedPageSize and core.SetDefaultMaxDecodedPageSize
  • US-1985 Fixed a page that draws one image XObject many times taking minutes to render
  • US-1977 US-2007 Fixed DocMDP validation being bypassable by rewriting the certification in a later revision: validation now uses the certified level from the signed revision and rejects any change that level does not allow
  • US-1976 Fixed document timestamps silently truncating a timestamp token larger than the size probe; signing now writes the full token or fails
  • US-1991 Fixed LTV enabling never returning for a signer certificate that is self-signed but not a CA
  • US-2067 Fixed PdfAppender signatures on encrypted PDFs being invalid in Acrobat
  • US-1994 Fixed a fatal stack overflow on an ICCBased colorspace whose /Alternate refers back to itself, and on Type 3 functions that refer back to themselves
  • US-1792 Fixed Names.ToPdfObject dropping every name tree except EmbeddedFiles on write
  • US-1961 Fixed gradient shading ignoring the positions of the first and last color stops
  • US-2006 Fixed SVG gradients being mapped over the whole SVG instead of the filled shape
  • US-1931 Fixed flattened combo boxes disappearing when their value has non-ASCII text such as umlauts
  • US-1935 Fixed the metadata stream being encrypted when EncryptMetadata is false
  • US-1936 Fixed GetPreviousRevision failing on a reader decrypted manually with Decrypt or DecryptWithCertificate
  • US-1956 Fixed encryption overriding a higher PDF version set with SetVersion, and AESV2 encryption now reports PDF 1.6
  • US-2064 Fixed text copied from UniPDF output being garbled in Acrobat and Preview with some fonts, caused by ToUnicode ranges outside the ISO 32000 limits
  • US-2063 Fixed characters defined in cidchar blocks of predefined CMaps such as UniJIS-UTF16-H extracting as U+FFFD
  • US-1920 Fixed the FDF parser rejecting any FDF file that contains a stream
  • US-2016 Fixed the extractor font cache evicting in load order instead of least recently used, and Tf ignoring an invalid font size