Postscript to pdf

Baladjy KICHENASSAMY baladjy at gmail.com
Sun Sep 20 23:11:20 CEST 2015


well one more question :/

i tried this

def save():
     Canevas.update()
     Canevas.postscript(file=tkFileDialog.asksaveasfilename(),
colormode='color')
     subprocess.call(["ps2pdf", "-dEPSCrop", "test.ps", "test.pdf"])


i got the ps file but i didn't get the pdf file :/

2015-09-20 21:52 GMT+02:00 Laura Creighton <lac at openend.se>:
> In a message of Sun, 20 Sep 2015 21:32:34 +0200, Baladjy KICHENASSAMY writes:
>>ohhhh ok i got it
>>actually it's very easy the commande is :
>>ps2pdf -dEPSCrop image.ps
>>
>>sorry but i'm new to python  my last question is how to integrate this
>>to python... i want that the output file must be a pdf ?
>>
>>1) i created a button which i'll save my id card as "ps" file
>>
>>def save():
>>    Canevas.update()
>>    Canevas.postscript(file=tkFileDialog.asksaveasfilename(), colormode='color')
>
>>2) so now i want to create a button to convert this "ps" file into "pdf" ....
>>
>>def convert():
>>   help :/
>
> You need to run the subprocess module to run your command.
> https://docs.python.org/2/library/subprocess.html  (for python 2)
> https://docs.python.org/3.4/library/subprocess.html (for python 3)
>
> is this enough or do you need more help getting it to work?
>
> Laura
>



-- 
KICHENASSAMY Baladjy
Ingénieur en Génie Mécanique
Spécialiste Contrôle Non Destructif et Qualification des procédés spéciaux
COSAC CND Niveau 2 RT et PT
Aircelle SAFRAN
Tel:06.03.72.53.12


More information about the Python-list mailing list