parent
d51b44fb57
commit
0409bcbe65
|
@ -248,10 +248,8 @@ def ticksPerMM(tree):
|
|||
|
||||
def svgMerge(box, inkscape, output):
|
||||
|
||||
parser = ElementTree.XMLParser(remove_blank_text=True)
|
||||
|
||||
src_tree = ElementTree.parse(box, parser)
|
||||
dest_tree = ElementTree.parse(inkscape, parser)
|
||||
src_tree = ElementTree.parse(box)
|
||||
dest_tree = ElementTree.parse(inkscape)
|
||||
dest_root = dest_tree.getroot()
|
||||
|
||||
src_width, src_height = getSizeInMM(src_tree)
|
||||
|
@ -276,7 +274,7 @@ def svgMerge(box, inkscape, output):
|
|||
scale_x, scale_y, off_x, off_y))
|
||||
|
||||
# write the xml file
|
||||
ElementTree.ElementTree(dest_root).write(output, pretty_print=True, encoding='utf-8', xml_declaration=True)
|
||||
ElementTree.ElementTree(dest_root).write(output, encoding='utf-8', xml_declaration=True)
|
||||
|
||||
if __name__ == "__main__":
|
||||
svg = SVGFile("examples/box.svg")
|
||||
|
|
Loading…
Reference in New Issue