On Thursday 20 February 2003 07:17, Daniel Gois wrote:
> Comment peut on �diter un fichier ps?

J'ai fabriqu� un fichier ps de test, l'ai transform� en pdf; je suis alors 
revenu au ps

->PS:   9348 bytes (rm.ori.ps)
PS2PDF: 7194 bytes (rm.pdf)
PDF2PS: 39232 bytes (rm.2.ps)

->PS:  avec la commande 'man -t rm > rm.ori.ps'
-----------------------------------
avec un �diteur de texte (vi, emacs, gedit...) je peux le lire et l'�diter:
--------------------------------------------------------------------------------
%!PS-Adobe-3.0
%%Creator: groff version 1.17.2
%%CreationDate: Thu Feb 20 10:13:20 2003
%%DocumentNeededResources: font Times-Roman
%%+ font Times-Bold
%%+ font Times-Italic
%%DocumentSuppliedResources: procset grops 1.17 2
%%Pages: 1
%%PageOrder: Ascend
%%Orientation: Portrait
%%EndComments
%%BeginProlog
%%BeginResource: procset grops 1.17 2
/setpacking where{
pop
currentpacking
true setpacking
}if
/grops 120 dict dup begin
/SC 32 def

... =========================================================
... ceci est une suite de fonctions �crites en Postscript, qui serviront plus
        bas � placer le texte concern� (prologue)
.... =========================================================

/Times-Roman@0 ENC0/Times-Roman RE
%%EndProlog
%%Page: 1 1
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@0 SF 170.81(RM\(1\) User)72 48 R 170.81
(Commands RM\(1\))2.5 F/F1 10.95/Times-Bold@0 SF -.219(NA)72 84 S(ME)
.219 E F0(rm \255 remo)108 96 Q .3 -.15(ve \214)-.15 H
(les or directories).15 E F1(SYNOPSIS)72 112.8 Q/F2 10/Times-Bold@0 SF
(rm)108
...
-------------------------------------------------------------------------------

C'est massacr� et peu lisible, mais c'est accessible.
La commande de base est : d�place-toi en X,Y (en absolu : moveto)
   x y moveto
et imprime le string 'hello' � partir du point courant
  (hello) show
Comme tu vois, ce qu'un g�n�rateur �volu� de ps fabrique est beaucoup moins 
lisible; les strings restent cependant localisables car ils sont encadr�s de 
(  ).

J'ai alors g�n�r� du pdf, puis par pdf2ps je suis revenu au ps : la 
catastrophe (devenu franchement crypt� !)
-----------------------------------------------------------------------------
%!PS-Adobe-3.0
%%Pages: (atend)
%%BoundingBox: 0 0 540 751
%%HiResBoundingBox: 0.000000 0.000000 539.800000 750.800000
%.........................................
%%Creator: ESP Ghostscript 705 (pswrite)
%%CreationDate: 2003/02/20 10:13:58
%%DocumentData: Clean7Bit
%%LanguageLevel: 2
%%EndComments
%%BeginProlog
% This copyright applies to everything between here and the %%EndProlog:
% Copyright (C) 2002 artofcode LLC, Benicia, CA.  All rights reserved.
%%BeginResource: procset GS_pswrite_2_0_1001
/GS_pswrite_2_0_1001 80 dict dup begin
/PageSize 2 array def/setpagesize{ PageSize aload pop 3 index eq exch
4 index eq and{ pop pop pop}{ PageSize dup  1
... =========================================================
... ceci est une suite de fonctions �crites en Postscript, qui serviront plus
        bas � placer le texte concern� (prologue)
.... =========================================================
 /pagesave null def
%%EndProlog
%%Page: 1 1
%%BeginPageSetup
GS_pswrite_2_0_1001 begin
595 842 /a4 setpagesize
/pagesave save store 100 dict begin
0.1 0.1 scale
%%EndPageSetup
gsave mark
K
0 0 0 0 rf
Q q
0 0 5950 0 0 8420 ^ Y
719 7440 67 66 /6G
$C
0H"Cd1$?G8"Ul"NdL4U$\m9Vg\m6r&\m6qTqHY_?9@mL:9@lh?9,35DCC).D+!H:+@IW/mLAgl6
s8B_4s8W,Is'K%a]HtEoaoQf'#Sb'ij>=Z&~>
,
K
786 7440 87 66 /1S
$C
-----------------------------------------------------------------------------------------------------
Illisible et donc non �ditable � la main :-{



-- 
        Bonne journ�e - Have a good day,

        Alain
+--------------------------------------------------------------------------
|  Dr Alain EMPAIN      Bioinformatique, G�n�tique Mol�culaire B43,
|  Fac. M�d. V�t�rinaire, Univ. de Li�ge, Sart-Tilman / B-4000 Li�ge  
|       [EMAIL PROTECTED]
|       WORK:+32 4 366 3821 Fax: +32 4 366 4122   GSM:+32 497 701764
|       HOME:+32 85 512341  -- Rue des Martyrs,7  B-4550 Nandrin


_______________________________________________________
Linux Mailing List - http://www.unixtech.be
Subscribe/Unsubscribe: http://www.unixtech.be/mailman/listinfo/linux
Archives: http://www.mail-archive.com/[email protected]
IRC: efnet.unixtech.be:6667 - #unixtech

Répondre à