C# Class OfficeConvert.Converter

Show file Open project: teambition/OfficeConverter Class Usage Examples

Public Methods

Method Description
Convert ( String inputFile, String outputFile ) : void

Protected Methods

Method Description
IsPasswordProtected ( Stream stream ) : bool

Detects if a given office document is protected by a password or not. Supported formats: Word, Excel and PowerPoint (both legacy and OpenXml).

IsPasswordProtected ( string fileName ) : bool

Detects if a given office document is protected by a password or not. Supported formats: Word, Excel and PowerPoint (both legacy and OpenXml). Source: http://stackoverflow.com/a/26522122

ReadFromStream ( Stream stream, byte buffer ) : void
ScanForPassword ( Stream stream, byte buffer, int sectionSize ) : bool
releaseCOMObject ( object obj ) : void

Method Details

Convert() public abstract method

public abstract Convert ( String inputFile, String outputFile ) : void
inputFile String
outputFile String
return void

IsPasswordProtected() protected method

Detects if a given office document is protected by a password or not. Supported formats: Word, Excel and PowerPoint (both legacy and OpenXml).
protected IsPasswordProtected ( Stream stream ) : bool
stream Stream Office document stream.
return bool

IsPasswordProtected() protected method

Detects if a given office document is protected by a password or not. Supported formats: Word, Excel and PowerPoint (both legacy and OpenXml). Source: http://stackoverflow.com/a/26522122
protected IsPasswordProtected ( string fileName ) : bool
fileName string Path to an office document.
return bool

ReadFromStream() protected method

protected ReadFromStream ( Stream stream, byte buffer ) : void
stream Stream
buffer byte
return void

ScanForPassword() protected method

protected ScanForPassword ( Stream stream, byte buffer, int sectionSize ) : bool
stream Stream
buffer byte
sectionSize int
return bool

releaseCOMObject() protected method

protected releaseCOMObject ( object obj ) : void
obj object
return void