summaryrefslogtreecommitdiff
path: root/src/pdf.zig
diff options
context:
space:
mode:
authorGabriel Schneider <[email protected]>2026-08-03 09:35:25 -0300
committerGabriel Schneider <[email protected]>2026-08-10 09:17:07 -0300
commitcd4a5b991104a2dc96a4bb7390451fb384376a9a (patch)
treef59f04aa83266d9ddfbabcb18bad8c3277e74bd7 /src/pdf.zig
parenta69cd4a7ef5c4527e3a7cd325d49b6bf445bd810 (diff)
downloadpardes-cd4a5b991104a2dc96a4bb7390451fb384376a9a.tar.gz
pardes-cd4a5b991104a2dc96a4bb7390451fb384376a9a.zip
add PDF sections output and Look navigation
Diffstat (limited to 'src/pdf.zig')
-rw-r--r--src/pdf.zig12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/pdf.zig b/src/pdf.zig
index 3e07f4bc..4a671315 100644
--- a/src/pdf.zig
+++ b/src/pdf.zig
@@ -944,6 +944,18 @@ fn makeOutlinePdf(gpa: std.mem.Allocator) ![]u8 {
return finishGeneratedPdf(&bytes, gpa, &offsets);
}
+/// TEST-ONLY generated fixture shared with the core integration tests. It is
+/// public because `pardes.zig` imports this file as a module; production code
+/// has no caller and the function is dead-stripped.
+pub fn makeOutlineTestPdf(gpa: std.mem.Allocator) ![]u8 {
+ return makeOutlinePdf(gpa);
+}
+
+/// TEST-ONLY generated PDF with pages but no outline tree.
+pub fn makeNoOutlineTestPdf(gpa: std.mem.Allocator) ![]u8 {
+ return makeOffsetRotatedPdf(gpa);
+}
+
fn makeTooDeepOutlinePdf(gpa: std.mem.Allocator) ![]u8 {
const levels = c.PARDES_PDF_MAX_OUTLINE_DEPTH + 1;
const first_outline_item = 5;