Skip to main content

SDK REST API: Customizing application setting

You can use the following environment variables to tune your SDK REST API service instance:

Required environment variables:

PDF2DATA_SDK_REST_API_AUTH_TOKEN - API token for security, min 16 characters

Optional environment variables:

PDF2DATA_SDK_REST_API_JVM_MEMORY_LIMIT_MB - max jvm memory amount.

PDF2DATA_SDK_REST_API_MAX_FILE_SIZE - maximum pdf file size that can be uploaded.

PDF2DATA_SDK_REST_API_REQUEST_SIZE - pdf file size threshold after which file will be written onto disk rather than processed in memory only.

PDF2DATA_SDK_REST_API_RECOGNITION_JOB_CORE_POOL_SIZE – the number of threads to keep in the pool, even if they are idle. PDF2DATA_SDK_REST_API_RECOGNITION_JOB_MAX_POOL_SIZE – the maximum number of threads to allow in the pool. PDF2DATA_SDK_REST_API_RECOGNITION_JOB_KEEP_ALIVE_TIME – when the number of threads is greater than the core, this is the maximum time that excess idle threads will wait for new tasks before terminating.

PDF2DATA_SDK_REST_API_RECOGNITION_JOB_CACHE_TIME_TO_LIVE - time to live for recognition job data.

PDF2DATA_SDK_REST_API_OCR_ENABLED – Boolean flag which is responsible for enabling Optical Character Recognition functionality. An OCR feature helps to extract and repurpose data from scanned documents, camera images and image-only pdfs.