mirror of
https://github.com/storytold/effectcraft.git
synced 2026-11-16 15:22:43 +00:00
test(pdf): check the PDFDocEncoding ActualText label end to end
This commit is contained in:
1 parent
843deea4d6
commit
3f27fbe217
1 file changed
+7
@@ -98,6 +98,13 @@ fn pdf_actual_text_is_exposed_as_a_logical_group() {
|
||||
assert_eq!(shape_names(&doc), vec!["Text: Logical text"]);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn pdf_actual_text_without_a_bom_is_pdfdocencoding_in_the_label() {
|
||||
// 0x80 is a bullet in PDFDocEncoding, 0x92 a trade mark sign, not C1 control characters.
|
||||
let data = page_pdf("/Span << /ActualText <80204192> >> BDC 1 0 0 rg 10 10 20 20 re f EMC", "", vec![]);
|
||||
assert_eq!(shape_names(&parse(&data).unwrap()), vec!["Text: \u{2022} A\u{2122}"]);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn pdf_forms_rotation_cmyk_and_alpha() {
|
||||
let content = "q 2 0 0 2 0 0 cm /Fm0 Do Q\n/GS0 gs 0 0 0 1 k 0 0 10 10 re f\n";
|
||||
|
||||
Reference in new issue
Block a user