How to Scan and Extract data from IDs and Passports - react-native

I want scan and extract data from IDs and Passports, Which free plugins I use? Or how do I do it, To read the data and add this data to form.

You can check this question on how to read text from images.
Having said text, since each field always has a fixed text before identifying what it is, if you know the id formats you want to support, you can implement that fairly easily (The text between "Name:" and "Surname:" is the person's name, and so on).
To get the images, you should use something like react-native-camera, or, if you are using Expo, its Camera API.

There are few OCR SDKs that enable you to do that. Check out https://github.com/Anyline/anyline-ocr-react-native-module or
https://github.com/jonathanpalma/react-native-tesseract-ocr#readme which supports only Android for now.

You divide the job into multiple steps
Take a photo
Load the image
Image analyze find an OCR npm package
Pass the text into your fields via props (or use the Context API)

Related

How can can i insert a user with profile picture using Blazor-server

I want the user to upload his picture when he registers his information.
The thing is when the user uploads his image.. should automatically create a folder with his ID to be like this wwwroot/images/UserID/fadi.jpg
Basically: you really shouldn't. The wwwroot is for static assets used by the application. You're using server-side, so in theory it might be possible but that's not what the folder is meant for. An alternative method like AWS would be preferred, but if you can't do that (either because of payment requirements or other complications) I would suggest saving the image to your database. One way to do this would be to base64 encode the image and save it that way. I'm not going to give an example of that here, there are plenty available elsewhere. One such example is this.

Sensenet: Validate "compulsory" fields when the file is uploaded to a document library

I have a document library that has some fields as compulsory but when I upload them sensenet does not required the fill of that fields.
This is working only on the edit function
The problem with this feature is that on the built-in UI you cannot actually fill any fields when you upload a document. So if you had any compulsory fields (and we validated them) you would not be able to upload documents at all, the system would deny that.
Currently I do not know an out-of-the-box solution for this, you would have to create a custom upload UI (of course using the built-in simple upload functionality) that makes sure the user fills the compulsory fields before uploading the doc.
If you think this is something we should look into, please create an issue on github.

Implementing JSon-LD Schema in Ektron, is it possible?

This is my first time using Ektron and i'm trying to implement Json-LD schema scripts for each page. I have 68 scripts that I need to implement that are unique for each page.
I thought I would be able to implement these scripts through meta data, but now i'm unsure. Each script is over 1000 characters, the html and meta tag types only allow 500 characters, so i'm assuming i'm in the wrong place. If anyone could shed some light it would be much appreciated.
Ektron's metadata isn't intended for large chunks of data / content. So, yes, you will find limits there.
Here are two things you might try as workarounds.
Most direct:
Use the Ektron Library. Go to the Library tab and click on the Root node and view Properties. Add an extension to allow you to upload your JSON-LD as a file. Use metadata on the content item to reference the uploaded file. Combine the two upon output.
If you want the JSON-LD to be editable within the CMS...
Gaming the platform a bit
Create a new SmartForm definition and include in it a single plain-text, multi-line field (not Rich text). This should hold your JSON-LD. Set up a folder and, if your version supports it (you didn't specify CMS version, so I will assume relatively recent), set the folder to be non-searchable so these things don't come up in site search results. Add a restriction to the folder to only allow the Smart Form definition you just created. Create your JSON-LD there using the plain-text field. You should be able to store up to 1MB.
Same as above, add your JSON-LD as text then use a reference to this item from the content you want to use it.
The metadata in this case (and possibly the library one, though I'd have to test and I don't have an Ektron environment for development anymore) will give you the Content ID for the object holding your JSON-LD. You'll have to make another API call but will give you the solution you appear to want from above.

Displaying documents SP2013 SharePoint Hosted App Model

So what are the cool kids using for displaying documents inside a SharePoint Hosted App Model? Right now, I'm doing rest calls and attempting to display the data using jquery datatables plugin. It works but isn't exactly usable, not to mention that I have to make additional async calls to get Author names, etc.
Should I dump REST and use CSOM and format the data accordingly? Build the hyperlink to the item, format date, build Author name.
Seems like I'm re-inventing the wheel here and want to make sure that I'm not overlooking something obvious.
Thanks
Out of interest, what about DataTables is not usable? If the data is in the JSON return, it can obtain the data directly. Sorry, I know this doesn't help you, but I'm trying to make DataTables better, so I'm interested to know what use cases it is failing to deliver on at the moment!

using appengine blobs for binary data in an obj-c app

I'm writing an obj-c app and would like to upload a binary file a few megs in size to my appengine server (python). I'm guessing I need to use the blob entity for this, but am unsure how to go about doing this. I've been using http requests and responses to send and receive data up to now, but they've been encoded in strings. Can someone advise how I'd go about doing the same with blobs from an obj-c app? I see some examples that involve http requests but they seem geared toward web page and I'm not terribly familiar with it. Are there any decent tutorials or walkthroughs perhaps?
I'm basically not completely sure, if I'm supposed to encode it into the http request and send it back through the response, how to get the binary data into the http string from the client and how to send it back properly from the server when downloading my binary data. I'm thinking perhaps the approach has to be totally different from what I'm used to with encoding values into my request in the param1=val&param2=val2 style format but uncertain.
Should I be using the blobstore service for this? One important note is that I've heard there is a 1 meg limit on blobs, but I have audio files 2-3 megs in size that I need to store (at the very least 1.8 megs).
I recently had to do something similar, though it was binary data over a socket connection. To the client using XML, to the server as a data stream. I ended up base64 encoding the binary data when sending it back and forth. It's a bit wordy but especially on the client side it made things easier to deal with, no special characters to worry about in my XML. I then translated it with NSData into a real binary format. I used this code to do the encoding and decoding, search for "cyrus" to find the snippet I used, there are a few that would work here.
In your case I would change your http request to a post data call rather than putting it all in the URL. If you're not sure what the difference is, have a look here.
I'm not as familiar with python, but you could try here for help on that end.
Hope that helps.
Edit - it looks like blobs are the way to go. Have a look at this link for the string/blob type as well as this link for more info on working with the blob.
There are three questions in one here:
Should you use a BLOB for binary data?
How do you post binary data, and use it from app engine
How do you retrieve binary data from app engine
I can't answer if you "should" use blobs, only you would know the answer to that, and it greatly depends upon the type of data you are trying to store, and how it will be used. Let's take an image for example (which is probably the most popular use case for this). You want users to take a photo with their phone, upload it, and then share it with other users. That's a good use of blobs, but as #slycrel suggests you'll run into limitations on record size. This can be workable, for example you could use the python image library (pil) to downsize the image.
To post binary data, see this question. It would be best to cache 2 copies, a thumbnail and a full size. This way the resizing only has to happen once, on upload. If you want to go one better, you can use the new background jobs feature of app engine to queue up the image processing for later. Either way, you'll want to return the ID of the newly created blob so you can reference it from the device without an additional http request.
To retrieve data, I think the best approach would be to treat the BLOB as it's own resource. Adjust your routes such that any given blob has a unique URL:
http://myweb/images/(thumbnail|fullsize)/<blobid>.(jpg|png|gif)
Where BLOBID is dynamic, and JPG, PNG or GIF could be used to get the particular type of image. Thumbnail or fullsize could be used to retrieve the smaller or larger version you saved when they posted it.