@@ -35,7 +35,7 @@ def main():
3535 [sg .Text ('-- HPGL --' )],
3636 [
3737 sg .Text ('Page Size' , size = (15 , 1 )), sg .Combo (['tight' , 'a6' , 'a5' , 'a4' , 'a3' , 'letter' , 'legal' , 'executive' , 'tabloid' ], default_value = 'a4' , size = (15 , 1 ), key = "utility_pageSize" ),
38- sg .Text ('Page Orientation' , size = (15 , 1 )), sg .Combo (['vertical ' , 'landscape' ], default_value = 'vertical ' , size = (15 , 1 ), key = "utility_pageOrientation" )
38+ sg .Text ('Page Orientation' , size = (15 , 1 )), sg .Combo (['portrait ' , 'landscape' ], default_value = 'portrait ' , size = (15 , 1 ), key = "utility_pageOrientation" )
3939 ],
4040 [sg .Button ('SVG to HPGL' , size = (25 , 1 ), key = 'utility_convertHPGL' )],
4141 ]
@@ -94,7 +94,7 @@ def main():
9494 if event == 'utility_scaleA4' :
9595 if values ['inputSVG' ]:
9696 outputFile = values ['inputSVG' ][:- 4 ] + '-A4Scaled.svg'
97- subprocess .Popen ('vpype read "' + str (values ['inputSVG' ]) + '" scale --to 21cm 29cm write --page-format a4 --center "' + str (outputFile ) + '"' )
97+ subprocess .Popen ('vpype read "' + str (values ['inputSVG' ]) + '" scaleto 20cm 28cm write --page-size a4 --center "' + str (outputFile ) + '"' )
9898 else :
9999 sg .popup_error ('Please select a valid .svg file' )
100100 if event == 'utility_visualizeSVG' :
@@ -113,9 +113,9 @@ def main():
113113 if values ['inputSVG' ]:
114114 outputFile = values ['inputSVG' ][:- 4 ] + '-Converted.hpgl'
115115 if (values ['utility_pageOrientation' ] == 'landscape' ):
116- subprocess .Popen ('vpype read "' + str (values ['inputSVG' ]) + '" write --device hp7475a --page-format ' + str (values ['utility_pageSize' ]) + ' --landscape --center "' + str (outputFile ) + '"' )
116+ subprocess .Popen ('vpype read "' + str (values ['inputSVG' ]) + '" write --device hp7475a --page-size ' + str (values ['utility_pageSize' ]) + ' --landscape --center "' + str (outputFile ) + '"' )
117117 else :
118- subprocess .Popen ('vpype read "' + str (values ['inputSVG' ]) + '" write --device hp7475a --page-format ' + str (values ['utility_pageSize' ]) + ' --center "' + str (outputFile ) + '"' )
118+ subprocess .Popen ('vpype read "' + str (values ['inputSVG' ]) + '" write --device hp7475a --page-size ' + str (values ['utility_pageSize' ]) + ' --center "' + str (outputFile ) + '"' )
119119 else :
120120 sg .popup_error ('Please select a valid .svg file' )
121121
0 commit comments