How to convert svg to pdf in python 3+?

1.3k views Asked by At

I am converting svg to pdf using cairosvg, I need to convert svg to pdf using below svg,

svg = """
<svg height="640" version="1.1" width="100%" xmlns="http://www.w3.org/2000/svg" style="overflow: hidden; position: relative; left: -0.40625px;"><desc style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0);">Created with Raphaël 2.1.0</desc><defs style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0);"></defs><path style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0);" fill="none" stroke="#000000" d="M411,109L411,110Z" stroke-width="3px"></path><path style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0);" fill="none" stroke="#000000" d="M411,110L412,111Z" stroke-width="3px"></path><path style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0);" fill="none" stroke="#000000" d="M412,111L413,113Z" stroke-width="3px"></path><path style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0);" fill="none" stroke="#000000" d="M413,113L413,114Z" stroke-width="3px"></path><path style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0);" fill="none" stroke="#000000" d="M413,114L414,116Z" stroke-width="3px"></path><path style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0);" fill="none" stroke="#000000" d="M414,116L414,117Z" stroke-width="3px"></path><path style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0);" fill="none" stroke="#000000" d="M414,117L415,119Z" stroke-width="3px"></path><path style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0);" fill="none" stroke="#000000" d="M415,119L415,121Z" stroke-width="3px"></path><path style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0);" fill="none" stroke="#000000" d="M415,121L415,122Z" stroke-width="3px"></path><path style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0);" fill="none" stroke="#000000" d="M415,122L415,123Z" stroke-width="3px"></path><path style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0);" fill="none" stroke="#000000" d="M415,123L416,124Z" stroke-width="3px"></path><path style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0);" fill="none" stroke="#000000" d="M416,124L416,125Z" stroke-width="3px"></path><path style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0);" fill="none" stroke="#000000" d="M416,125L416,124Z" stroke-width="3px"></path><path style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0);" fill="none" stroke="#000000" d="M416,124L416,124Z" stroke-width="3px"></path><path style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0);" fill="none" stroke="#000000" d="M406,212L407,212Z" stroke-width="3px"></path><path style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0);" fill="none" stroke="#000000" d="M407,212L407,213Z" stroke-width="3px"></path><path style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0);" fill="none" stroke="#000000" d="M407,213L408,213Z" stroke-width="3px"></path><path style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0);" fill="none" stroke="#000000" d="M408,213L408,214Z" stroke-width="3px"></path><path style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0);" fill="none" stroke="#000000" d="M408,214L410,215Z" stroke-width="3px"></path><path style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0);" fill="none" stroke="#000000" d="M410,215L411,215Z" stroke-width="3px"></path><path style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0);" fill="none" stroke="#000000" d="M411,215L412,216Z" stroke-width="3px"></path><path style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0);" fill="none" stroke="#000000" d="M412,216L413,217Z" stroke-width="3px"></path><path style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0);" fill="none" stroke="#000000" d="M413,217L415,218Z" stroke-width="3px"></path><path style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0);" fill="none" stroke="#000000" d="M415,218L416,219Z" stroke-width="3px"></path><path style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0);" fill="none" stroke="#000000" d="M416,219L418,220Z" stroke-width="3px"></path><path style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0);" fill="none" stroke="#000000" d="M418,220L420,221Z" stroke-width="3px"></path><path style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0);" fill="none" stroke="#000000" d="M420,221L421,221Z" stroke-width="3px"></path><path style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0);" fill="none" stroke="#000000" d="M421,221L423,222Z" stroke-width="3px"></path><path style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0);" fill="none" stroke="#000000" d="M423,222L424,222Z" stroke-width="3px"></path><path style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0);" fill="none" stroke="#000000" d="M424,222L426,223Z" stroke-width="3px"></path><path style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0);" fill="none" stroke="#000000" d="M426,223L427,223Z" stroke-width="3px"></path><path style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0);" fill="none" stroke="#000000" d="M427,223L429,224Z" stroke-width="3px"></path><path style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0);" fill="none" stroke="#000000" d="M429,224L431,224Z" stroke-width="3px"></path><path style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0);" fill="none" stroke="#000000" d="M431,224L433,225Z" stroke-width="3px"></path><path style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0);" fill="none" stroke="#000000" d="M433,225L435,225Z" stroke-width="3px"></path><path style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0);" fill="none" stroke="#000000" d="M435,225L436,225Z" stroke-width="3px"></path><path style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0);" fill="none" stroke="#000000" d="M436,225L438,225Z" stroke-width="3px"></path><path style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0);" fill="none" stroke="#000000" d="M438,225L439,225Z" stroke-width="3px"></path><path style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0);" fill="none" stroke="#000000" d="M439,225L441,225Z" stroke-width="3px"></path><path style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0);" fill="none" stroke="#000000" d="M441,225L442,225Z" stroke-width="3px"></path><path style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0);" fill="none" stroke="#000000" d="M442,225L443,225Z" stroke-width="3px"></path><path style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0);" fill="none" stroke="#000000" d="M443,225L444,225Z" stroke-width="3px"></path><path style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0);" fill="none" stroke="#000000" d="M444,225L445,225Z" stroke-width="3px"></path><path style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0);" fill="none" stroke="#000000" d="M445,225L446,225Z" stroke-width="3px"></path><path style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0);" fill="none" stroke="#000000" d="M446,225L446,225Z" stroke-width="3px"></path><path style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0);" fill="none" stroke="#000000" d="M321,231L325,231Z" stroke-width="3px"></path><path style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0);" fill="none" stroke="#000000" d="M325,231L329,231Z" stroke-width="3px"></path><path style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0);" fill="none" stroke="#000000" d="M329,231L339,231Z" stroke-width="3px"></path><path style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0);" fill="none" stroke="#000000" d="M339,231L344,229Z" stroke-width="3px"></path><path style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0);" fill="none" stroke="#000000" d="M344,229L354,228Z" stroke-width="3px"></path><path style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0);" fill="none" stroke="#000000" d="M354,228L360,226Z" stroke-width="3px"></path><path style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0);" fill="none" stroke="#000000" d="M360,226L369,224Z" stroke-width="3px"></path><path style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0);" fill="none" stroke="#000000" d="M369,224L379,220Z" stroke-width="3px"></path><path style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0);" fill="none" stroke="#000000" d="M379,220L385,219Z" stroke-width="3px"></path><path style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0);" fill="none" stroke="#000000" d="M385,219L390,216Z" stroke-width="3px"></path><path style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0);" fill="none" stroke="#000000" d="M390,216L392,216Z" stroke-width="3px"></path><path style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0);" fill="none" stroke="#000000" d="M392,216L394,215Z" stroke-width="3px"></path><path style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0);" fill="none" stroke="#000000" d="M394,215L394,214Z" stroke-width="3px"></path><path style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0);" fill="none" stroke="#000000" d="M394,214L395,214Z" stroke-width="3px"></path><path style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0);" fill="none" stroke="#000000" d="M395,214L395,214Z" stroke-width="3px"></path><path style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0);" fill="none" stroke="#000000" d="M461,74L461,75Z" stroke-width="3px"></path><path style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0);" fill="none" stroke="#000000" d="M461,75L461,76Z" stroke-width="3px"></path><path style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0);" fill="none" stroke="#000000" d="M461,76L461,77Z" stroke-width="3px"></path><path style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0);" fill="none" stroke="#000000" d="M461,77L461,78Z" stroke-width="3px"></path><path style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0);" fill="none" stroke="#000000" d="M461,78L461,79Z" stroke-width="3px"></path><path style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0);" fill="none" stroke="#000000" d="M461,79L462,80Z" stroke-width="3px"></path><path style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0);" fill="none" stroke="#000000" d="M462,80L462,81Z" stroke-width="3px"></path><path style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0);" fill="none" stroke="#000000" d="M462,81L462,83Z" stroke-width="3px"></path><path style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0);" fill="none" stroke="#000000" d="M462,83L462,85Z" stroke-width="3px"></path><path style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0);" fill="none" stroke="#000000" d="M462,85L462,86Z" stroke-width="3px"></path><path style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0);" fill="none" stroke="#000000" d="M462,86L463,87Z" stroke-width="3px"></path><path style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0);" fill="none" stroke="#000000" d="M463,87L463,88Z" stroke-width="3px"></path><path style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0);" fill="none" stroke="#000000" d="M463,88L463,89Z" stroke-width="3px"></path><path style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0);" fill="none" stroke="#000000" d="M463,89L463,90Z" stroke-width="3px"></path><path style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0);" fill="none" stroke="#000000" d="M463,90L463,91Z" stroke-width="3px"></path><path style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0);" fill="none" stroke="#000000" d="M463,91L463,92Z" stroke-width="3px"></path><path style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0);" fill="none" stroke="#000000" d="M463,92L464,93Z" stroke-width="3px"></path><path style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0);" fill="none" stroke="#000000" d="M464,93L464,95Z" stroke-width="3px"></path><path style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0);" fill="none" stroke="#000000" d="M464,95L464,96Z" stroke-width="3px"></path><path style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0);" fill="none" stroke="#000000" d="M464,96L465,97Z" stroke-width="3px"></path><path style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0);" fill="none" stroke="#000000" d="M465,97L465,98Z" stroke-width="3px"></path><path style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0);" fill="none" stroke="#000000" d="M465,98L465,99Z" stroke-width="3px"></path><path style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0);" fill="none" stroke="#000000" d="M465,99L465,100Z" stroke-width="3px"></path><path style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0);" fill="none" stroke="#000000" d="M465,100L465,101Z" stroke-width="3px"></path><path style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0);" fill="none" stroke="#000000" d="M465,101L465,102Z" stroke-width="3px"></path><path style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0);" fill="none" stroke="#000000" d="M465,102L465,102Z" stroke-width="3px"></path></svg>
"""

from cairosvg import svg2pdf

svg2pdf(str(svg), write_to='testx.pdf')

But it give no pages in pdf. Please solve my problem

1

There are 1 answers

0
dhana On BEST ANSWER

I need to give the width numbers only, Here is the modified code.

svg = """
<svg height="640" version="1.1" width="1200" xmlns="http://www.w3.org/2000/svg" style="overflow: hidden; position: relative; left: -0.40625px;"><desc style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0);">Created with Raphaël 2.1.0</desc><defs style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0);"></defs><path style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0);" fill="none" stroke="#000000" d="M411,109L411,110Z" stroke-width="3px"></path><path style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0);" fill="none" stroke="#000000" d="M411,110L412,111Z" stroke-width="3px"></path><path style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0);" fill="none" stroke="#000000" d="M412,111L413,113Z" stroke-width="3px"></path><path style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0);" fill="none" stroke="#000000" d="M413,113L413,114Z" stroke-width="3px"></path><path style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0);" fill="none" stroke="#000000" d="M413,114L414,116Z" stroke-width="3px"></path><path style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0);" fill="none" stroke="#000000" d="M414,116L414,117Z" stroke-width="3px"></path><path style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0);" fill="none" stroke="#000000" d="M414,117L415,119Z" stroke-width="3px"></path><path style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0);" fill="none" stroke="#000000" d="M415,119L415,121Z" stroke-width="3px"></path><path style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0);" fill="none" stroke="#000000" d="M415,121L415,122Z" stroke-width="3px"></path><path style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0);" fill="none" stroke="#000000" d="M415,122L415,123Z" stroke-width="3px"></path><path style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0);" fill="none" stroke="#000000" d="M415,123L416,124Z" stroke-width="3px"></path><path style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0);" fill="none" stroke="#000000" d="M416,124L416,125Z" stroke-width="3px"></path><path style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0);" fill="none" stroke="#000000" d="M416,125L416,124Z" stroke-width="3px"></path><path style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0);" fill="none" stroke="#000000" d="M416,124L416,124Z" stroke-width="3px"></path><path style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0);" fill="none" stroke="#000000" d="M406,212L407,212Z" stroke-width="3px"></path><path style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0);" fill="none" stroke="#000000" d="M407,212L407,213Z" stroke-width="3px"></path><path style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0);" fill="none" stroke="#000000" d="M407,213L408,213Z" stroke-width="3px"></path><path style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0);" fill="none" stroke="#000000" d="M408,213L408,214Z" stroke-width="3px"></path><path style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0);" fill="none" stroke="#000000" d="M408,214L410,215Z" stroke-width="3px"></path><path style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0);" fill="none" stroke="#000000" d="M410,215L411,215Z" stroke-width="3px"></path><path style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0);" fill="none" stroke="#000000" d="M411,215L412,216Z" stroke-width="3px"></path><path style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0);" fill="none" stroke="#000000" d="M412,216L413,217Z" stroke-width="3px"></path><path style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0);" fill="none" stroke="#000000" d="M413,217L415,218Z" stroke-width="3px"></path><path style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0);" fill="none" stroke="#000000" d="M415,218L416,219Z" stroke-width="3px"></path><path style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0);" fill="none" stroke="#000000" d="M416,219L418,220Z" stroke-width="3px"></path><path style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0);" fill="none" stroke="#000000" d="M418,220L420,221Z" stroke-width="3px"></path><path style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0);" fill="none" stroke="#000000" d="M420,221L421,221Z" stroke-width="3px"></path><path style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0);" fill="none" stroke="#000000" d="M421,221L423,222Z" stroke-width="3px"></path><path style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0);" fill="none" stroke="#000000" d="M423,222L424,222Z" stroke-width="3px"></path><path style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0);" fill="none" stroke="#000000" d="M424,222L426,223Z" stroke-width="3px"></path><path style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0);" fill="none" stroke="#000000" d="M426,223L427,223Z" stroke-width="3px"></path><path style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0);" fill="none" stroke="#000000" d="M427,223L429,224Z" stroke-width="3px"></path><path style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0);" fill="none" stroke="#000000" d="M429,224L431,224Z" stroke-width="3px"></path><path style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0);" fill="none" stroke="#000000" d="M431,224L433,225Z" stroke-width="3px"></path><path style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0);" fill="none" stroke="#000000" d="M433,225L435,225Z" stroke-width="3px"></path><path style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0);" fill="none" stroke="#000000" d="M435,225L436,225Z" stroke-width="3px"></path><path style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0);" fill="none" stroke="#000000" d="M436,225L438,225Z" stroke-width="3px"></path><path style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0);" fill="none" stroke="#000000" d="M438,225L439,225Z" stroke-width="3px"></path><path style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0);" fill="none" stroke="#000000" d="M439,225L441,225Z" stroke-width="3px"></path><path style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0);" fill="none" stroke="#000000" d="M441,225L442,225Z" stroke-width="3px"></path><path style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0);" fill="none" stroke="#000000" d="M442,225L443,225Z" stroke-width="3px"></path><path style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0);" fill="none" stroke="#000000" d="M443,225L444,225Z" stroke-width="3px"></path><path style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0);" fill="none" stroke="#000000" d="M444,225L445,225Z" stroke-width="3px"></path><path style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0);" fill="none" stroke="#000000" d="M445,225L446,225Z" stroke-width="3px"></path><path style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0);" fill="none" stroke="#000000" d="M446,225L446,225Z" stroke-width="3px"></path><path style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0);" fill="none" stroke="#000000" d="M321,231L325,231Z" stroke-width="3px"></path><path style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0);" fill="none" stroke="#000000" d="M325,231L329,231Z" stroke-width="3px"></path><path style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0);" fill="none" stroke="#000000" d="M329,231L339,231Z" stroke-width="3px"></path><path style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0);" fill="none" stroke="#000000" d="M339,231L344,229Z" stroke-width="3px"></path><path style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0);" fill="none" stroke="#000000" d="M344,229L354,228Z" stroke-width="3px"></path><path style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0);" fill="none" stroke="#000000" d="M354,228L360,226Z" stroke-width="3px"></path><path style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0);" fill="none" stroke="#000000" d="M360,226L369,224Z" stroke-width="3px"></path><path style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0);" fill="none" stroke="#000000" d="M369,224L379,220Z" stroke-width="3px"></path><path style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0);" fill="none" stroke="#000000" d="M379,220L385,219Z" stroke-width="3px"></path><path style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0);" fill="none" stroke="#000000" d="M385,219L390,216Z" stroke-width="3px"></path><path style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0);" fill="none" stroke="#000000" d="M390,216L392,216Z" stroke-width="3px"></path><path style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0);" fill="none" stroke="#000000" d="M392,216L394,215Z" stroke-width="3px"></path><path style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0);" fill="none" stroke="#000000" d="M394,215L394,214Z" stroke-width="3px"></path><path style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0);" fill="none" stroke="#000000" d="M394,214L395,214Z" stroke-width="3px"></path><path style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0);" fill="none" stroke="#000000" d="M395,214L395,214Z" stroke-width="3px"></path><path style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0);" fill="none" stroke="#000000" d="M461,74L461,75Z" stroke-width="3px"></path><path style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0);" fill="none" stroke="#000000" d="M461,75L461,76Z" stroke-width="3px"></path><path style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0);" fill="none" stroke="#000000" d="M461,76L461,77Z" stroke-width="3px"></path><path style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0);" fill="none" stroke="#000000" d="M461,77L461,78Z" stroke-width="3px"></path><path style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0);" fill="none" stroke="#000000" d="M461,78L461,79Z" stroke-width="3px"></path><path style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0);" fill="none" stroke="#000000" d="M461,79L462,80Z" stroke-width="3px"></path><path style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0);" fill="none" stroke="#000000" d="M462,80L462,81Z" stroke-width="3px"></path><path style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0);" fill="none" stroke="#000000" d="M462,81L462,83Z" stroke-width="3px"></path><path style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0);" fill="none" stroke="#000000" d="M462,83L462,85Z" stroke-width="3px"></path><path style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0);" fill="none" stroke="#000000" d="M462,85L462,86Z" stroke-width="3px"></path><path style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0);" fill="none" stroke="#000000" d="M462,86L463,87Z" stroke-width="3px"></path><path style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0);" fill="none" stroke="#000000" d="M463,87L463,88Z" stroke-width="3px"></path><path style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0);" fill="none" stroke="#000000" d="M463,88L463,89Z" stroke-width="3px"></path><path style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0);" fill="none" stroke="#000000" d="M463,89L463,90Z" stroke-width="3px"></path><path style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0);" fill="none" stroke="#000000" d="M463,90L463,91Z" stroke-width="3px"></path><path style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0);" fill="none" stroke="#000000" d="M463,91L463,92Z" stroke-width="3px"></path><path style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0);" fill="none" stroke="#000000" d="M463,92L464,93Z" stroke-width="3px"></path><path style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0);" fill="none" stroke="#000000" d="M464,93L464,95Z" stroke-width="3px"></path><path style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0);" fill="none" stroke="#000000" d="M464,95L464,96Z" stroke-width="3px"></path><path style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0);" fill="none" stroke="#000000" d="M464,96L465,97Z" stroke-width="3px"></path><path style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0);" fill="none" stroke="#000000" d="M465,97L465,98Z" stroke-width="3px"></path><path style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0);" fill="none" stroke="#000000" d="M465,98L465,99Z" stroke-width="3px"></path><path style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0);" fill="none" stroke="#000000" d="M465,99L465,100Z" stroke-width="3px"></path><path style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0);" fill="none" stroke="#000000" d="M465,100L465,101Z" stroke-width="3px"></path><path style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0);" fill="none" stroke="#000000" d="M465,101L465,102Z" stroke-width="3px"></path><path style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0);" fill="none" stroke="#000000" d="M465,102L465,102Z" stroke-width="3px"></path></svg>
"""

from cairosvg import svg2pdf

svg2pdf(str(svg), write_to='testx.pdf')