Skip to content

v3.12.0

Compare
Choose a tag to compare
@gunnsth gunnsth released this 22 Sep 00:43
· 109 commits to master since this release
9cbf29c

UniPDF 3.12.0 contains both new features/enhancements (additions to export surface) as well as fixes.

New features and enhancements

  • Added document timestamp signature handler option, which enables setting a fixed signature size instead of estimating it through the handler. This can save an extra call to the signature handler (and an extra API call if using an external handler).
    Example:
sigLen := 6000 // Reserve 6000 bytes for signature.
handler, err := sighandler.NewDocTimeStampWithOpts(
		testTimestampServerURL,
		crypto.SHA512,
		&sighandler.DocTimeStampOpts{SignatureSize: sigLen},
	)

Fixes

  • Improved page normalization function: pdfutil.NormalizePage. Now takes MediaBox and CropBox into account.
    Updated documentation for creator AddPage function to recommend calling pdfutil.NormalizePage prior to adding a page to avoid any surprising offsets or rotations due to some non-default settings.
  • Fixes in image handling, particularly regarding transparency. There was a regression in transparency handling from updated image handling in v3.10.0, which this corrects, as well as we have much expanded our test coverage to better cover different kinds of images.