On 22.10.2009 13:07:27 Venkat Reddy wrote:
> Hi Jeremias,
> 
> I have gone through the code you metioned in 
> (org.apache.fop.afp.modca.TagLogicalElement, line 128), couldn't find 
> any truncation happening there for more than 254 bytes, but the afp 
> output file showing the TLE value upto 254 bytes..
> I have a doubt here...
> 
> 1. Is the FOP code truncating the TLE value (I couldn't find any 
> truncation functionality in the above fop code)?

No, that's the point. The truncation is missing. That's why there is
this bug.

> 2. If FOP is not truncating, then the viewer is showing only 254 bytes...

...and other AFP consumers might actually do something wrong or fail.

The spec says that the X'36' triplet can be at most 254 bytes long.
Subtract from that the 4 bytes (length + Tid + reserved) before the
actual value leaves a maximum number of bytes for the value of 250. FOP
needs to truncate to that.

> I am viewing the document in AFP Explorer, where it is showing the 
> length (300 for the first TLE value in attached fo file), but only 
> showing few characters in text...
> Could you please help me here, I am little confused in understanding 
> this....
> 
> Thanks,
> Venkat.
> 
> Venkat Reddy wrote:
> > Hi Jeremias,
> >
> > Thanks for the information. I will check the code and specs as you 
> > stated.
> >
> > Cheers,
> > Venkat.
> >
> > Jeremias Maerki wrote:
> >> On 20.10.2009 16:30:49 Venkat Reddy wrote:
> >>  
> >>> Hi,
> >>>
> >>> Please help me in finding the code related to this TLE value 
> >>> truncation happening for more than 254 bytes. The corresponding bug 
> >>> is already raised...
> >>>
> >>> https://issues.apache.org/bugzilla/show_bug.cgi?id=47941
> >>>
> >>> The MODCA documentation clearly states that 254 bytes allowed for 
> >>> the TLE value. I would like to take your inputs before digging into 
> >>> the code...
> >>>
> >>> 1. Is the behaviour correct (truncating after 254 bytes)?
> >>>     
> >>
> >> I think so. There seems to be an unarchitected mechanism [1] to extend
> >> the field length but the spec says its use is discouraged.
> >>
> >> [1] MO:DCA spec, Eighth Edition, "Structured Field Syntax", SFI
> >> semantics, Bytes 6-7, page 21/22.
> >>
> >>  
> >>> 2. Do we need to warn the user in this case?
> >>>     
> >>
> >> If the truncated part is not just whitespace, then yes, IMO.
> >>
> >>  
> >>> Please point me to the code points and guide me to resolve this 
> >>> problem, if you can...
> >>>     
> >>
> >> org.apache.fop.afp.modca.TagLogicalElement, line 128.
> >> Simply check if the value is longer than allowed and then check if the
> >> truncated part contains anything other than spaces.
> >>
> >>  
> >>> Thanks,
> >>> Venkat.
> >>>     
> >>
> >>
> >>
> >>
> >> Jeremias Maerki
> >>
> >>
> >>   
> >
> >
> 




Jeremias Maerki

Reply via email to