Skip to content

Latest commit

 

History

History
19 lines (14 loc) · 615 Bytes

migration.md

File metadata and controls

19 lines (14 loc) · 615 Bytes

Migration Guide

Upgrading from v2.x to v3.x

From the v3 we are deprecating boolean convertOptions.

In v2.x, you could get a response in base64 format by providing true as the 2nd parameter to the convert function:

const convert = fromPath(filePath, options);
const base64Response = convert(page, true);

In v3.x, you need to change it to { responseType: 'base64' }, like so:

const convert = fromPath(filePath, options);
const base64Response = convert(page, { responseType: 'base64' })

The same migration applies for convert fromBuffer and fromBase64 functions.