Path: csiph.com!eternal-september.org!feeder.eternal-september.org!border1.nntp.ams1.giganews.com!nntp.giganews.com!usenetcore.com!newsfeed.xs4all.nl!newsfeed8.news.xs4all.nl!nzpost1.xs4all.net!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.018 X-Spam-Evidence: '*H*': 0.96; '*S*': 0.00; 'command.': 0.09; 'creighton': 0.09; 'message-id:@4ax.com': 0.09; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; 'python': 0.10; 'output': 0.13; '>in': 0.16; 'received:80.91.229.3': 0.16; 'received:plane.gmane.org': 0.16; 'subprocess': 0.16; 'targeting': 0.16; 'laura': 0.18; 'url:home': 0.18; '2015': 0.20; 'sep': 0.22; 'module': 0.25; 'header:X-Complaints-To:1': 0.26; 'wonder': 0.27; 'question': 0.27; '+0200,': 0.27; 'if,': 0.29; 'convert': 0.29; "i'm": 0.30; 'getting': 0.33; 'run': 0.33; 'point': 0.33; 'url:python': 0.33; "i'll": 0.33; '(for': 0.34; 'file': 0.34; 'integrate': 0.35; 'but': 0.36; 'url:org': 0.36; 'created': 0.36; 'url:library': 0.36; 'to:addr:python-list': 0.36; 'subject:: ': 0.37; 'received:org': 0.37; 'desired': 0.37; 'pdf': 0.37; 'charset:us- ascii': 0.37; 'button': 0.38; 'end': 0.39; 'enough': 0.39; 'rather': 0.39; 'to:addr:python.org': 0.40; 'easy': 0.60; 'url:3': 0.60; 'save': 0.60; 'your': 0.60; 'more': 0.63; 'card': 0.63; 'url:4': 0.70; '>you': 0.84; 'conversion?': 0.84; 'dennis': 0.91; 'received:108': 0.93 X-Injected-Via-Gmane: http://gmane.org/ To: python-list@python.org From: Dennis Lee Bieber Subject: Re: Postscript to pdf Date: Sun, 20 Sep 2015 20:25:02 -0400 Organization: IISS Elusive Unicorn References: <201509201812.t8KICXHu004041@fido.openend.se> <201509201909.t8KJ93oU018314@fido.openend.se> <201509201952.t8KJqh7W029272@fido.openend.se> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Gmane-NNTP-Posting-Host: adsl-108-68-178-61.dsl.klmzmi.sbcglobal.net X-Newsreader: Forte Agent 6.00/32.1186 X-No-Archive: YES X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.20+ Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 38 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1442795119 news.xs4all.nl 23831 [2001:888:2000:d::a6]:55558 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:96904 On Sun, 20 Sep 2015 21:52:43 +0200, Laura Creighton declaimed the following: >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 At this point one begins to wonder if, since PDF is the desired end product, it might not be better to redo the effort targeting the use of ReportLab rather than the round-about PS to PDF conversion? -- Wulfraed Dennis Lee Bieber AF6VN wlfraed@ix.netcom.com HTTP://wlfraed.home.netcom.com/