From cd4a5b991104a2dc96a4bb7390451fb384376a9a Mon Sep 17 00:00:00 2001 From: Gabriel Schneider Date: Mon, 3 Aug 2026 09:35:25 -0300 Subject: add PDF sections output and Look navigation --- src/pdf.zig | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'src/pdf.zig') 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; -- cgit v1.3