Skip to content

16.0.9

📅 2022-03-23

As with the last version of iDRS 15, a new API written in C is now available for the iDRS 16. It allows access to the iDRS functionality from C, Java, Python and other programming languages.

This C API is available for Windows, macOS and Linux platforms, and consists of a wrapper library which forwards calls to the C++ binaries underneath. Therefore, all the functionalities exposed in C++ are available in C, at no performance cost.

An additional Sample Application (samples/c/Image2Html) illustrates how to get started with the iDRS C API.

The following elements are added to the iDRS packages:

  • C API runtime

    • Windows: bin/idrsc16.dll
    • Linux: lib/libidrsc16.so.version
    • macOS: bin/libidrsc16.dylib
  • Compilation resources

    • Header files: folder include_c/
    • Import library (Windows): lib/idrsc16.lib
  • Sample

    • Precompiled executable: bin/CImage2Html16
    • Source code: samples/c/Image2Html
  • Documentation

    • API reference: documentation/iDRS16_C.html

This release also comes with a brand new cross-platform .NET API, available on Windows and macOS (all architectures), and Linux (x86_64 and ARM64 architectures). This new API is compatible with .NET version 6 and higher.

It consists of a wrapper library which forwards calls to the C++ binaries underneath, via the C library. Therefore, all the functionalities exposed in C++ and C are available in .NET, at no performance cost.

Existing .NET samples have been updated to use this new API.

The following elements are added to the iDRS packages:

  • .NET API assembly

    • Windows, macOS: bin/idrsnet16.dll
    • Linux: lib/idrsnet16.dll
  • Documentation

    • .NET assembly documentation (IntelliSense)

      • Windows, macOS: bin/idrsnet16.xml
      • Linux: lib/idrsnet16.xml
    • API reference: documentation/iDRS16_NET.html

To help you transition to the new .NET API on Windows x86 and x64 platforms, this release also provides the same API targeting .NET Framework 4.8.

The corresponding elements in the package are:

  • .NET Framework API assembly: bin/idrsnetframework16.dll
  • .NET Framework assembly documentation: bin/idrsnetframework16.xml

You can now digitally sign a PDF with the iDRS macOS. You can only use digital certificates installed in the login keychain.

To sign a PDF, you set a CDigitalSignature object with the serial number of the certificate and the issuer’s data into your CPdfOutputParams object.

This release continues the transformation of the Document Output API that began with the iDRS 16.0.7.

This transformation aims to simplify the document output parameters by grouping the various settings into more user-oriented choices; this then makes it easier for you to select the output configuration you want for your project or product.

Below is a high-level summary of the changes made:

  • All parameters classes are renamed from CXxxOutputParameters to CXxxOutputParams for more legibility.
    Also, they all directly inherit from base class COutputParams, avoiding previously complex (and sometimes counter-intuitive) class hierarchy.
  • The various settings which were controlling how to generate the output have been grouped in distinct enums, with values corresponding to most relevant use cases.
    For example, the DOCX PageLayout.Editable corresponds to previous configuration LayoutType RECREATE_SRC_DOC + ColumnMode IGNORE + MergeLinesIntoParagraphs true + IncludeGraphics true.
  • Less common parameters controlling operations that can easily be performed directly on the CPage or CPageContent2 have been removed: for example, OutputImageType or OutputImageResolution.
  • Options present across several output format have been gathered into dedicated subclasses.
    For example, former CDocumentOutputParameters.Metadata accessors now belong to new class CMetadataInfo.

Refer to chapter Summary of changes for more details on the modifications.

When saving a CImage or CPage object to PNG format, you can now choose to favor the size of the output file or to save time.

PNG format is often used to save temporary images during processing, as opposed to JPG or BMP:

  • Generating JPG files is fast and gives small output files. However, it is lossy compression, which can be problematic for an intermediate file format, as there will be a slight loss of quality with each compression.
  • Generating BMP files is very fast and lossless. However, the generated file is very large (no compression is applied by the iDRS).

PNG is a good alternative, as it creates lossless files of acceptable quality and size. Its main disadvantage, however, is the compression time, which by default is significantly higher than that of JPG or BMP.

It is this compression time that this new setting helps to mitigate, allowing you to prioritize speed savings over file size when PNG is used to generate an intermediate file.

This new setting is available via:

  • method CImageOptionsPng::SetCompressionLevel() (C++) or
  • property CImageOptionsPng.CompressionLevel (.NET).

The iDRS™ for Windows platform is compiled with Visual Studio 2022. Therefore, it requires Visual Studio 2022 redistributables to be installed on the target computer.

The new .NET APIs introduced with this release completely replace the previous ones which will therefore no longer be maintained.

There are two main reasons for this decision:

  1. The previous .NET wrapper was written in C++/CLI, which removed the possibility of offering it to you on platforms other than Windows. In order to remove this limitation, we had to recreate a new .NET wrapper from scratch.
  2. To recreate the new .NET wrapper, instead of writing the wrapper code, we decided to generate it automatically by inspecting the C++ API. The advantage of this approach is that the cost of maintenance and the risk of problems in the wrapper itself are greatly reduced, allowing us to focus more on developing and improving the functionality of the iDRS.

Due to the change in technology used to create the .NET wrappers, their compatibilities also had to be updated.
Below is a summary of the compatibility and availability changes for both APIs:

  • .NET Framework:

    • Prior to iDRS 16.0.9: idrsnet16.dll was compatible with .NET Framework 4.0
    • Since iDRS 16.0.9: idrsnetframework16.dll is compatible with .NET Framework 4.8
    • Both are available only on Windows (x86 and x64 architectures).
  • .NET:

    • Prior to iDRS 16.0.9: idrsnet516.dll was compatible with .NET 5, and was available on Windows (all architectures).
    • Starting with iDRS 16.0.9: idrsnet16.dll is compatible with .NET 6, and is available on Windows and macOS (all architectures), as well as Linux (x86_64, and ARM64 architectures).

Due to the transformation of the Document Output API and the usage of the enum class type, the iDRS C++ API is no longer compatible with the C++98 standard; C++11 is now required to use the iDRS.

As of this release, the iDRS for macOS is compatible with macOS 10.13 High Sierra or later (instead of macOS 10.10 Yosemite previously).

The class CPageLayer has been removed in this release, and CPage accessor GetPageLayer() replaced by GetRecognitionZoneArray() returning a CRecognitionZoneArray object.
The new behavior will be more consistent with standard get/set operations: the returned object points directly to the one stored internally, rather than being a complete clone.

As a result, any changes made to this CRecognitionZoneArray have an impact on the CPage as well.

Memory monitoring feature on Windows platform

Section titled “Memory monitoring feature on Windows platform”

The memory monitoring feature had to be disabled on the Windows platform due to some inconsistencies between the system libraries and the C++ standard.

N/A

IDDescription
IDRSRD-6130The iDRS throws an exception when creating a DOCX from an Arabic image with table
IDRSRD-6109Saving to RTF generates a memory leak when including the image as page background
IDRSRD-6069The macOS iDRS framework has a bad linker self-path
IDRSRD-6051The API reference documentation of iDRS for Linux is not scrollable
IDRSRD-5855The iDRS should propose a .NET 5 API on Windows, Macos and Linux platforms
IDRSRD-6143The iDRS for macOS should be code signed
IDRSRD-6114The iDRS should expose a way to favor speed over compression size when saving an image as PNG
IDRSDEV-1357Integrators should be able to get the buffer size to use for CMetadataInfo::GetMetadata
IDRSDEV-1284Replace CPageLayer class with TObjPtrArray <CRecognitionZone>
IDDescription
IDRSDEV-1363The macOS .NET samples should work on both x86_64 and ARM64 architectures
IDRSRD-6158”Related pages” of iDRS .NET API documentation are always the Windows ones
IDRSDEV-1332The iDRS .NET API should be available on Linux ARM32
IDRSDEV-1342The iDRS C API should be available on Linux ARM32
IDRSRD-6171iDRS property CPerspective.Corners throws an exception when read from .NET framework API