Re: FOP Enhancements
Hi Andrew Interesting stuff! On 16.11.2007 15:54:54 Love, Andrew wrote: > Hello Jeremias, > > I absolutely want to develop a solution that is not proprietary and follows > the standard, so I really appreciate your ideas and suggestions. > > A little more background of the product and usage: > > - The product is a pharmacy management software system. > - We use FOP throughout the application, but the enhancements I need are for > generating prescription labels. > - In this case, we use a Zebra label printer and the PCL language is ZPL. I > am planning to develop a ZPL renderer for the new FOP framework and submit > it to the open source project. I'm speaking only for myself here, but something "exotic" such as ZPL could become problematic in terms of maintenance/testing if we accept it into the project. We've basically turned down another renderer (ESC POS) in the past because of that. Even for something as "common" as RTF we have a maintenance problem today because not enough people are there to fix bugs and further develop the component. You might be better off publishing the renderer elsewhere (Google Code, SourceForge etc.). If it turns out that there is enough interest to make it a part of FOP that can still happen. It's actually what happened with the AFP renderer. > - Typically a label is 4in by 4in with multiple stickers on the label. ...and you're using block-containers for the positioning of the individual stickers on the label? That sounds more like a job for an imposition [1] (2-up, n-up) feature. Our intermediate format [2] is theoretically capable of doing such things. I just never had a concrete need to try it out before. If I'm right here, it might actually be easier to try this using imposition than to try and hack something non-standard into FOP. WDYT? [1] http://en.wikipedia.org/wiki/Imposition [2] http://xmlgraphics.apache.org/fop/trunk/intermediate.html > - The stickers are placed on the bottle and a bag. > - Sections on the label have the text rotated 90 or 270 degrees. > - Usually a bar code is placed on the label. > > -The value for overflow-to is the ID of another block-container. Actually > the value is another custom attribute that identifies the block, but ID is > the best usage for this. Typical usage for overflow are the dosage and > instructions placed in one of the stickers. Example- Take 1 pill twice > daily. Warnings such as do not drink with milk, if you miss a dose do not > take until the next dose is due, etc. Since we are dealing with a small > label the text usually does not fit, but the remaining warnings are placed > either on another section of the label or page 2 in a specific block. > > -The Whitespace Management Extension will fulfill my requirement for > smallest-font-size. That's good news. Jeremias Maerki
RE: FOP Enhancements
> -Message d'origine- > De : mckacl [mailto:[EMAIL PROTECTED] > Envoyé : jeudi 15 novembre 2007 19:48 > > Hello, > > I have taken responsibility for the FOP implementation at my company. > Unfortunately, in the past the framework was directly > customized for our > product requirements. > > We are upgrading to the current versin of FOP, and going > forward we will not > directly customize the framework and hope to use extensions. > I have two > enhancements I need assistance with. > > 1. fo:block-container "overflow-to" attribute was added. > Basically, if > text does not fit in the block the overflow is added to another > fo:block-container. The overflow block may be on any page. Waou! That remember me the flow mapping concept in FO-REC 1.1 (6.4.1.7.1 - Two flows mapping into their own regions). Very interesting enhencement that could stay compliant with this REC. > 2. fo:block-container "smallest-font-size" attribute was > added. If text > cannot fit within the block, the font-size is reduced until > it fits or the > smallest-font-size is reached. In addition, the block supports the > overflow-to attribute. > > My company is in the health-care industry so the overflow is extremely > important for patient instructions and warnings. > > Let me know if you think these enhancements are suitable for > extensions, or > if some other means is appropriate. > > Thanks, > Andrew Pascal
RE: FOP Enhancements
Hello Jeremias, I absolutely want to develop a solution that is not proprietary and follows the standard, so I really appreciate your ideas and suggestions. A little more background of the product and usage: - The product is a pharmacy management software system. - We use FOP throughout the application, but the enhancements I need are for generating prescription labels. - In this case, we use a Zebra label printer and the PCL language is ZPL. I am planning to develop a ZPL renderer for the new FOP framework and submit it to the open source project. - Typically a label is 4in by 4in with multiple stickers on the label. - The stickers are placed on the bottle and a bag. - Sections on the label have the text rotated 90 or 270 degrees. - Usually a bar code is placed on the label. -The value for overflow-to is the ID of another block-container. Actually the value is another custom attribute that identifies the block, but ID is the best usage for this. Typical usage for overflow are the dosage and instructions placed in one of the stickers. Example- Take 1 pill twice daily. Warnings such as do not drink with milk, if you miss a dose do not take until the next dose is due, etc. Since we are dealing with a small label the text usually does not fit, but the remaining warnings are placed either on another section of the label or page 2 in a specific block. -The Whitespace Management Extension will fulfill my requirement for smallest-font-size. Thanks -Original Message- From: Jeremias Maerki [mailto:[EMAIL PROTECTED] Sent: Friday, November 16, 2007 4:36 AM To: fop-dev@xmlgraphics.apache.org Subject: Re: FOP Enhancements Hi Andrew On 15.11.2007 19:48:06 mckacl wrote: > > Hello, > > I have taken responsibility for the FOP implementation at my company. > Unfortunately, in the past the framework was directly customized for our > product requirements. > > We are upgrading to the current versin of FOP, and going forward we will not > directly customize the framework and hope to use extensions. I have two > enhancements I need assistance with. > > 1. fo:block-container "overflow-to" attribute was added. Basically, if > text does not fit in the block the overflow is added to another > fo:block-container. The overflow block may be on any page. I can only guess what exactly the use-case is here, so can you please check that this is not something that could be covered by XSL 1.1 flow-map functionality? We don't support that, yet, but I think it's important to check that we don't create proprietary extensions for something that is actually available in the standard. What's the value for overflow-to? The id of another block-container? What's the content of the other block-container? Is this normally used for absolutely positioned block-containers? Maybe you could post an example of a PDF that uses this feature? That would be helpful. > 2. fo:block-container "smallest-font-size" attribute was added. If text > cannot fit within the block, the font-size is reduced until it fits or the > smallest-font-size is reached. In addition, the block supports the > overflow-to attribute. What's the behaviour if descendants of the block-container override the font-size? We've discussed another extension some time ago that might cover the same functionality: http://wiki.apache.org/xmlgraphics-fop/WhitespaceManagement Can you take a look and see if this would also cover your requirement? I mean, this wouldn't allow proportional down-scaling of the content, but actually just present alternatives. This extension was proposed as a means to fill free space on a page with advertisements or other info for the customer. In your case, you'd simply generate the content, say, 3 times with different font sizes. I'm not saying your idea is bad. I'm just trying to find the minimal set of necessary extensions so that FOP doesn't get much more complicated than it is already. FO without any extensions is already a brain-wrecker. What I can't tell, yet, is how this alternative would impact your overflow-to feature. > My company is in the health-care industry so the overflow is extremely > important for patient instructions and warnings. > > Let me know if you think these enhancements are suitable for extensions, or > if some other means is appropriate. > > Thanks, > Andrew > > -- > View this message in context: http://www.nabble.com/FOP-Enhancements-tf4816337.html#a13778915 > Sent from the FOP - Dev mailing list archive at Nabble.com. Jeremias Maerki
Re: FOP Enhancements
Hi Andrew On 15.11.2007 19:48:06 mckacl wrote: > > Hello, > > I have taken responsibility for the FOP implementation at my company. > Unfortunately, in the past the framework was directly customized for our > product requirements. > > We are upgrading to the current versin of FOP, and going forward we will not > directly customize the framework and hope to use extensions. I have two > enhancements I need assistance with. > > 1. fo:block-container "overflow-to" attribute was added. Basically, if > text does not fit in the block the overflow is added to another > fo:block-container. The overflow block may be on any page. I can only guess what exactly the use-case is here, so can you please check that this is not something that could be covered by XSL 1.1 flow-map functionality? We don't support that, yet, but I think it's important to check that we don't create proprietary extensions for something that is actually available in the standard. What's the value for overflow-to? The id of another block-container? What's the content of the other block-container? Is this normally used for absolutely positioned block-containers? Maybe you could post an example of a PDF that uses this feature? That would be helpful. > 2. fo:block-container "smallest-font-size" attribute was added. If text > cannot fit within the block, the font-size is reduced until it fits or the > smallest-font-size is reached. In addition, the block supports the > overflow-to attribute. What's the behaviour if descendants of the block-container override the font-size? We've discussed another extension some time ago that might cover the same functionality: http://wiki.apache.org/xmlgraphics-fop/WhitespaceManagement Can you take a look and see if this would also cover your requirement? I mean, this wouldn't allow proportional down-scaling of the content, but actually just present alternatives. This extension was proposed as a means to fill free space on a page with advertisements or other info for the customer. In your case, you'd simply generate the content, say, 3 times with different font sizes. I'm not saying your idea is bad. I'm just trying to find the minimal set of necessary extensions so that FOP doesn't get much more complicated than it is already. FO without any extensions is already a brain-wrecker. What I can't tell, yet, is how this alternative would impact your overflow-to feature. > My company is in the health-care industry so the overflow is extremely > important for patient instructions and warnings. > > Let me know if you think these enhancements are suitable for extensions, or > if some other means is appropriate. > > Thanks, > Andrew > > -- > View this message in context: > http://www.nabble.com/FOP-Enhancements-tf4816337.html#a13778915 > Sent from the FOP - Dev mailing list archive at Nabble.com. Jeremias Maerki
FOP Enhancements
Hello, I have taken responsibility for the FOP implementation at my company. Unfortunately, in the past the framework was directly customized for our product requirements. We are upgrading to the current versin of FOP, and going forward we will not directly customize the framework and hope to use extensions. I have two enhancements I need assistance with. 1. fo:block-container "overflow-to" attribute was added. Basically, if text does not fit in the block the overflow is added to another fo:block-container. The overflow block may be on any page. 2. fo:block-container "smallest-font-size" attribute was added. If text cannot fit within the block, the font-size is reduced until it fits or the smallest-font-size is reached. In addition, the block supports the overflow-to attribute. My company is in the health-care industry so the overflow is extremely important for patient instructions and warnings. Let me know if you think these enhancements are suitable for extensions, or if some other means is appropriate. Thanks, Andrew -- View this message in context: http://www.nabble.com/FOP-Enhancements-tf4816337.html#a13778915 Sent from the FOP - Dev mailing list archive at Nabble.com.