hughbe / OfficeFileReader

Swift .doc and .ppt file reader
11 stars 2 forks source link

OfficeFileReader

MsgReader

Swift definitions for structures, enumerations and functions defined in MS-DOC and MS-PPT

Example Usage

Add the following line to your project's SwiftPM dependencies:

.package(url: "https://github.com/hughbe/OfficeFileReader", from: "1.0.0"),

To read .doc files:

import OfficeFileReader

let data = Data(contentsOfFile: "<path-to-file>.doc")!
let file = try DocFile(data: data)
print(file)

To read .ppt files:

import OfficeFileReader

let data = Data(contentsOfFile: "<path-to-file>.ppt")!
let file = try PptFile(data: data)
print(file)