Hi,
I am facing an issue while clicking a photo of an ID card and then creating a PDF document. In PDF, the image appears distorted or stretched in the final PDF. I am using jsPDF library for making the PDF document.
Is there any third-party API or library that can help with:
- Automatically detecting and extracting only the ID card portion from the photo (like cropping the card from the background),
- Ensuring the image is scaled proportionally and inserted into the PDF without distortion?
I’m using Yii2 in the backend and open to using external services or JavaScript libraries for better image handling before generating the PDF.
Any suggestions or best practices would be greatly appreciated.
Thanks