|
From: Mojca M. <moj...@gm...> - 2007-03-13 00:09:08
|
On 3/13/07, Ethan Merritt <merritt@u.washington.edu> wrote: > On Monday 12 March 2007 16:14, Mojca Miklavec wrote: > > On 3/12/07, Ethan Merritt wrote: > > > PDF is mostly just marked-up PostScript which is then compressed. > > > > And indexed. > > Could be. What does that mean, exactly? Than means that I never managed to create a useful PDF file by hand (I never took time to study the specifications in such a detail), I didn't even managed to reproduce the minimal PDF file example as written in the specification. The last few numbers in the document tell you where to look for objects. I don't know much about it, so I really don't want to go in details (because I'll would sooner or later give wrong statements), but one thing that I know is that editing by hand is of no practical use for PDF files. Yes, you can change a number or two, but sometimes a single character can confuse indexes (which tell you at which location (in bytes?) an object is saved). And besides that: PDF is not a programming language. I'm not sure if defining a palette in such a way as it's done in PS is even possible in PDF. I might be wrong, but in general I don't think that investing any time into configurability of PDF makes sense (making the LaTeX terminal better/configurable would be much more useful). If one really needs to edit that file, it means that something might be wrong with gnuplot interface ... as if one would need to edit the assebler code after compiling the program with C. I agree, it's sometime handy to change a line or two, but in the case of PDF I would even vote for compressed format anyway (if cairo enables that). I imagine that the number of people who prefer small files is significantly bigger that the number of those who case about editing PDF files. Mojca > I don't have a PDF spec here to refer to. > > > No, because PDF files are indexed. It might be possible to change > > minor things (index of a palette for example), but you can break the > > whole file if you add a single character. Generally it's not a good > > idea to edit PDF files manually, just as it's not a good idea to edit > > PNG files with a text editor. > > I think that must depend on the program that creates your pdf file. > Some of them are just as editable as PostScript file. Others are > in-line encoded/compressed right from the first line, and thus not > human readable. I append the first few lines from a pdf file > produced by Timoth=E9e's cairopdf terminal. It's a bit cryptic, but > does not seem to suffer when I edit/add/subtract lines using vi. > To me it looks very similar to the Adobe Illustrator shorthand form > of PostScript. > > > %PDF-1.4 > %=B5=ED(r)=FB > 2 0 obj > << /Length 3 0 R > /Type /XObject > /Subtype /Form > /BBox [ 0 0 720 504 ] > >> > stream > 1 0 0 -1 0 504 cm > 1 1 1 RG 1 1 1 rg /a0 gs > 0 0 720 504 re f > 0 0 0 RG 0 0 0 rg /a0 gs > 20 w > 2 J > 0 j > [] 0.0 d > 10 M 1482.999878 9460 m 1607.000122 9460 l q 0.05 0 0 0.05 0.5 0.5 cm > S Q > 0 0 0 RG 0 0 0 rg /a0 gs > 20 w > 2 J > 0 j > [] 0.0 d > 10 M 14078.999939 9460 m 13955 9460 l q 0.05 0 0 0.05 0.5 0.5 cm > S Q > 0 0 0 RG 0 0 0 rg /a0 gs > BT > /CairoFont-0-0 1 Tf > 13.33335 0 -0 -13.33335 40.981247 478.123389 Tm <00> Tj > > ... [and so on] > > -- > Ethan A Merritt Courier Deliveries: 1959 NE Pacific > Dept of Biochemistry > Health Sciences Building > University of Washington - Seattle WA 98195-7742 > |