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 :/ Regards 2015-09-20 21:09 GMT+02:00 Laura Creighton <l...@openend.se>: > In a message of Sun, 20 Sep 2015 20:27:48 +0200, Baladjy KICHENASSAMY writes: >>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 =) >> >>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 up > 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=pdfwrite \ > -dPDFSETTINGS=/prepress \ > -dHaveTrueTypes=true \ > -dEmbedAllFonts=true \ > -dSubsetFonts=false \ > -c ".setpdfwrite <</NeverEmbed [ ]>> 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 "<</Orientation 3>> 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 > -- 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 -- https://mail.python.org/mailman/listinfo/python-list