Check out example codes for "itext in "kotlin" canvas". It will help you in understanding the concepts better.

Code Example 1

implementation 'com.itextpdf:itext7-core:7.1.11'

Learn ReactJs, React Native from akashmittal.com