You are viewing limited content. For full access, please sign in.

Question

Question

SDK Client Automation Scanning

SDK
asked on February 12, 2021

Hi there

I'm trying to figure out a solution in which I'm using the SDK to Launch the LF Scanning Module with a Template and set of fields for the document they will be scanning. 

 

The problem is that the customer wants to SPLIT the document that they are scanning and select the Document Type for those split documents. The Document Type is an additional field in the template as well. 

 

So in other words, they want to be able to click on a button which launches the Scanning Module, Selects the Template, Auto Populates 3 out of the 4 fields (all of this is working currently) but THEN they want to split a document that they just scanned and select a Document Type for each. 

What happens at this point if they save, it merges all the documents into just 1 file. This is I'm assuming because we are creating a document and just appending pages per the code, but how could I go about allowing for a splitting of a documents while keeping the same metadata?

            using (DocumentInfo docinfo = new DocumentInfo(mySess))
            {
                docinfo.Create("\\ScanTest\\imported_doc", "DEFAULT", EntryNameOption.AutoRename);
                docinfo.SetTemplate("Scanning Test");
                // Create a collection of fields
                FieldValueCollection fields = new FieldValueCollection();
                // Adds fields to the collection
                fields.Add("Last Name", "Doe");
                fields.Add("First Name", "John");
                fields.Add("Citation #", "1234");

                // Actually assign those fields to the document.
                docinfo.SetFieldValues(fields);

                //  Get document id that will be used to launch scanning module with
                int eid = docinfo.Id;
                // Save document to the repo
                docinfo.Save();
                // Unlock document for use
                docinfo.Unlock();

                // Create scan options and launch laserfiche scanning module
                scoptions.ServerName = "x.x.x.x";
                scoptions.RepositoryName = "Repo";
                scoptions.UserName = "xx";
                scoptions.Password = "xx";
                scoptions.IsDocument = true;
                scoptions.EntryId = eid;
                scoptions.CloseAfterStoring = true;
                lfclient.LaunchScanning(scoptions);

                mySess.Close();
                this.Focus();
                return;
}

 

0 0

Answer

SELECTED ANSWER
replied on February 12, 2021

You can't split documents when you're scanning into one. You'd have to save it to Laserfiche and then use the document viewer to split images out.

2 0

Replies

replied on February 15, 2021

Hi
If the quantities of the pages are constant or if you have character strings that allow you to identify them, you could create a WF to divide them.
Greetings

1 0
replied on February 24, 2021

Unfortunately it varies in size but thanks for the response, I did end up going a completely different route. 


Thanks!

0 0
You are not allowed to follow up in this post.

Sign in to reply to this post.