Skip to content

Commit

Permalink
endSVGElementHandler : fix defs mode problem.
Browse files Browse the repository at this point in the history
  • Loading branch information
naitoh committed Dec 29, 2023
1 parent 8c0e177 commit d2dc147
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lib/rbpdf.rb
Original file line number Diff line number Diff line change
Expand Up @@ -18435,10 +18435,14 @@ def endSVGElementHandler(name)
when 'clipPath' # clipPath
@svgclipmode = false
when 'g'
return if @svgdefsmode

# ungroup: remove last style from array
@svgstyles.pop
stop_transform()
when 'text', 'tspan'
return if @svgdefsmode

anchor = @svgstyles.last['text-anchor']
# print text
cell(0, 0, @svgtext.strip, 0, 0, '', 0, '', 0, false, 'L', 'T', anchor)
Expand Down

0 comments on commit d2dc147

Please sign in to comment.