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

Question

Question

SystemColumn.TotalDocSize Equivalent in RepositoryAccess.DocumentInfo

SDK
asked on June 26, 2020

Is there a way for the RepositoryAccess.DocumentInfo object to retrieve the value returned by SearchResultsListing.GetDatumAsString(i, SystemColumn.TotalDocSize)?

This would be similar to how RepositoryAccess.DocumentInfo.ElecDocumentSize returns the same value as SearchResultsListing.GetDatumAsString(i, SystemColumn.ElecFileSize).

0 0

Replies

replied on June 26, 2020 Show version history

So the key difference between the two in concept is that an electronic document is a single object meaning storing/retrieving its size is simply a matter of looking at that one file.

Total Document Size on the other hand is a calculated value derived from the combined size of all page images, text, etc. (this is why adding that column has a performance hit in the folder browser).

As far as I know, there's no pre-built method in the SDK for calculating that value outside of the search result listing or search statistics.

What I've always done is loop through the pages and increment variables for "total size" like so:

// Read values of each page
PageInfoReader pageReader = doc.GetPageInfos();
foreach (PageInfo page in pageReader){
    // Track cumulative page and text sizes
    imageSize += page.ImageDataSize;
    textSize += page.TextDataSize;
}

Total Document Size should then be Total Image Size + Total Text Size + ElecDocumentSize

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

Sign in to reply to this post.