From: Jochen V. <vo...@se...> - 2004-10-18 21:21:15
Attachments:
zzz-patch
|
Hello, I had a look at the backend_ps.py file and found that the generated PostScript has some problems. The appended patch tries to bring the generated output a little bit closer to the behaviour described in the "PostScript Language Document Structuring Conventions Specification" as found at http://partners.adobe.com/asn/developer/pdfs/tn/5001.DSC_Spec.pdf I hope this helps, Jochen -- http://seehuhn.de/ |
From: Jochen V. <vo...@se...> - 2004-10-19 08:34:38
|
Hello, On Mon, Oct 18, 2004 at 10:19:33PM +0100, Jochen Voss wrote: > -%%BeginProlog > +%%%%BeginProlog > /inch {72 mul} def > %%%%EndProlog > """ does anybody know: is the "inch" thing actually used anywhere? Maybe it should just be removed. All the best, Jochen --=20 http://seehuhn.de/ |
From: John H. <jdh...@ac...> - 2004-10-19 15:25:49
|
>>>>> "Jochen" == Jochen Voss <vo...@se...> writes: Jochen> Hello, Jochen> On Mon, Oct 18, 2004 at 10:19:33PM +0100, Jochen Voss wrote: >> -%%BeginProlog +%%%%BeginProlog /inch {72 mul} def >> %%%%EndProlog """ Jochen> does anybody know: is the "inch" thing actually used Jochen> anywhere? Maybe it should just be removed. No it is apparently not used anywhere. It was a def that appeared in my postscript book and several examples I looked at, so I threw it in for good measure. I just applied you PS patch, removed this, and checked the changes into CVS. For my information, what ps viewers/printers were giving you trouble. We've occasionally had reports of some viewers having trouble with matplotlib output and I would like to gather some anecdotal information. Finally, by changing the version information to pstype = 'PS-Adobe-3.0 EPSF-3.0' will we break devices that only support PS level II? JDH |
From: Jochen V. <vo...@se...> - 2004-10-19 15:44:07
|
Hello John, On Tue, Oct 19, 2004 at 09:37:37AM -0500, John Hunter wrote: > For my information, what ps viewers/printers were giving you trouble. None, I looked at the generated PS file out of curiosity and noticed that it does not follow the DSC conventions very well. As this is just shuffling around comments it will probably not affect many applications. > Finally, by changing the version information to >=20 > pstype =3D 'PS-Adobe-3.0 EPSF-3.0' >=20 > will we break devices that only support PS level II? I do not think so. It is only a change to comments and not to the actual PostScript code. It will only affect applications which try to parse the DSC comments and do not understand DSC version 3. I changed this because the document at http://partners.adobe.com/asn/developer/pdfs/tn/5001.DSC_Spec.pdf which defines DSC version 3 is dated "25 September 1992", which seems quite old to me. If you feel more comfortable using DSC version 2 we could either try to reverse engineer the version 2 specification using the "Changes Since Earlier Versions" chapter in above document or try to find a DSC 2 specification somewhere. All the best, Jochen --=20 http://seehuhn.de/ |
From: John H. <jdh...@ac...> - 2004-10-19 15:48:58
|
>>>>> "Jochen" == Jochen Voss <vo...@se...> writes: Jochen> None, I looked at the generated PS file out of curiosity Jochen> and noticed that it does not follow the DSC conventions Jochen> very well. As this is just shuffling around comments it Jochen> will probably not affect many applications. Are there other noncompliant things in the matplotlib ps output that you are aware of, other than those you already fixed? JDH |
From: Jochen V. <vo...@se...> - 2004-10-19 17:19:39
|
Hello John, On Tue, Oct 19, 2004 at 10:00:48AM -0500, John Hunter wrote: > >>>>> "Jochen" =3D=3D Jochen Voss <vo...@se...> writes: >=20 > Jochen> None, I looked at the generated PS file out of curiosity > Jochen> and noticed that it does not follow the DSC conventions > Jochen> very well. As this is just shuffling around comments it > Jochen> will probably not affect many applications. >=20 > Are there other noncompliant things in the matplotlib ps output that > you are aware of, other than those you already fixed? I think the horrible ones are fixed by now. Minor issues: The DSC spec states (at page 18): "If there is a section in the document that corresponds to a particular comment, that comment *must* be used to identify that section of the document." =46rom reading this I would guess that all the "/something { ... } bind def" statements and the included fonts should be inside a %%BeginPrologue %%EndPrologue block. But I didn't check this properly. Then page 19 "strongly suggests" to use some headers like "%%CreationDate" and "%%Title". Page 70 of the SDC specification states that "%%BeginFont" and "%%EndFont" are outdated and should be replaced by "%%BeginResource" and "%%EndResource" statements. All the best, Jochen --=20 http://seehuhn.de/ |
From: Paul B. <ba...@st...> - 2004-10-20 03:02:22
|
Jochen Voss wrote: >Hello John, > >On Tue, Oct 19, 2004 at 10:00:48AM -0500, John Hunter wrote: > > >>>>>>>"Jochen" == Jochen Voss <vo...@se...> writes: >>>>>>> >>>>>>> >> Jochen> None, I looked at the generated PS file out of curiosity >> Jochen> and noticed that it does not follow the DSC conventions >> Jochen> very well. As this is just shuffling around comments it >> Jochen> will probably not affect many applications. >> >>Are there other noncompliant things in the matplotlib ps output that >>you are aware of, other than those you already fixed? >> >> >I think the horrible ones are fixed by now. > >Minor issues: > >The DSC spec states (at page 18): "If there is a section in >the document that corresponds to a particular comment, that comment >*must* be used to identify that section of the document." > >From reading this I would guess that all the "/something { ... } bind >def" statements and the included fonts should be inside a > > %%BeginPrologue > %%EndPrologue > >block. But I didn't check this properly. > >Then page 19 "strongly suggests" to use some headers like >"%%CreationDate" and "%%Title". > >Page 70 of the SDC specification states that "%%BeginFont" and >"%%EndFont" are outdated and should be replaced by "%%BeginResource" >and "%%EndResource" statements. > > It would be nice if they would update their documents, since the %%BeginFont and %%EndFont keywords are from their document about embedding fonts. -- Paul -- Paul Barrett, PhD Space Telescope Science Institute Phone: 410-338-4475 ESS/Science Software Branch FAX: 410-338-4767 Baltimore, MD 21218 |
From: John H. <jdh...@ac...> - 2004-10-20 03:19:00
|
>>>>> "Paul" == Paul Barrett <ba...@st...> writes: Paul> It would be nice if they would update their documents, since Paul> the %%BeginFont and %%EndFont keywords are from their Paul> document about embedding fonts. Hey, give 'em a minute will you? They just released the 3.0 spec in '92. It's going to take them a while to get the rest of their site docs updated... :-) JDH |