@@ -71,7 +71,7 @@ def gs_exe(self):
71
71
gs_exe = 'gs'
72
72
73
73
self ._cached ["gs_exe" ] = gs_exe
74
- return gs_exe
74
+ return str ( gs_exe )
75
75
76
76
@property
77
77
def gs_version (self ):
@@ -1540,7 +1540,7 @@ def gs_distill(tmpfile, eps=False, ptype='letter', bbox=None, rotated=False):
1540
1540
else :
1541
1541
device_name = "pswrite"
1542
1542
1543
- command = [gs_exe , "-dBATCH" , "-dNOPAUSE" , "-r%d" % dpi ,
1543
+ command = [str ( gs_exe ) , "-dBATCH" , "-dNOPAUSE" , "-r%d" % dpi ,
1544
1544
"-sDEVICE=%s" % device_name , paper_option ,
1545
1545
"-sOutputFile=%s" % psfile , tmpfile ]
1546
1546
verbose .report (command , 'debug' )
@@ -1596,13 +1596,13 @@ def xpdf_distill(tmpfile, eps=False, ptype='letter', bbox=None, rotated=False):
1596
1596
paper_option = "-sPAPERSIZE=%s" % ptype
1597
1597
1598
1598
if sys .platform == "win32" :
1599
- command = ["ps2pdf" , "-dAutoFilterColorImages#false" ,
1599
+ command = [str ( "ps2pdf" ) , "-dAutoFilterColorImages#false" ,
1600
1600
"-dAutoFilterGrayImages#false" ,
1601
1601
"-sGrayImageFilter#FlateEncode" ,
1602
1602
"-sColorImageFilter#FlateEncode" , paper_option , tmpfile ,
1603
1603
pdffile ]
1604
1604
else :
1605
- command = ["ps2pdf" , "-dAutoFilterColorImages=false" ,
1605
+ command = [str ( "ps2pdf" ) , "-dAutoFilterColorImages=false" ,
1606
1606
"-dAutoFilterGrayImages=false" ,
1607
1607
"-sGrayImageFilter=FlateEncode" ,
1608
1608
"-sColorImageFilter=FlateEncode" , paper_option , tmpfile ,
@@ -1623,7 +1623,7 @@ def xpdf_distill(tmpfile, eps=False, ptype='letter', bbox=None, rotated=False):
1623
1623
verbose .report (fh .read (), 'debug' )
1624
1624
os .remove (outfile )
1625
1625
1626
- command = ["pdftops" , "-paper" , "match" , "-level2" , pdffile , psfile ]
1626
+ command = [str ( "pdftops" ) , "-paper" , "match" , "-level2" , pdffile , psfile ]
1627
1627
verbose .report (command , 'debug' )
1628
1628
try :
1629
1629
with open (outfile , "w" ) as fout :
0 commit comments