Inject raw PDF specials from display lists
This commit is contained in:
1 parent
da7f580bf0
commit
eac5bd649a
4 files changed
+32
No files matched your search
@@ -1334,6 +1334,19 @@ mod tests {
|
||||
assert_eq!(text.matches("/Type /Page ").count(), 2);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn special_content_reaches_the_pdf_stream() {
|
||||
use crate::render::DisplayList;
|
||||
let mut list = DisplayList {
|
||||
width: 612 * 65_536,
|
||||
height: 792 * 65_536,
|
||||
items: Vec::new(),
|
||||
images: Vec::new(),
|
||||
};
|
||||
list.special("0.5 g 10 10 20 20 re f");
|
||||
let pdf = crate::pdf::display_list_to_pdf(&list, 792 * 65_536);
|
||||
assert!(String::from_utf8_lossy(&pdf).contains("0.5 g 10 10 20 20 re f"));
|
||||
}
|
||||
#[test]
|
||||
fn link_rectangles_become_pdf_annotations() {
|
||||
use crate::render::DisplayList;
|
||||
|
||||
Reference in new issue
Block a user