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

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:

  • Document merge and split (merge.c)
  • PDF filter compression/decompression (filter.c)
  • Extracting strings and images (extract.c)

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;
}
Represents memory stored data.
error_type CALLING_CONVENTION Buffer_Release(BufferHandle *handle)
Decrement the internal reference counter.
Input stream can read and interpret input from sequences of characters.
error_type CALLING_CONVENTION InputStream_ToBuffer(InputStreamHandle *handle, BufferHandle **result)
Reads all data from the input stream and returns them as a single large buffer.
error_type CALLING_CONVENTION InputStream_Release(InputStreamHandle *handle)
Decrement the internal reference counter.
error_type CALLING_CONVENTION InputStream_CreateFromFile(string_type filename, InputStreamHandle **result)
Opens an existing file at filename for read.
error_type CALLING_CONVENTION LicenseInfo_SetLicenseBuffer(BufferHandle *data)
Set content of the license file in case it is used as embedded resource.
error_type CALLING_CONVENTION LicenseInfo_IsValid(boolean_type *result)
Determine whether a valid license has been presented.
const boolean_type VANILLAPDF_RV_TRUE
Represents the boolean true value.
const boolean_type VANILLAPDF_RV_FALSE
Represents the boolean false value.
uint32_t error_type
This is return value type of all API functions.
Definition: c_types.h:25
int8_t boolean_type
Boolean type supported in C.
Definition: c_types.h:31
const char * string_type
C-Style string.
Definition: c_types.h:82

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.

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;
}
error_type CALLING_CONVENTION LibraryInfo_GetVersionPatch(integer_type *result)
Get library patch version.
error_type CALLING_CONVENTION LibraryInfo_GetVersionMinor(integer_type *result)
Get library minor version.
error_type CALLING_CONVENTION LibraryInfo_GetBuildDay(integer_type *result)
Get day of month, when the library was built.
error_type CALLING_CONVENTION LibraryInfo_GetBuildMonth(integer_type *result)
Get month of the year, when the library was built.
error_type CALLING_CONVENTION LibraryInfo_GetVersionBuild(integer_type *result)
Get library build version.
error_type CALLING_CONVENTION LibraryInfo_GetVersionMajor(integer_type *result)
Get library major version.
error_type CALLING_CONVENTION LibraryInfo_GetBuildYear(integer_type *result)
Get year, when the library was built.
error_type CALLING_CONVENTION LibraryInfo_GetAuthor(string_type *result)
Get library author name.
int32_t integer_type
32-bit signed integer
Definition: c_types.h:51