GiniVisionDocumentBuilder
public class GiniVisionDocumentBuilder : NSObject
The GiniVisionDocumentBuilder
provides a way to build a GiniVisionDocument
from a Data
object and
a DocumentSource
. Additionally the DocumentImportMethod
can bet set after builder iniatilization.
This is an example of how a GiniVisionDocument
should be built when it has been imported
with the Open with feature.
let documentBuilder = GiniVisionDocumentBuilder(data: data, documentSource: .appName(name: sourceApplication))
documentBuilder.importMethod = .openWith
let document = documentBuilder.build()
do {
try document?.validate()
...
} catch {
...
}
-
Undocumented
Declaration
Swift
public var deviceOrientation: UIInterfaceOrientation?
-
Undocumented
Declaration
Swift
public var importMethod: DocumentImportMethod
-
Initializes a
GiniVisionDocumentBuilder
with the document source. This method is only accesible in Swift projects.Declaration
Swift
public init(documentSource: DocumentSource)
Parameters
documentSource
document source (external, camera or appName)
-
Builds a
GiniVisionDocument
Declaration
Swift
public func build(with data: Data) -> GiniVisionDocument?
Return Value
A
GiniVisionDocument
ifdata
has a valid type ornil
if it hasn’t. -
Builds a
GiniVisionDocument
from an incoming file url. The completion handler delivers the document ornil
if it couldn’t be read.Declaration
Swift
public func build(with openURL: URL, completion: @escaping (GiniVisionDocument?) -> Void)