SetaPDF 2.46.0.2006 is Here!2024-11-29
The year is reaching its end and we are pleased to announce a new release of SetaPDF!
The highlights are helper classes and methods in the SetaPDF-Core component to deal with ZUGFeRD invoices. Just checkout the new online demos:
We also improved the memory usage of the SetaPDF-Signer component by doing some optimizations in the SetaPDF-Core component - the memory overhead is not related to the initial document size anymore but is reduced to a minimum as the whole document is never hold completely in memory anymore.
The SetaPDF-Core component also allows you to create compressed object streams as of now. The manual will be updated in the coming days regarding this feature. While this may sound like a compression solution it is more a preparation for dealing with tag structures in view to PDF/UA. Compressed object streams show their strength when you have to deal with many nearly identical objects.
Finally, we want to inform you that this release is the last release that will support PHP 5.6 and 7.0. All coming releases won't be tested on these environments anymore.
As always, please note that all changes in the SetaPDF-Core component are also part of all other components.
🔥 REMINDER: If you haven't switched to token based authentication for our composer repository, do it asap in your personal composer setting.
Check the release notes of the components below.
Log in to download the latest version of the related packages!
Version 2.46.0.2006
Release date: 2024-11-29
SetaPDF-Core Component
Feature
- Added return value to SetaPDF_Core_DataStructure_Tree::add() method to get the finally added object back.
- Added getEntriesKeyName() and isNew() methods to SetaPDF_Core_DataStructure_Tree.
- Added return value to SetaPDF_Core_Document_Catalog_Dests::add() method to get the finally added object back.
- Added SetaPDF_Core_Document_Catalog_StructTreeRoot::getIdTree() method.
- Added ObjectCollector class and helper classes to collect indirect objects of specific types.
- Added getCompressXref() and removeReferencedObject() methods to SetaPDF_Core_Document class.
- Added support for creation of compressed object streams (enhanced SetaPDF_Core_Type_ObjectStream class and added SetaPDF_Core_Document_ObjectStreamCompressor class).
- Added helper class to extend XMP metadata to PDF/A conformance.
- Added helper class to extend XMP metadata to ZUGFeRD conformance.
- Added helper class to create and handle ZUGFeRD conforming PDF documents.
Bugfix
- Fixed toPhp() in SetaPDF_Core_Type_String when used in encrypted document context.
- Fixed sync behavior of Trapped value in XMP metadata.
- Fixed various situations in SetaPDF_Core_DataStructure_Tree when dealing with or creating empty tree structures.
Tweak
- Optimized recognition of invalid length values in stream objects.
- Added SetaPDF_Core_Writer_CopyStreamInterface interface.
- Implemented copyStream() method of SetaPDF_Core_Writer_CopyStreamInterface in SetaPDF_Core_Writer_Stream and SetaPDF_Core_Writer_TempFile.
- Make use of SetaPDF_Core_Writer_CopyStreamInterface in SetaPDF_Core_Reader_Stream::copyTo() and optimized method to reduce memory usage.
- Ensure string type for passwords in standard security handler classes (fixes a deprecation warning in special situations on PHP >= 8.1).
- Use predictor function when compressing cross-reference streams.
- Added getIndirectReference() and marked getReferenceTo() as deprecated in SetaPDF_Core_Document_OutlinesItem.
- Harden data types by using SetaPDF_Core_Type_*::ensureType() calls and explicit data type checks.
- Check for string parameter in constructor of File reader classes.
- Renamed factory() method of all security handler generator classes to create() (old method is marked as deprectated).
- New created security handlers are attached to their document instance automatically now (no need to call $document->setSecHandler($secHandler) afterwards anymore).