From 3dc4eb6bcd78afb379736ca4c0517f8de27a10ec Mon Sep 17 00:00:00 2001 From: Martin Haug Date: Tue, 19 Dec 2023 22:45:41 +0100 Subject: [PATCH] Write annotation flags --- crates/typst-pdf/src/page.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/crates/typst-pdf/src/page.rs b/crates/typst-pdf/src/page.rs index 56d3fd832..acf67014a 100644 --- a/crates/typst-pdf/src/page.rs +++ b/crates/typst-pdf/src/page.rs @@ -3,8 +3,8 @@ use std::num::NonZeroUsize; use ecow::{eco_format, EcoString}; use pdf_writer::types::{ - ActionType, AnnotationType, ColorSpaceOperand, LineCapStyle, LineJoinStyle, - NumberingStyle, + ActionType, AnnotationFlags, AnnotationType, ColorSpaceOperand, LineCapStyle, + LineJoinStyle, NumberingStyle, }; use pdf_writer::writers::PageLabel; use pdf_writer::{Content, Filter, Finish, Name, Rect, Ref, Str, TextStr}; @@ -169,7 +169,7 @@ fn write_page(ctx: &mut PdfContext, i: usize) { for (dest, rect) in &page.links { let mut annotation = annotations.push(); annotation.subtype(AnnotationType::Link).rect(*rect); - annotation.border(0.0, 0.0, 0.0, None); + annotation.border(0.0, 0.0, 0.0, None).flags(AnnotationFlags::PRINT); let pos = match dest { Destination::Url(uri) => {