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

Question

Question

LFSO SDK - Check the OCR'd Pages column for it value

SDK
asked on June 25, 2014

Hello,

 

I am using Laserfiche Server Objects, not repository access in an application.  I need to know if there is a way to check a document and see if it's page have had OCR run on them (if its a tiff) and if it's had generate text run on them (if its a Electronic File).  

 

Basically there is a column in the client called "OCR'd Pages" and I want to check if that value is All, None, or Some.  I want to do this WITHOUT using laser fiche search.  I have looked through the SDK documentation and just played around in visual studio and I cannot see anything in the LFDocument or LFEntry objects that exposes this property.

 

Help!

 

0 0

Answer

SELECTED ANSWER
replied on June 26, 2014

Since you're only interested in 1 specific column, you can do something like:

LFSingleListingParams slp = new LFSingleListingParams();
slp.AddStandardColumn(Column_Type.COLUMN_TYPE_OCREDPAGES);

LFSingleEntryListing sel = (LFSingleEntryListing)db.GetSingleEntryListingByID(item.ID, slp);

string AllNoneSome = sel.get_DatumByColTypeAsString(1, Column_Type.COLUMN_TYPE_OCREDPAGES);

 

1 0

Replies

replied on June 25, 2014

If you don't want to run a search, you can still get that column value on a single document by using LFSingleEntryListing. It works similarly to the search listing object. LFDatabase exposes several methods that allow you to get a LFSingleEntryListing object either by document ID, name, or path.

1 0
replied on June 26, 2014

As far as I know I am supposed to be calling get_Datum to retrieve this column but I keep getting an error that says parameter incorrect.  

 

LFSingleListingParams slp = new LFSingleListingParams();
LFSingleEntryListing sel = new LFSingleEntryListing();
sel = (LFSingleEntryListing)db.GetSingleEntryListingByID(item.ID, slp);

 

int OCRPageCount = sel.get_Datum(1, 3); // error on this line

 

I have tried putting both 28 which the number listed as the OCR page count column in RA documentation, there is no lfso documentation for the lfsingleentrylisting as far as I can find.  I have also tried a parameter of 3 which is the column number in the client (which could change and doesn't really make sense to try but I did anyway).

 

Visual studio is telling me that the get_Datum takes two arguments, a (int row, int column) however it doesn't seem to be accepting the second paramter.  Any thoughts?

0 0
SELECTED ANSWER
replied on June 26, 2014

Since you're only interested in 1 specific column, you can do something like:

LFSingleListingParams slp = new LFSingleListingParams();
slp.AddStandardColumn(Column_Type.COLUMN_TYPE_OCREDPAGES);

LFSingleEntryListing sel = (LFSingleEntryListing)db.GetSingleEntryListingByID(item.ID, slp);

string AllNoneSome = sel.get_DatumByColTypeAsString(1, Column_Type.COLUMN_TYPE_OCREDPAGES);

 

1 0
replied on June 27, 2014

Thanks, that worked perfect!

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

Sign in to reply to this post.