diff options
Diffstat (limited to 'src/pdf.zig')
| -rw-r--r-- | src/pdf.zig | 12 |
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; |
