initial commit

This commit is contained in:
2026-10-11 16:33:19 +02:00
commit 83202070c7
4 changed files with 34 additions and 0 deletions
+27
View File
@@ -0,0 +1,27 @@
package pdf
import "core:os"
Error :: enum {
File_Read_Error,
}
Document :: struct {
}
open :: proc{
open_file,
open_bytes,
}
open_file :: proc(path: string) -> (pdf: ^Document, err: Error) {
data, read_err := os.read_entire_file(path, context.allocator)
if read_err != nil {
return nil, .File_Read_Error
}
return open_bytes(data)
}
open_bytes :: proc(data: []u8) -> (pdf: ^Document, err: Error) {
}