We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 90b72b9 commit 48fe6baCopy full SHA for 48fe6ba
1 file changed
spec/pdf/core/structure_tree_spec.rb
@@ -81,6 +81,26 @@
81
82
expect(elem.data[:A]).to eq({ O: :Table, Scope: :Column })
83
end
84
+
85
+ it 'supports ActualText attribute' do
86
+ elem = structure_tree.add_element(:Span, ActualText: 'required')
87
88
+ expect(elem.data[:ActualText]).to eq('required')
89
+ end
90
91
+ it 'includes ActualText in rendered PDF output' do
92
+ structure_tree.begin_element(:P)
93
+ span = structure_tree.begin_element(:Span, ActualText: 'selected')
94
+ structure_tree.mark_content(:Span) do
95
+ renderer.add_content('BT /F1 12 Tf (X) Tj ET')
96
97
+ structure_tree.end_element # Span
98
+ structure_tree.end_element # P
99
100
+ output = renderer.render
101
102
+ expect(output).to include('/ActualText')
103
104
105
106
describe '#begin_element / #end_element' do
0 commit comments