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.
- Host: GitHub
- URL: https://github.com/d-integral/nefertitifile
- Owner: D-Integral
- License: mit
- Created: 2024-07-13T15:21:48.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2024-07-14T14:26:59.000Z (almost 2 years ago)
- Last Synced: 2026-05-29T00:28:44.533Z (25 days ago)
- Topics: file-format
- Language: Swift
- Homepage:
- Size: 51.8 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
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.