|
View:
New views
14 Messages
—
Rating Filter:
Alert me
|
|
|
[VOTE] New component: DSC parser/processorHi there
I've just finished the initial version of a DSC parser which I'd like to put into XML Graphics Commons. What the heck is a DSC parser? :-) Here's the text of the (somewhat minimal) documentation I wrote for the thing: ------------------------ DSC parser/processor Many PostScript files use special comments to structure a document. This allows manipulation of PostScript files without interpreting them. These special comments are defined in the Document Structuring Conventions. http://partners.adobe.com/public/developer/en/ps/5001.DSC_Spec.pdf The code in Commons is designed to work with DSC 3.0. For details on how DSC is used, please take a look at the DSC specification. The DSC support in Commons was primarily developed to implement resource optimization features in Apache FOP's PostScript output support. Resources like images which are used repeatedly in a document should not be written to the PostScript file each time it is used. Instead it is written once at the beginning of the file as a PostScript form. The form is then called whenever the image needs painting. But the DSC parser could potentially be used for other purposes. The most obvious is extracting a subset of pages from a DSC-compliant file. Assume you want to print only page 45 to 57 of a particular document. There's an example that demonstrates exactly this. Check out the "examples" directory in the distribution. Other potential use cases for the DSC parser are: * Patching PostScript files, for example, adding OMR marks for automatic packaging * Imposition (2-up, n-up, rotation, etc.) * EPS graphic extraction * Inspecting the page count * etc. etc. The DSC parser (DSCParser) was designed as a pull parser, i.e. you fetch new events from the parser inspecting them and acting on them as they are found. If you prefer to work with a push parser, you can pass the DSCParser a DSCHandler implementation and the parser will send you all the events. The best example to understand how to use the DSC parser is the PageExtractor class that implements the page extraction functionality mentioned above. ------------------------ I hope that explains what I've built. I'd like to ask if anyone has any reservations about my adding the DSC parser to XML Graphics Commons. After all, it's a rather large and completely new thing and therefore I thought it necessary to ask before committing. It's probably a lot less interesting for Batik, but it is for FOP. Since it is designed to be used separately from FOP I thought it was best to put it in Commons. I've also already built the resource optimization functionality for FOP that uses the DSC parser. I can commit those changes (Commons and FOP) as soon as we know that nobody objects. I've made a patch containing the DSC parser available (including full javadocs, an example and minimal documentation for the website), so you can see what exactly we're talking about: http://people.apache.org/~jeremias/xmlgraphics-commons-dsc-new.diff.txt +1 from me for adding the DSC parser (obviously). Jeremias Maerki --------------------------------------------------------------------- Apache XML Graphics Project URL: http://xmlgraphics.apache.org/ To unsubscribe, e-mail: general-unsubscribe@... For additional commands, e-mail: general-help@... |
|
|
Re: [VOTE] New component: DSC parser/processorThis looks like an interesting set of code.
On 2/3/07, Jeremias Maerki <dev@...> wrote: > Hi there > > I've just finished the initial version of a DSC parser which I'd like to > put into XML Graphics Commons. What the heck is a DSC parser? :-) Here's > the text of the (somewhat minimal) documentation I wrote for the thing: > > ------------------------ > > DSC parser/processor <snip what="DSC parser/processor Details" /> > ------------------------ > > I hope that explains what I've built. I'd like to ask if anyone has any > reservations about my adding the DSC parser to XML Graphics Commons. > After all, it's a rather large and completely new thing and therefore I > thought it necessary to ask before committing. It's probably a lot less > interesting for Batik, but it is for FOP. Since it is designed to be > used separately from FOP I thought it was best to put it in Commons. > I've also already built the resource optimization functionality for FOP > that uses the DSC parser. I can commit those changes (Commons and FOP) > as soon as we know that nobody objects. > > I've made a patch containing the DSC parser available (including full > javadocs, an example and minimal documentation for the website), so you > can see what exactly we're talking about: > http://people.apache.org/~jeremias/xmlgraphics-commons-dsc-new.diff.txt > > > +1 from me for adding the DSC parser (obviously). > > Jeremias Maerki I'd like to learn a bit more and hear from other developers before I VOTE, but so far it's a strong ++0. -- Regards, The Web Maestro -- <the.webmaestro@...> - <http://homepage.mac.com/webmaestro/> My religion is simple. My religion is kindness. - HH The 14th Dalai Lama of Tibet --------------------------------------------------------------------- Apache XML Graphics Project URL: http://xmlgraphics.apache.org/ To unsubscribe, e-mail: general-unsubscribe@... For additional commands, e-mail: general-help@... |
|
|
Re: [VOTE] New component: DSC parser/processorOn Sat, Feb 03, 2007 at 07:18:21PM +0100, Jeremias Maerki wrote:
> Hi there > > I've just finished the initial version of a DSC parser which I'd like to > put into XML Graphics Commons. What the heck is a DSC parser? :-) Here's > the text of the (somewhat minimal) documentation I wrote for the thing: > > I hope that explains what I've built. I'd like to ask if anyone has any > reservations about my adding the DSC parser to XML Graphics Commons. > After all, it's a rather large and completely new thing and therefore I > thought it necessary to ask before committing. It's probably a lot less > interesting for Batik, but it is for FOP. Since it is designed to be > used separately from FOP I thought it was best to put it in Commons. > I've also already built the resource optimization functionality for FOP > that uses the DSC parser. I can commit those changes (Commons and FOP) > as soon as we know that nobody objects. You do not explain why you wrote your own DSC parser. Is there not a suitable existing DSC parser? Despite that question, I certainly have no objections to including your DSC parser into Commons. I have not inspected your implementation, nor will I have time soon to do so. But I trust it is well written. +1 from me. Simon -- Simon Pepping home page: http://www.leverkruid.eu --------------------------------------------------------------------- Apache XML Graphics Project URL: http://xmlgraphics.apache.org/ To unsubscribe, e-mail: general-unsubscribe@... For additional commands, e-mail: general-help@... |
|
|
Re: [VOTE] New component: DSC parser/processorJeremias Maerki wrote:
<snip/> > I hope that explains what I've built. I'd like to ask if anyone has any > reservations about my adding the DSC parser to XML Graphics Commons. > After all, it's a rather large and completely new thing and therefore I > thought it necessary to ask before committing. It's probably a lot less > interesting for Batik, but it is for FOP. Since it is designed to be > used separately from FOP I thought it was best to put it in Commons. > I've also already built the resource optimization functionality for FOP > that uses the DSC parser. I can commit those changes (Commons and FOP) > as soon as we know that nobody objects. > > I've made a patch containing the DSC parser available (including full > javadocs, an example and minimal documentation for the website), so you > can see what exactly we're talking about: > http://people.apache.org/~jeremias/xmlgraphics-commons-dsc-new.diff.txt > > > +1 from me for adding the DSC parser (obviously). Good work Jeremias! +1 from me. <snip/> Chris --------------------------------------------------------------------- Apache XML Graphics Project URL: http://xmlgraphics.apache.org/ To unsubscribe, e-mail: general-unsubscribe@... For additional commands, e-mail: general-help@... |
|
|
Re: [VOTE] New component: DSC parser/processorJeremias Maerki wrote:
> I've just finished the initial version of a DSC parser which I'd like to > put into XML Graphics Commons. Well, it seems to be much more related to "graphics" than to "xml", but it seems to be useful, so +1 to give the code a proper home. J.Pietschmann --------------------------------------------------------------------- Apache XML Graphics Project URL: http://xmlgraphics.apache.org/ To unsubscribe, e-mail: general-unsubscribe@... For additional commands, e-mail: general-help@... |
|
|
Re: [VOTE] New component: DSC parser/processorI haven't found one. If you ask a search engine most of the hits will
land in the GhostScript area....or here. :-) But that may be because I'm searching with the wrong keywords or there is really no such thing out there. The only things you may find are some utilities which do n-up/Imposition. Not exactly what I was looking for. I've written a DSC parser before, about five years ago when I was still working for Outline. We used it for various things, mostly patching PS files for OMR marks, font embedding etc. That stuff was incredibly useful. I could have implemented the functionality for FOP without writing a full DSC parser. But the whole resource handling stuff is much easier if you have the proper framework and you can easily perform a lot of other tasks with only a little coding. On 04.02.2007 19:21:42 Simon Pepping wrote: <snip/> > You do not explain why you wrote your own DSC parser. Is there not a > suitable existing DSC parser? <snip/> Jeremias Maerki --------------------------------------------------------------------- Apache XML Graphics Project URL: http://xmlgraphics.apache.org/ To unsubscribe, e-mail: general-unsubscribe@... For additional commands, e-mail: general-help@... |
|
|
Re: [VOTE] New component: DSC parser/processorYeah, some people are complaining about the XML in the name of Commons.
But then it just happens that the XML Graphics project has "XML" in it's name (and rightfully so IMO) and if you create a "Commons" like so many other Apache projects do, that's what happens. At least, there's one component in Commons that uses XML: the XML stuff. :-) Maybe we do need to talk about creating a different project for the graphics stuff or we need to rename Commons. Not something I'd be happy about ATM, because it involves a lot of not really productive work. Not enough energy to spearhead something like that on my side. But if anyone else has it.... On 05.02.2007 21:12:07 J.Pietschmann wrote: > Jeremias Maerki wrote: > > I've just finished the initial version of a DSC parser which I'd like to > > put into XML Graphics Commons. > > Well, it seems to be much more related to "graphics" than to > "xml", but it seems to be useful, so +1 to give the code a > proper home. > > J.Pietschmann Jeremias Maerki --------------------------------------------------------------------- Apache XML Graphics Project URL: http://xmlgraphics.apache.org/ To unsubscribe, e-mail: general-unsubscribe@... For additional commands, e-mail: general-help@... |
|
|
Re: [VOTE] New component: DSC parser/processorJeremias Maerki wrote:
> Yeah, some people are complaining about the XML in the name of Commons. > But then it just happens that the XML Graphics project has "XML" in it's > name (and rightfully so IMO) and if you create a "Commons" like so many > other Apache projects do, that's what happens. No problem. After all, the majority of both the Batik and FOP code deals with various forms of graphics too, rather than XML. > At least, there's one > component in Commons that uses XML: the XML stuff. :-) Hehe! :-) J.Pietschmann --------------------------------------------------------------------- Apache XML Graphics Project URL: http://xmlgraphics.apache.org/ To unsubscribe, e-mail: general-unsubscribe@... For additional commands, e-mail: general-help@... |
|
|
Re: [VOTE] New component: DSC parser/processorOn 05.02.2007 22:48:10 J.Pietschmann wrote: > Jeremias Maerki wrote: > > Yeah, some people are complaining about the XML in the name of Commons. > > But then it just happens that the XML Graphics project has "XML" in it's > > name (and rightfully so IMO) and if you create a "Commons" like so many > > other Apache projects do, that's what happens. > > No problem. After all, the majority of both the Batik and FOP > code deals with various forms of graphics too, rather than XML. > > > At least, there's one > > component in Commons that uses XML: the XML stuff. :-) > > Hehe! :-) LOL, I meant XMP. I guess I need some sleep. Good night, Jeremias Maerki --------------------------------------------------------------------- Apache XML Graphics Project URL: http://xmlgraphics.apache.org/ To unsubscribe, e-mail: general-unsubscribe@... For additional commands, e-mail: general-help@... |
|
|
Re: [VOTE] New component: DSC parser/processorOn 2/3/07, The Web Maestro <the.webmaestro@...> wrote:
> > +1 from me for adding the DSC parser (obviously). > > > > Jeremias Maerki > > I'd like to learn a bit more and hear from other developers before I > VOTE, but so far it's a strong ++0. I hereby change my vote to +1. It looks like an intriguing application, and I am thankful to Jeremias for his generous donation. -- Regards, The Web Maestro -- <the.webmaestro@...> - <http://homepage.mac.com/webmaestro/> My religion is simple. My religion is kindness. - HH The 14th Dalai Lama of Tibet --------------------------------------------------------------------- Apache XML Graphics Project URL: http://xmlgraphics.apache.org/ To unsubscribe, e-mail: general-unsubscribe@... For additional commands, e-mail: general-help@... |
|
|
Re: [VOTE] New component: DSC parser/processor+1
This looks like a nice piece of code, well written and, even more importantly, well commented ;-) I've noticed a few glitches while skimming through the patch (prepend paths with org.apache.xmlgraphics.ps): - DSCConstants.java, l28: "inidicating" - PSGenerator.java, l88: "hardcoded to level 2" instead of 3 now - dsc.DefaultDSCHandler.java, l30: which "is simply passed"? "which simply passes"? I guess the latter is the correct one. Vincent Jeremias Maerki a écrit : > Hi there > > I've just finished the initial version of a DSC parser which I'd like to > put into XML Graphics Commons. What the heck is a DSC parser? :-) Here's > the text of the (somewhat minimal) documentation I wrote for the thing: > > ------------------------ > > DSC parser/processor > > Many PostScript files use special comments to structure a document. This > allows manipulation of PostScript files without interpreting them. These > special comments are defined in the Document Structuring Conventions. > http://partners.adobe.com/public/developer/en/ps/5001.DSC_Spec.pdf > The code in Commons is designed to work with DSC 3.0. For details on how > DSC is used, please take a look at the DSC specification. > > The DSC support in Commons was primarily developed to implement resource > optimization features in Apache FOP's PostScript output support. > Resources like images which are used repeatedly in a document should not > be written to the PostScript file each time it is used. Instead it is > written once at the beginning of the file as a PostScript form. The form > is then called whenever the image needs painting. > > But the DSC parser could potentially be used for other purposes. The > most obvious is extracting a subset of pages from a DSC-compliant file. > Assume you want to print only page 45 to 57 of a particular document. > There's an example that demonstrates exactly this. Check out the > "examples" directory in the distribution. Other potential use cases for > the DSC parser are: > > * Patching PostScript files, for example, adding OMR marks for automatic packaging > * Imposition (2-up, n-up, rotation, etc.) > * EPS graphic extraction > * Inspecting the page count > * etc. etc. > > The DSC parser (DSCParser) was designed as a pull parser, i.e. you fetch > new events from the parser inspecting them and acting on them as they > are found. If you prefer to work with a push parser, you can pass the > DSCParser a DSCHandler implementation and the parser will send you all > the events. > > The best example to understand how to use the DSC parser is the > PageExtractor class that implements the page extraction functionality > mentioned above. > > ------------------------ > > I hope that explains what I've built. I'd like to ask if anyone has any > reservations about my adding the DSC parser to XML Graphics Commons. > After all, it's a rather large and completely new thing and therefore I > thought it necessary to ask before committing. It's probably a lot less > interesting for Batik, but it is for FOP. Since it is designed to be > used separately from FOP I thought it was best to put it in Commons. > I've also already built the resource optimization functionality for FOP > that uses the DSC parser. I can commit those changes (Commons and FOP) > as soon as we know that nobody objects. > > I've made a patch containing the DSC parser available (including full > javadocs, an example and minimal documentation for the website), so you > can see what exactly we're talking about: > http://people.apache.org/~jeremias/xmlgraphics-commons-dsc-new.diff.txt > > > +1 from me for adding the DSC parser (obviously). > > Jeremias Maerki > > > --------------------------------------------------------------------- > Apache XML Graphics Project URL: http://xmlgraphics.apache.org/ > To unsubscribe, e-mail: general-unsubscribe@... > For additional commands, e-mail: general-help@... > --------------------------------------------------------------------- Apache XML Graphics Project URL: http://xmlgraphics.apache.org/ To unsubscribe, e-mail: general-unsubscribe@... For additional commands, e-mail: general-help@... |
|
|
Re: [VOTE] New component: DSC parser/processorThanks for the hints! I've corrected the mistakes in my code.
On 06.02.2007 17:28:33 Vincent Hennebert wrote: > +1 > > This looks like a nice piece of code, well written and, even more > importantly, well commented ;-) > > I've noticed a few glitches while skimming through the patch (prepend > paths with org.apache.xmlgraphics.ps): > - DSCConstants.java, l28: "inidicating" > - PSGenerator.java, l88: "hardcoded to level 2" instead of 3 now > - dsc.DefaultDSCHandler.java, l30: which "is simply passed"? "which > simply passes"? I guess the latter is the correct one. > Jeremias Maerki --------------------------------------------------------------------- Apache XML Graphics Project URL: http://xmlgraphics.apache.org/ To unsubscribe, e-mail: general-unsubscribe@... For additional commands, e-mail: general-help@... |
|
|
[VOTE:RESULTS] New component: DSC parser/processorOk, we have 6 +1 votes and no other votes. I'm currently filling out the
IP clearance forms (it's a larger contribution developed off-line and I have to jump through the hoops). When it's all recorded, I'll commit the code. On 03.02.2007 19:18:21 Jeremias Maerki wrote: > Hi there > > I've just finished the initial version of a DSC parser which I'd like to > put into XML Graphics Commons. What the heck is a DSC parser? :-) Here's > the text of the (somewhat minimal) documentation I wrote for the thing: > > ------------------------ > > DSC parser/processor > > Many PostScript files use special comments to structure a document. This > allows manipulation of PostScript files without interpreting them. These > special comments are defined in the Document Structuring Conventions. > http://partners.adobe.com/public/developer/en/ps/5001.DSC_Spec.pdf > The code in Commons is designed to work with DSC 3.0. For details on how > DSC is used, please take a look at the DSC specification. > > The DSC support in Commons was primarily developed to implement resource > optimization features in Apache FOP's PostScript output support. > Resources like images which are used repeatedly in a document should not > be written to the PostScript file each time it is used. Instead it is > written once at the beginning of the file as a PostScript form. The form > is then called whenever the image needs painting. > > But the DSC parser could potentially be used for other purposes. The > most obvious is extracting a subset of pages from a DSC-compliant file. > Assume you want to print only page 45 to 57 of a particular document. > There's an example that demonstrates exactly this. Check out the > "examples" directory in the distribution. Other potential use cases for > the DSC parser are: > > * Patching PostScript files, for example, adding OMR marks for automatic packaging > * Imposition (2-up, n-up, rotation, etc.) > * EPS graphic extraction > * Inspecting the page count > * etc. etc. > > The DSC parser (DSCParser) was designed as a pull parser, i.e. you fetch > new events from the parser inspecting them and acting on them as they > are found. If you prefer to work with a push parser, you can pass the > DSCParser a DSCHandler implementation and the parser will send you all > the events. > > The best example to understand how to use the DSC parser is the > PageExtractor class that implements the page extraction functionality > mentioned above. > > ------------------------ > > I hope that explains what I've built. I'd like to ask if anyone has any > reservations about my adding the DSC parser to XML Graphics Commons. > After all, it's a rather large and completely new thing and therefore I > thought it necessary to ask before committing. It's probably a lot less > interesting for Batik, but it is for FOP. Since it is designed to be > used separately from FOP I thought it was best to put it in Commons. > I've also already built the resource optimization functionality for FOP > that uses the DSC parser. I can commit those changes (Commons and FOP) > as soon as we know that nobody objects. > > I've made a patch containing the DSC parser available (including full > javadocs, an example and minimal documentation for the website), so you > can see what exactly we're talking about: > http://people.apache.org/~jeremias/xmlgraphics-commons-dsc-new.diff.txt > > > +1 from me for adding the DSC parser (obviously). > > Jeremias Maerki Jeremias Maerki --------------------------------------------------------------------- Apache XML Graphics Project URL: http://xmlgraphics.apache.org/ To unsubscribe, e-mail: general-unsubscribe@... For additional commands, e-mail: general-help@... |
|
|
Re: [VOTE:RESULTS] New component: DSC parser/processorThank you for your contribution, Jeremias! Sounds like it'll be a
great addition to the Apache XML Graphics Project. Web Maestro Clay On 2/9/07, Jeremias Maerki <dev@...> wrote: > Ok, we have 6 +1 votes and no other votes. I'm currently filling out the > IP clearance forms (it's a larger contribution developed off-line and I > have to jump through the hoops). When it's all recorded, I'll commit the > code. > > On 03.02.2007 19:18:21 Jeremias Maerki wrote: > > Hi there > > > > I've just finished the initial version of a DSC parser which I'd like to > > put into XML Graphics Commons. What the heck is a DSC parser? :-) Here's > > the text of the (somewhat minimal) documentation I wrote for the thing: > > > > ------------------------ > > > > DSC parser/processor > > > > Many PostScript files use special comments to structure a document. This > > allows manipulation of PostScript files without interpreting them. These > > special comments are defined in the Document Structuring Conventions. > > http://partners.adobe.com/public/developer/en/ps/5001.DSC_Spec.pdf > > The code in Commons is designed to work with DSC 3.0. For details on how > > DSC is used, please take a look at the DSC specification. > > > > The DSC support in Commons was primarily developed to implement resource > > optimization features in Apache FOP's PostScript output support. > > Resources like images which are used repeatedly in a document should not > > be written to the PostScript file each time it is used. Instead it is > > written once at the beginning of the file as a PostScript form. The form > > is then called whenever the image needs painting. > > > > But the DSC parser could potentially be used for other purposes. The > > most obvious is extracting a subset of pages from a DSC-compliant file. > > Assume you want to print only page 45 to 57 of a particular document. > > There's an example that demonstrates exactly this. Check out the > > "examples" directory in the distribution. Other potential use cases for > > the DSC parser are: > > > > * Patching PostScript files, for example, adding OMR marks for automatic packaging > > * Imposition (2-up, n-up, rotation, etc.) > > * EPS graphic extraction > > * Inspecting the page count > > * etc. etc. > > > > The DSC parser (DSCParser) was designed as a pull parser, i.e. you fetch > > new events from the parser inspecting them and acting on them as they > > are found. If you prefer to work with a push parser, you can pass the > > DSCParser a DSCHandler implementation and the parser will send you all > > the events. > > > > The best example to understand how to use the DSC parser is the > > PageExtractor class that implements the page extraction functionality > > mentioned above. > > > > ------------------------ > > > > I hope that explains what I've built. I'd like to ask if anyone has any > > reservations about my adding the DSC parser to XML Graphics Commons. > > After all, it's a rather large and completely new thing and therefore I > > thought it necessary to ask before committing. It's probably a lot less > > interesting for Batik, but it is for FOP. Since it is designed to be > > used separately from FOP I thought it was best to put it in Commons. > > I've also already built the resource optimization functionality for FOP > > that uses the DSC parser. I can commit those changes (Commons and FOP) > > as soon as we know that nobody objects. > > > > I've made a patch containing the DSC parser available (including full > > javadocs, an example and minimal documentation for the website), so you > > can see what exactly we're talking about: > > http://people.apache.org/~jeremias/xmlgraphics-commons-dsc-new.diff.txt > > > > > > +1 from me for adding the DSC parser (obviously). > > > > Jeremias Maerki > > > > Jeremias Maerki > > > --------------------------------------------------------------------- > Apache XML Graphics Project URL: http://xmlgraphics.apache.org/ > To unsubscribe, e-mail: general-unsubscribe@... > For additional commands, e-mail: general-help@... > > -- Regards, The Web Maestro -- <the.webmaestro@...> - <http://homepage.mac.com/webmaestro/> My religion is simple. My religion is kindness. - HH The 14th Dalai Lama of Tibet --------------------------------------------------------------------- Apache XML Graphics Project URL: http://xmlgraphics.apache.org/ To unsubscribe, e-mail: general-unsubscribe@... For additional commands, e-mail: general-help@... |
| Free embeddable forum powered by Nabble | Forum Help |