The OSS Document Scanner is an Open Source app to scan all your documents. You either scan using your camera or by importing an image. The app will automatically detect you document within the photo and will crop the image.
Once the document is created you can detect text within the document using OCR.
You can also share your document as a PDF. If you want you can synchronize the app data with a webdav server (like nextloud) to never loose anything!