Required Queries
- fileType: “png” or “jpeg”
- textType: “plainText” or “lz-string”
- If necessary, you can use lz encoding (ex.
lz-string
npm library) to encode text to make it shorter.
- text: string or lz-encoded string
Optional Parameters
Note: numerical values must be numbers and not letters. For example, type “30”, not “thirty”.
- width: number in pixels
- height: number in pixels
- padding: number in pixels
- fontFamily: css font-family element
- Most standard system fonts should work. Others may not render correctly. I plan on adding support for more fonts in the future.
- Japanese text using the Hina Micho font is supported by default.
- fontSize: number in pixels
- backgroundColor: css color property
- textColor: css color property
- pages: number
- specifies max number of pages. If
pages
is specified, the converter will convert as many pages it needs but will not return more than the number specified.
- the API will calculate the necessary number of images by default.
- This does not make the app squeeze the text to fit it in a certain number of pages. If 2 pages are specified, it will produce the first two pages and then not send any more.
Default Option Values
- width: ‘800’,
- height: ‘800’,
- padding: ‘0’,
- fontFamily: ‘Times New Roman, Hina Mincho’,
- fontSize: ‘16’,
- backgroundColor: ‘#ffffff’,
- textColor: ‘#000000’,