Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #96919

Re: Postscript to pdf

References (3 earlier) <201509201812.t8KICXHu004041@fido.openend.se> <CAKSfFmhqTWzem6aW+3KOxKTo4C35JdmoRv=BrkSu8+Hruz3WmA@mail.gmail.com> <201509201909.t8KJ93oU018314@fido.openend.se> <CAKSfFmiThEyW8B=ni8NA1FGY1aC2sU3L1CApgy1oA6A8+MKQvQ@mail.gmail.com> <201509201952.t8KJqh7W029272@fido.openend.se>
From Baladjy KICHENASSAMY <baladjy@gmail.com>
Date 2015-09-20 23:11 +0200
Subject Re: Postscript to pdf
Newsgroups comp.lang.python
Message-ID <mailman.22.1442822127.28679.python-list@python.org> (permalink)

Show all headers | View raw


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@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

Back to comp.lang.python | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Postscript to pdf Bala Ji <baladjy@gmail.com> - 2015-09-20 09:20 -0700
  Re: Postscript to pdf Laura Creighton <lac@openend.se> - 2015-09-20 18:40 +0200
    Re: Postscript to pdf Bala Ji <baladjy@gmail.com> - 2015-09-20 09:50 -0700
      Re: Postscript to pdf Laura Creighton <lac@openend.se> - 2015-09-20 20:12 +0200
      Re: Postscript to pdf Laura Creighton <lac@openend.se> - 2015-09-20 21:09 +0200
      Re: Postscript to pdf Baladjy KICHENASSAMY <baladjy@gmail.com> - 2015-09-20 20:27 +0200
        Re: Postscript to pdf Christian Gollwitzer <auriocus@gmx.de> - 2015-09-21 15:39 +0200
      Re: Postscript to pdf Baladjy KICHENASSAMY <baladjy@gmail.com> - 2015-09-20 21:32 +0200
      Re: Postscript to pdf Laura Creighton <lac@openend.se> - 2015-09-20 21:52 +0200
      Re: Postscript to pdf Laura Creighton <lac@openend.se> - 2015-09-21 00:50 +0200
      Re: Postscript to pdf Dennis Lee Bieber <wlfraed@ix.netcom.com> - 2015-09-20 20:25 -0400
      Re: Postscript to pdf Baladjy KICHENASSAMY <baladjy@gmail.com> - 2015-09-20 23:11 +0200
        Re: Postscript to pdf Nobody <nobody@nowhere.invalid> - 2015-09-21 13:56 +0100
      Re: Postscript to pdf Baladjy KICHENASSAMY <baladjy@gmail.com> - 2015-09-21 17:20 +0200
        Re: Postscript to pdf Christian Gollwitzer <auriocus@gmx.de> - 2015-09-23 08:40 +0200
        Re: Postscript to pdf mithra <curtis.rendon@gmail.com> - 2015-09-23 17:01 -0700
  Re: Postscript to pdf Terry Reedy <tjreedy@udel.edu> - 2015-09-21 00:17 -0400

csiph-web