An open API service indexing awesome lists of open source software.

https://github.com/d-integral/nefertitifile

A file format library.
https://github.com/d-integral/nefertitifile

file-format

Last synced: 3 days ago
JSON representation

A file format library.

Awesome Lists containing this project

README

          

# NefertitiFile
NefertitiFile by Dmytro Skorokhod is an open source file format library used by Nefertiti, an open source library for making searchable PDFs from photos.

Here is an example of NefertitiFileProtocol usage:
```Swift
import NefertitiFile

var file: (any NefertitiFileProtocol)?

func activityViewController(with file: (any NefertitiFileProtocol)) -> UIActivityViewController? {
guard let pdfDocumentDataUrl = file.documentDataUrl else { return nil }

let activityViewController = UIActivityViewController(activityItems: [pdfDocumentDataUrl],
applicationActivities: nil)

return activityViewController
}
```

NefertitiFileProtocol has properties documentDataUrl and thumbnailDataUrl. The first of them is a url to the whole document data and the last one is a link to a thumbnail which you may use for a small document preview.