Vanilla.PDF  1.5.1
Cross-platform toolkit for creating and modifying PDF documents
Licensing

Table of Contents

This section describes how is the product licensed as well as how to get the license.

License types

There are few basic types of product license, depending whether the product is being evaluated or running in product environment. For more information about the licenses, please visit Licenses.

Free license

Free license allows a very limited functionality, such as extracting text and images or modifying document conents. It is especially useful to verify, that a PDF file is supported by this toolkit. Modifying documents with free license produces a watermark image on each page to distinguish documents produced with free license.

Temporary license

Temporary license is available and free of charge, to verify extended functionality offered by Vanilla.PDF. This license is time limited and only works for 30 days.

Personal license

Personal license unlocks all available features within the product.

This license type is exclusively for internal business operations. This license type does not allow distribution of Derived Works to third parties, public facing web sites/applications, extranets, multi-site intranets or SaaS project usage scenarios.

Commercial license

Personal license unlocks all available features within the product.

This license type allows distribution of Derived Works to third parties, public facing web sites/applications, extranets, multi-site intranets, app stores or SaaS project usage scenarios.

Features

This is a list of most common features that are easily usable and documented within our examples.

Free features:

Premium features:

Using the license

A license file is required to access library premium features.

Request

Requesting the license file is done via our order form. After processing your request, you'll receive an email with the invoice. Upon completing the transaction, you'll receive another email, containing your very own license file.

Note
Please, keep in mind, that every license file is issued to either a person or a company. It contains confidential information and should be kept protected against fraud. Whenever in doubt, that the license file is no longer secure, let us know, so we can issue a new one, without any harm.

Bundle

To access premium features, library requires a license file, when the application is run. We recommend to embed the license file into your application and protect it with encryption algorithm.

Note
Code sample on how to protect the license file is available upon request.

Before the accessing premium features be sure to initialize the library with the license key.

error_type process_license_info(string_type license_file) {
BufferHandle* license_buffer = NULL;
InputStreamHandle* input_stream = NULL;
RETURN_ERROR_IF_NOT_SUCCESS(LicenseInfo_IsValid(&is_valid));
if (is_valid != VANILLAPDF_RV_FALSE) {
print_text("License is enabled by default\n");
return VANILLAPDF_TEST_ERROR_FAILURE;
}
RETURN_ERROR_IF_NOT_SUCCESS(InputStream_CreateFromFile(license_file, &input_stream));
RETURN_ERROR_IF_NOT_SUCCESS(InputStream_ToBuffer(input_stream, &license_buffer));
RETURN_ERROR_IF_NOT_SUCCESS(LicenseInfo_SetLicenseBuffer(license_buffer));
RETURN_ERROR_IF_NOT_SUCCESS(LicenseInfo_IsValid(&is_valid));
if (is_valid != VANILLAPDF_RV_TRUE) {
print_text("Could not enable license\n");
return VANILLAPDF_TEST_ERROR_FAILURE;
}
RETURN_ERROR_IF_NOT_SUCCESS(InputStream_Release(input_stream));
RETURN_ERROR_IF_NOT_SUCCESS(Buffer_Release(license_buffer));
return VANILLAPDF_TEST_ERROR_SUCCESS;
}

For more details visit LicenseInfo.

Verify

After the license file has been entered, the premium features should now be accessible. To verify the license file is working properly, please use any of our Examples for premium features.

License validity

License itself has unlimited validity for current version of the library. Updating library to a newer version is restricted by the expiration field in the license file.

"expiration": "2022-10-01 18:50:36Z"

As long as the library build date is earlier then expiration date, the library accepts license file. Determining the library build date can be done using file properties on windows.

file_properties.png
Picture 1: File properties of shared library file on windows OS

The file properties might be very slightly different to the exact values returned via LibraryInfo.

error_type process_library_info() {
// Misc
string_type library_author = NULL;
// Version info
integer_type library_version_major = 0;
integer_type library_version_minor = 0;
integer_type library_version_patch = 0;
integer_type library_version_build = 0;
// Build time information
integer_type library_build_day = 0;
integer_type library_build_month = 0;
integer_type library_build_year = 0;
RETURN_ERROR_IF_NOT_SUCCESS(LibraryInfo_GetVersionMajor(&library_version_major));
RETURN_ERROR_IF_NOT_SUCCESS(LibraryInfo_GetVersionMinor(&library_version_minor));
RETURN_ERROR_IF_NOT_SUCCESS(LibraryInfo_GetVersionPatch(&library_version_patch));
RETURN_ERROR_IF_NOT_SUCCESS(LibraryInfo_GetVersionBuild(&library_version_build));
RETURN_ERROR_IF_NOT_SUCCESS(LibraryInfo_GetAuthor(&library_author));
RETURN_ERROR_IF_NOT_SUCCESS(LibraryInfo_GetBuildDay(&library_build_day));
RETURN_ERROR_IF_NOT_SUCCESS(LibraryInfo_GetBuildMonth(&library_build_month));
RETURN_ERROR_IF_NOT_SUCCESS(LibraryInfo_GetBuildYear(&library_build_year));
print_text("Library vanillapdf %d.%d.%d.%d by %s\n",
library_version_major,
library_version_minor,
library_version_patch,
library_version_build,
library_author
);
print_text("Built on %d.%d.%d\n",
library_build_day,
library_build_month,
library_build_year
);
return VANILLAPDF_TEST_ERROR_SUCCESS;
}