Path: csiph.com!goblin2!goblin.stu.neva.ru!newsfeed.xs4all.nl!newsfeed7.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.030 X-Spam-Evidence: '*H*': 0.94; '*S*': 0.00; 'problem?': 0.07; 'works.': 0.07; 'cc:addr:python-list': 0.09; 'creighton': 0.09; 'python': 0.10; 'output': 0.13; 'def': 0.13; '"<>': 0.16; 'guessing': 0.16; 'macosx,': 0.16; 'laura': 0.18; 'settings': 0.20; '2015': 0.20; 'cc:2**0': 0.20; 'cc:addr:python.org': 0.20; 'orientation': 0.22; 'sep': 0.22; 'cc:no real name:2**0': 0.22; 'this:': 0.23; 'header :In-Reply-To:1': 0.24; 'command': 0.26; 'question': 0.27; 'message-id:@mail.gmail.com': 0.27; '+0200,': 0.27; 'correct': 0.28; 'fine': 0.28; 'convert': 0.29; "i'm": 0.30; 'non': 0.32; 'problem': 0.33; "i'll": 0.33; 'skip:- 10': 0.34; 'know.': 0.34; 'file': 0.34; 'received:google.com': 0.35; 'so,': 0.35; 'text': 0.35; 'files,': 0.35; 'integrate': 0.35; 'but': 0.36; 'there': 0.36; 'created': 0.36; 'subject:: ': 0.37; 'there,': 0.37; 'done.': 0.37; 'pdf': 0.37; 'things': 0.38; 'itself': 0.38; 'version': 0.38; 'button': 0.38; 'skip:- 20': 0.39; 'enough': 0.39; 'where': 0.40; 'easy': 0.60; 'save': 0.60; 'your': 0.60; 'real': 0.62; 'card': 0.63; 'great': 0.63; 'landscape': 0.66; 'paper': 0.73; '.....': 0.76; 'horrible': 0.84; 'surprisingly': 0.84; 'difficult,': 0.91 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type:content-transfer-encoding; bh=+A9Yh4FaMDYAVAXPsP0oisU+lQ8o2VzZ+nOOS7HCdfE=; b=wtm9j3kWOWwcjuqgcFtGx5l8oLYsuwdIb3XSj61mvUt/69dTNg71A7YzsGWJiInDG2 7YdylOSa128ZQEXPVZV78REoyrFjXXRrqKuchfUxKgXcafuf/tzk+UTCbOXivPWqHO4J 3jJD8UU/erKrtR7oooCrvjXtGo5OMc/+UTSL9KNMvAGk3GztWTjEeQdUF6C353USS3bd 0+CrneDE/YoC395N4DlYPSV3hLJn7l62mdmxNOA+sLEuTII7nsAsa8K0Zst+oxWU9B+R euWiHPkfi3/dYvlhtDYj4E6GUfv+SULPpZwTPeEHLXv6OsVbCVCwtedHBHSHVbVvftyU JdTA== X-Received: by 10.180.106.196 with SMTP id gw4mr10021288wib.63.1442777573769; Sun, 20 Sep 2015 12:32:53 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: <201509201909.t8KJ93oU018314@fido.openend.se> References: <201509201812.t8KICXHu004041@fido.openend.se> <201509201909.t8KJ93oU018314@fido.openend.se> From: Baladjy KICHENASSAMY Date: Sun, 20 Sep 2015 21:32:34 +0200 Subject: Re: Postscript to pdf To: Laura Creighton Cc: python-list@python.org Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Mailman-Approved-At: Sun, 20 Sep 2015 21:50:38 +0200 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: 89 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1442778639 news.xs4all.nl 23809 [2001:888:2000:d::a6]:41293 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:96896 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=3DtkFileDialog.asksaveasfilename(), colormode= =3D'color') 2) so now i want to create a button to convert this "ps" file into "pdf" ..= .. def convert(): help :/ Regards 2015-09-20 21:09 GMT+02:00 Laura Creighton : > In a message of Sun, 20 Sep 2015 20:27:48 +0200, Baladjy KICHENASSAMY wri= tes: >>Hello, >> >>I'm using macosx, ps2pdf version i don't know :/ sorry.... >>ok actually i found what is the problem... >> >>There is no problem with the ps file every thing is fine =3D) >> >>Can u please just tell me how to change paper settings ? >>i want to go from portait to landscape ? >> > > Aha! Great to know. > Do you have a real printer there, in which case is this a printer problem= ? > If so, I need the name of the printer and its model number to help look u= p > the way to make it do landscape. > > If you just want to have ps2pdf produce landscape files, that is > surprisingly difficult, for the ps2pdf that uses ghostscript to > get the work done. ps2pdf 'guesses' what is the correct orientation > and, stupidly, there is no way to tell it 'stop guessing, I know > what I want'. It's very bad at guessing things that don't have > text -- or enough text -- in them. > > Most of the time ps2pdf is just this: > > gs \ > -o output.pdf \ > -sDEVICE=3Dpdfwrite \ > -dPDFSETTINGS=3D/prepress \ > -dHaveTrueTypes=3Dtrue \ > -dEmbedAllFonts=3Dtrue \ > -dSubsetFonts=3Dfalse \ > -c ".setpdfwrite <> setdistillerparams" \ > -f input.ps > > where input.ps is the file you have and output.pdf is the pdf you want. > and we can make gs orient itself as you want with > > -c "<> setpagedevice" > > Orientation 3 is landscape. Orientation 0 is portrait. > > If this is your problem, then see if you have gs (ghostscript) > and in that case see if this horrible long command works. > > Laura > --=20 KICHENASSAMY Baladjy Ing=C3=A9nieur en G=C3=A9nie M=C3=A9canique Sp=C3=A9cialiste Contr=C3=B4le Non Destructif et Qualification des proc=C3= =A9d=C3=A9s sp=C3=A9ciaux COSAC CND Niveau 2 RT et PT Aircelle SAFRAN Tel:06.03.72.53.12