AugustoPinheiro / RN-react-native-document-scanner

Document scanner with border detection, perspective correction and custom crop/resize
55 stars 18 forks source link

Does this support file saving after scaning? #4

Closed NayanVaid closed 3 years ago

NayanVaid commented 3 years ago

Does this support file saving after scanning or we have to use other library?

AugustoPinheiro commented 3 years ago

What do you want to do, can you explain better?

NayanVaid commented 3 years ago

I want to save the pdf file after it is scanned. Thank you for your response :D

AugustoPinheiro commented 3 years ago

I want to save the pdf file after it is scanned. Thank you for your response :D

You need to get image URI After

https://github.com/Anyline/react-native-image-to-pdf

use this component for convert image to pdf...

AugustoPinheiro commented 3 years ago

it's a pleasure to help :)

NayanVaid commented 3 years ago

Does this works with expo? How can I get the scanned image uri? Thank you :D

AugustoPinheiro commented 3 years ago

You can find the response with 64Base URI

Properties

Prop Platform Default Type Description
overlayColor Both none string Color of the detected rectangle : rgba recommended
detectionCountBeforeCapture Both 5 integer Number of correct rectangle to detect before capture
detectionRefreshRateInMS iOS 50 integer Time between two rectangle detection attempt
enableTorch Both false bool Allows to active or deactivate flash during document detection
useFrontCam iOS false bool Allows you to switch between front and back camera
brightness iOS 0 float Increase or decrease camera brightness. Normal as default.
saturation iOS 1 float Increase or decrease camera saturation. Set 0 for black & white
contrast iOS 1 float Increase or decrease camera contrast. Normal as default
quality iOS 0.8 float Image compression. Reduces both image size and quality
useBase64 iOS false bool If base64 representation should be passed instead of image uri's
saveInAppDocument iOS false bool If should save in app document in case of not using base 64
captureMultiple iOS false bool Keeps the scanner on after a successful capture
onPermissionsDenied android null func Function to call when the Android permissions are denied


NayanVaid commented 3 years ago

Thank you soo much :D Just one last question. Does this works wih expo?

AugustoPinheiro commented 3 years ago

saveInAppDocument


demo:

image

With this new feature, we can now save images into app document, and then see them directly into the apple file explore

You can find the response with 64Base URI

Properties

Prop Platform Default Type Description overlayColor Both none string Color of the detected rectangle : rgba recommended detectionCountBeforeCapture Both 5 integer Number of correct rectangle to detect before capture detectionRefreshRateInMS iOS 50 integer Time between two rectangle detection attempt enableTorch Both false bool Allows to active or deactivate flash during document detection useFrontCam iOS false bool Allows you to switch between front and back camera brightness iOS 0 float Increase or decrease camera brightness. Normal as default. saturation iOS 1 float Increase or decrease camera saturation. Set 0 for black & white contrast iOS 1 float Increase or decrease camera contrast. Normal as default quality iOS 0.8 float Image compression. Reduces both image size and quality useBase64 iOS false bool If base64 representation should be passed instead of image uri's saveInAppDocument iOS false bool If should save in app document in case of not using base 64 captureMultiple iOS false bool Keeps the scanner on after a successful capture onPermissionsDenied android null func Function to call when the Android permissions are denied

AugustoPinheiro commented 3 years ago

Thank you soo much :D Just one last question. Does this works wih expo?

dont works in yet, but I have plans to support Expo

NayanVaid commented 3 years ago

Thank you soo much :D Eagerly waiting for expo support! Keep up the good work!