I am using **react-native-image-to-pdf** library to convert images to pdf in my react native app. from <https://www.npmjs.com/package/react-native-image-to-pdf>

```
var photoPath = ['https://images.pexels.com/photos/20787/pexels-photo.jpg?auto=compress&cs=tinysrgb&h=350','https://images.pexels.com/photos/20787/pexels-photo.jpg?auto=compress&cs=tinysrgb&h=350'];

  const myAsyncPDFFunction = async () => {
    try {
        const options = {
            imagePaths: photoPath,
            name: 'PDFName',
        };
        const pdf = await RNImageToPdf.createPDFbyImages(options);

        console.log(pdf.filePath);
    } catch(e) {
        console.log(e);
    }
}

```

but this is giving error **Error: Attempt to invoke virtual method 'int android.graphics.Bitmap.getWidth()' on a null object reference**

I have also tried giving path as  `['./assets/a.png', './assets/b.png']`

but still getting same error