cvs commit: xml-fop/src/org/apache/fop/pdf ASCII85Filter.java

2002-08-01 Thread keiron

keiron  2002/08/01 23:50:08

  Modified:src/org/apache/fop/pdf ASCII85Filter.java
  Log:
  Simplified ASCII85Filter computation, thereby hopefully
  working around JVM bugs
  from Branch
  
  Revision  ChangesPath
  1.5   +21 -6 xml-fop/src/org/apache/fop/pdf/ASCII85Filter.java
  
  Index: ASCII85Filter.java
  ===
  RCS file: /home/cvs/xml-fop/src/org/apache/fop/pdf/ASCII85Filter.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- ASCII85Filter.java27 May 2002 10:59:07 -  1.4
  +++ ASCII85Filter.java2 Aug 2002 06:50:08 -   1.5
  @@ -17,11 +17,9 @@
   private static final String ASCII85_EOD = "~>";
   
   private static final long base85_4 = 85;
  -private static final long base85_3 = base85_4 * base85_4;
  -private static final long base85_2 = base85_3 * base85_4;
  -private static final long base85_1 = base85_2 * base85_4;
  -
  -
  +//private static final long base85_3 = base85_4 * base85_4;
  +//private static final long base85_2 = base85_3 * base85_4;
  +//private static final long base85_1 = base85_2 * base85_4;
   
   public String getName() {
   return "/ASCII85Decode";
  @@ -124,6 +122,7 @@
   };
   return result;
   } else {
  +/*
   byte c1 = (byte)((word / base85_1) & 0xFF);
   byte c2 = (byte)(((word - (c1 * base85_1)) / base85_2) & 0xFF);
   byte c3 =
  @@ -141,6 +140,22 @@
   (byte)(c3 + ASCII85_START), (byte)(c4 + ASCII85_START),
   (byte)(c5 + ASCII85_START)
   };
  +*/
  +
  +byte c5 = (byte)((word % base85_4) + ASCII85_START);
  +word = word / base85_4;
  +byte c4 = (byte)((word % base85_4) + ASCII85_START);
  +word = word / base85_4;
  +byte c3 = (byte)((word % base85_4) + ASCII85_START);
  +word = word / base85_4;
  +byte c2 = (byte)((word % base85_4) + ASCII85_START);
  +word = word / base85_4;
  +byte c1 = (byte)((word % base85_4) + ASCII85_START);
  +
  +byte[] ret = {
  +  c1 , c2, c3, c4, c5
  +};
  +
   for (int i = 0; i < ret.length; i++) {
   if (ret[i] < 33 || ret[i] > 117) {
   System.out.println("illegal char value "
  
  
  

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




cvs commit: xml-fop/src/org/apache/fop/image/analyser EPSReader.java

2002-08-01 Thread keiron

keiron  2002/08/01 23:44:46

  Modified:src/org/apache/fop/image/analyser EPSReader.java
  Log:
  workaround for eps files that have invalid float bounding box values
  float values are rounded off
  according to the spec the %%HiResBoundingBox should be used
  instead for floating poitn values
  Submitted by: Torsten Erler <[EMAIL PROTECTED]>
  
  Revision  ChangesPath
  1.6   +14 -6 xml-fop/src/org/apache/fop/image/analyser/EPSReader.java
  
  Index: EPSReader.java
  ===
  RCS file: /home/cvs/xml-fop/src/org/apache/fop/image/analyser/EPSReader.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- EPSReader.java19 May 2002 16:39:08 -  1.5
  +++ EPSReader.java2 Aug 2002 06:44:46 -   1.6
  @@ -170,20 +170,29 @@
   }
   
   private int readLongString(EPSImage.EPSData data, long[] mbbox, int i, int idx) 
{
  -while (idx < data.epsFile.length && (data.epsFile[idx] == 32))
  -idx++;
  +while (idx < data.epsFile.length && (data.epsFile[idx] == 32)) {
  +   idx++;
  +}
   
   int nidx = idx;
   
  +// check also for ANSI46(".") to identify floating point values
   while (nidx < data.epsFile.length &&
   ((data.epsFile[nidx] >= 48 && data.epsFile[nidx] <= 57) ||
  -(data.epsFile[nidx] == 45)))
  +(data.epsFile[nidx] == 45) || (data.epsFile[nidx] == 46) )) {
   nidx++;
  +}
   
   byte[] num = new byte[nidx - idx];
   System.arraycopy(data.epsFile, idx, num, 0, nidx - idx);
   String ns = new String(num);
  -mbbox[i] = Long.parseLong(ns);
  +
  +//if( ns.indexOf(".") != -1 ) {
  +// do something like logging a warning
  +//}
  +
  +// then parse the double and round off to the next math. Integer
  +mbbox[i] = (long) Math.ceil( Double.parseDouble( ns ) );
   
   return (1 + nidx - idx);
   }
  @@ -191,6 +200,5 @@
   public String getMimeType() {
   return "image/eps";
   }
  -
   }
   
  
  
  

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




cvs commit: xml-fop/src/org/apache/fop/layout/hyphenation Hyphenator.java

2002-08-01 Thread keiron

keiron  2002/08/01 23:31:24

  Modified:src/org/apache/fop/layout/hyphenation Hyphenator.java
  Log:
  use buffered stream
  
  Revision  ChangesPath
  1.7   +2 -2  xml-fop/src/org/apache/fop/layout/hyphenation/Hyphenator.java
  
  Index: Hyphenator.java
  ===
  RCS file: /home/cvs/xml-fop/src/org/apache/fop/layout/hyphenation/Hyphenator.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- Hyphenator.java   22 Nov 2001 07:11:40 -  1.6
  +++ Hyphenator.java   2 Aug 2002 06:31:24 -   1.7
  @@ -151,7 +151,7 @@
   if (hyphenFile.exists()) {
   ObjectInputStream ois = null;
   try {
  -ois = new ObjectInputStream(new FileInputStream(hyphenFile));
  +ois = new ObjectInputStream(new BufferedInputStream(new 
FileInputStream(hyphenFile)));
   hTree = (HyphenationTree)ois.readObject();
   } catch (Exception e) {
   e.printStackTrace();
  
  
  

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Re: Correction: Leaders and leader-length in justified blocks

2002-08-01 Thread Peter B. West

pietsch,

(I've moved this part to fop-dev.)

I have just whiled away a few hours looking at this.  In terms of what 
it should do, the spec says, in 7.21.4 "leader-length"


NOTE:

User agents may choose to use the value of "leader-length.optimum" to 
determine where to break the line, then use the minimum and maximum 
values during line justification.

Leader length values such as:

leader-length.minimum="0pt"
leader-length.optimum="12pt"
leader-length.maximum="100%"

would specify constraints that would cause the leader to fill all 
available space within the current line area as part of the process of 
justifying that line area.

NOTE:

... a leader formatting object's length-range provides further 
flexibility to the justification process. Though any result that 
satisfies the specified constraints would conform to this specification, 
current typographic practice would tend to make use of leader length 
flexibility in preference to other flexibility (e.g. word spaces) within 
the same line area when justifying the line...



As I read that, the maximum value does not come into play unless and 
until the line is being justified, whether by virtue of a text-align or 
a tex-align-last.  The decision on how many fo:s fit on a line is taken 
w.r.t. the optimum.  The implication here is that there will generally 
not be a great difference between the optimum and the actual value used. 
  However, if you are constructing a series of last-lines with, say,
text...page-number
the difference is irrelevant.  It has already been determined that the 
optimum fits on the line.  The justification process then pads out the 
line from the fo:leader, according to the Note from the spec., ignoring 
word spaces.

If the code you quote is part of the line justification, it would be 
ignoring minimum because the line breaking has already found that the 
optimum will fit.

That still leaves some odd code, as you say.  The relation
  minimum <= optimum <= maximum

should always hold, and should be tested up front.  If true, the code 
above becomes

if (remainingWidth <= leaderLengthOptimum)
leaderLength = remainingWidth;
else if (remainingWidth > leaderLengthMaximum)
leaderLength = leaderLengthMaximum;

and the last condition (leaderLengthOptimum > leaderLengthMaximum) can 
never be true.  The author assumes, no doubt correctly, that the 
min/opt/max relationship cannot be guaranteed from elsewhere. However, 
that responsibility should be shifted into the basic compound handling 
code, if only to simplify code like the above.

Peter


J.Pietschmann wrote:
> Thibodeaux, Paul wrote:
> 
>> Correction - it doesn't throw in w fixed length, but it seems to use the
>> MAXIMUM rather than the OPTIMUM.
>>
>> I would have thought that it would respect the JUSTIFY and use OPTIMUM.
>>
>> Any good online explanation of how this works?
> 
> 
> How it works in FOP or how it should work?
> The implementation is in Linearea.java.
> Here is the code for computing the leader length:
>/**
> * checks whether leaderLenghtOptimum fits into rest of line;
> * should never overflow, as it has been checked already in BlockArea
> * first check: use remaining width if it smaller than optimum oder 
> maximum
> */
>if ((remainingWidth <= leaderLengthOptimum)
>|| (remainingWidth <= leaderLengthMaximum)) {
>leaderLength = remainingWidth;
>} else if ((remainingWidth > leaderLengthOptimum)
>   && (remainingWidth > leaderLengthMaximum)) {
>leaderLength = leaderLengthMaximum;
>} else if ((leaderLengthOptimum > leaderLengthMaximum)
>   && (leaderLengthOptimum < remainingWidth)) {
>leaderLength = leaderLengthOptimum;
>}
> The .minimum is not used at all.
> The code looks a bit odd, but I couldn't quite figure what
> it should look like. The wiggle room provided by leaders is
> not used for justifying the line (except for space leaders),
> only spaces are used.

-- 
Peter B. West  [EMAIL PROTECTED]  http://powerup.com.au/~pbwest
"Lord, to whom shall we go?"


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]




DO NOT REPLY [Bug 11247] - Error encountered in converting ttf file in FOP

2002-08-01 Thread bugzilla

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=11247

Error encountered in converting ttf file in FOP





--- Additional Comments From [EMAIL PROTECTED]  2002-08-02 01:12 ---
for more information,

can I use your FOP to generate the PScript and then directly forward to client 
browser for printing.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]




DO NOT REPLY [Bug 11247] - Error encountered in converting ttf file in FOP

2002-08-01 Thread bugzilla

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=11247

Error encountered in converting ttf file in FOP





--- Additional Comments From [EMAIL PROTECTED]  2002-08-02 01:00 ---
one more question,

is it possible to generate the chinese PDF file in version 1.2 which can be 
viewed by arcobat 3.0.

Many thanks

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]




[PDF Viewer] Utility request - Followup

2002-08-01 Thread Kevin O'Neill

> >But, how much worth is a creator, without a viewer. In 90% of the
> >applications the needs come to launch the viewer to be part of the
> >application. No user prefers the print the PDF outside and again open the
> >Acrobat Reader to see it. This lessens the competitiveness of the product.
> >FOP beautifully caters to the creation of PDF, but a viewer is very much
> >worthy and I'm sure the FOP with a viewer definitely strikes.

While having my morning coffee I came across this:

 http://sourceforge.net/projects/jpedal/

One of the features is a PDF rasterizer that looks as though it could be
used to create a PDF viewer

-k. 


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]




JDK 1.2 containers in maintenance branch

2002-08-01 Thread J.Pietschmann

Hi all,
I've replaced most of the JDK 1.0 containers by 1.2 containers
in the maintenance branch, ready to commit. The PDF produced
from FOP examples compares ok with PDF produced before the
conversion. I might have screwed up other renderers, in
particular the MIF renderer which required quite a bit more
than a simple S&R. I might also have produced additional
MT problems, even though I set FOPImageFactory to synchronized.

As a side note, I made a script which intercepts GC notifications
produced with -verbose:gc and computes total and peak memory.
If this can be trusted, using 1.2 containers causes FOP to use
2% less total as well as peak memory. Run time performance is
basically the same, apparently Java synchronization doesn't
have much effect in a single-threaded environment.

If there are no vetoes, I'll commit the change on 2002-08-02,
21:00 CEDST.

My plans for the near and not so near future:
- vacancy: I'm offline until 2002-08-11
- tracking down the zero width space problem
- eleminating the instance data of FONode and as much
   as possible data of FObj
- create the "children" array on demand
- resolve doc issues and commit the docs
(take deep breath)
- implement immutable, reused property bundles and leaner
   property parsing
- integrate image handling and the PDF renderer from head
- TR14, spec conformant whitespace handling, linefeed treatment,
   wrapping and overflow="clip"
- rearranging the Area inheritance tree (spaces don't have
   a height, which is bad), eleminate as much as possible
   unnecessarily inherited data for inline areas
- correct lineheight computation and alignment.
Should be enough work...

J.Pietschmann


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]




DO NOT REPLY [Bug 11357] - ASCII85Filter.convertWord() method does not work properly within specific environment

2002-08-01 Thread bugzilla

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=11357

ASCII85Filter.convertWord() method does not work properly within specific environment

[EMAIL PROTECTED] changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||WONTFIX



--- Additional Comments From [EMAIL PROTECTED]  2002-08-01 20:46 ---
I committed a simplified version of the conversion code to the maintenance
branch, which will hopefully circumvent the JVM bug.
Anyway, you should get the JVM bug fixed.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]




Re: real-life "big" document example, add it to the samples?

2002-08-01 Thread J.Pietschmann

Here are the errors I noticed  the output for formatting this document:
[ERROR] property 'fant-family' ignored
[WARNING] table-layout=auto is not supported, using fixed!
[ERROR] Error while creating area : Error while recovering
  Image Informations ... d:/apps/messaging_service/sig_LA.jpg
[ERROR] unknown font times,normal,normal so defaulted font to any
[ERROR] no footnote-body in footnote

In particular the footnote seems to be seriously screwed up.
I think this needs a bit of polishing if it's really to be
committed to the examples.

I'd really like to see an example with a user font. Does
someone know of a small and freely distributable font
which could be used for this purpose? Big bonus points
for one of these pesky barcode fonts!

J.Pietschmann


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]




cvs commit: xml-fop/src/org/apache/fop/pdf ASCII85Filter.java

2002-08-01 Thread pietsch

pietsch 2002/08/01 07:52:49

  Modified:src/org/apache/fop/pdf Tag: fop-0_20_2-maintain
ASCII85Filter.java
  Log:
  Simplified ASCII85Filter computation, thereby hopefully
  working around JVM bugs
  
  Revision  ChangesPath
  No   revision
  
  
  No   revision
  
  
  1.3.2.2   +30 -18xml-fop/src/org/apache/fop/pdf/ASCII85Filter.java
  
  Index: ASCII85Filter.java
  ===
  RCS file: /home/cvs/xml-fop/src/org/apache/fop/pdf/ASCII85Filter.java,v
  retrieving revision 1.3.2.1
  retrieving revision 1.3.2.2
  diff -u -r1.3.2.1 -r1.3.2.2
  --- ASCII85Filter.java31 May 2002 00:17:16 -  1.3.2.1
  +++ ASCII85Filter.java1 Aug 2002 14:52:49 -   1.3.2.2
  @@ -17,9 +17,9 @@
   private static final String ASCII85_EOD = "~>";
   
   private static final long base85_4 = 85;
  -private static final long base85_3 = base85_4 * base85_4;
  -private static final long base85_2 = base85_3 * base85_4;
  -private static final long base85_1 = base85_2 * base85_4;
  +//  private static final long base85_3 = base85_4 * base85_4;
  +//  private static final long base85_2 = base85_3 * base85_4;
  +//  private static final long base85_1 = base85_2 * base85_4;
   
   
   
  @@ -131,22 +131,34 @@
   };
   return result;
   } else {
  -byte c1 = (byte)((word / base85_1) & 0xFF);
  -byte c2 = (byte)(((word - (c1 * base85_1)) / base85_2) & 0xFF);
  -byte c3 =
  -(byte)(((word - (c1 * base85_1) - (c2 * base85_2)) / base85_3)
  -   & 0xFF);
  -byte c4 =
  -(byte)(((word - (c1 * base85_1) - (c2 * base85_2) - (c3 * 
base85_3)) / base85_4)
  -   & 0xFF);
  -byte c5 =
  -(byte)(((word - (c1 * base85_1) - (c2 * base85_2) - (c3 * base85_3) 
- (c4 * base85_4)))
  -   & 0xFF);
  +//  byte c1 = (byte)((word / base85_1) & 0xFF);
  +//  byte c2 = (byte)(((word - (c1 * base85_1)) / base85_2) & 0xFF);
  +//  byte c3 =
  +//  (byte)(((word - (c1 * base85_1) - (c2 * base85_2)) / base85_3)
  +// & 0xFF);
  +//  byte c4 =
  +//  (byte)(((word - (c1 * base85_1) - (c2 * base85_2) - (c3 * 
base85_3)) / base85_4)
  +// & 0xFF);
  +//  byte c5 =
  +//  (byte)(((word - (c1 * base85_1) - (c2 * base85_2) - (c3 * 
base85_3) - (c4 * base85_4)))
  +// & 0xFF);
  +
  +//  byte[] ret = {
  +//  (byte)(c1 + ASCII85_START), (byte)(c2 + ASCII85_START),
  +//  (byte)(c3 + ASCII85_START), (byte)(c4 + ASCII85_START),
  +//  (byte)(c5 + ASCII85_START)
  +byte c5 = (byte)((word % base85_4) + ASCII85_START);
  +word = word / base85_4;
  +byte c4 = (byte)((word % base85_4) + ASCII85_START);
  +word = word / base85_4;
  +byte c3 = (byte)((word % base85_4) + ASCII85_START);
  +word = word / base85_4;
  +byte c2 = (byte)((word % base85_4) + ASCII85_START);
  +word = word / base85_4;
  +byte c1 = (byte)((word % base85_4) + ASCII85_START);
   
   byte[] ret = {
  -(byte)(c1 + ASCII85_START), (byte)(c2 + ASCII85_START),
  -(byte)(c3 + ASCII85_START), (byte)(c4 + ASCII85_START),
  -(byte)(c5 + ASCII85_START)
  +  c1 , c2, c3, c4, c5
   };
   for (int i = 0; i < ret.length; i++) {
   if (ret[i] < 33 || ret[i] > 117) {
  
  
  

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




cvs commit: xml-fop/src/org/apache/fop/fo Properties.java

2002-08-01 Thread pbwest

pbwest  2002/08/01 07:12:21

  Modified:src/org/apache/fop/fo Tag: FOP_0-20-0_Alt-Design
Properties.java
  Log:
  Added margin shorthand.  Added Properties.autoOrDistance() for margin shorthand 
processing.
  
  Revision  ChangesPath
  No   revision
  
  
  No   revision
  
  
  1.1.2.17  +128 -11   xml-fop/src/org/apache/fop/fo/Attic/Properties.java
  
  Index: Properties.java
  ===
  RCS file: /home/cvs/xml-fop/src/org/apache/fop/fo/Attic/Properties.java,v
  retrieving revision 1.1.2.16
  retrieving revision 1.1.2.17
  diff -u -r1.1.2.16 -r1.1.2.17
  --- Properties.java   1 Aug 2002 03:59:56 -   1.1.2.16
  +++ Properties.java   1 Aug 2002 14:12:20 -   1.1.2.17
  @@ -644,6 +644,40 @@
   }
   
   /**
  + * @param value PropertyValue the value being tested
  + * @param property int property index of returned value
  + * @return PropertyValue the same value, with its property set
  + *  to the property argument, if it is an Auto or a
  + * Numeric distance
  + * @exception PropertyException if the conditions are not met
  + */
  +protected static PropertyValue autoOrDistance
  +(PropertyValue value, int property)
  +throws PropertyException
  +{
  +if (value instanceof Auto ||
  +value instanceof Numeric && ((Numeric)value).isDistance()) {
  +value.setProperty(property);
  +return value;
  +}
  +else throw new PropertyException
  +("Value not 'Auto' or a distance for "
  ++ PropNames.getPropertyName(value.getProperty()));
  +}
  +
  +/**
  + * @param value PropertyValue the value being tested
  + * @return PropertyValue the same value if it is an Auto or a
  + * Numeric distance
  + * @exception PropertyException if the conditions are not met
  + */
  +protected static PropertyValue autoOrDistance(PropertyValue value)
  +throws PropertyException
  +{
  +return autoOrDistance(value, value.getProperty());
  +}
  +
  +/**
* Pseudo-property class for common border style values occurring in a
* number of classes.
*/
  @@ -2346,9 +2380,9 @@
   
   list = new PropertyValueList(PropNames.BORDER_COLOR);
   list.add(top);
  -list.add(left);
  -list.add(bottom);
   list.add(right);
  +list.add(bottom);
  +list.add(left);
   // Question: if less than four colors have been specified in
   // the shorthand, what border-?-color properties, if any,
   // have been specified?
  @@ -2754,7 +2788,8 @@
   public static PropertyValue getInitialValue(int property)
   throws PropertyException
   {
  -return new ColorType (PropNames.BACKGROUND_COLOR, ColorCommon.BLACK);
  +return
  +new ColorType(PropNames.BACKGROUND_COLOR, ColorCommon.BLACK);
   }
   
   public static final ROStringArray enums = ColorCommon.enums;
  @@ -2949,9 +2984,9 @@
   
   list = new PropertyValueList(PropNames.BORDER_STYLE);
   list.add(top);
  -list.add(left);
  -list.add(bottom);
   list.add(right);
  +list.add(bottom);
  +list.add(left);
   // Question: if less than four styles have been specified in
   // the shorthand, what border-?-style properties, if any,
   // have been specified?
  @@ -3177,9 +3212,9 @@
   
   list = new PropertyValueList(PropNames.BORDER_WIDTH);
   list.add(top);
  -list.add(left);
  -list.add(bottom);
   list.add(right);
  +list.add(bottom);
  +list.add(left);
   // Question: if less than four widths have been specified in
   // the shorthand, what border-?-width properties, if any,
   // have been specified?
  @@ -5300,6 +5335,88 @@
   public static final int traitMapping = SHORTHAND_MAP;
   public static final int initialValueType = NOTYPE_IT;
   public static final int inherited = NO;
  +
  +/**
  + * 'value' is a PropertyValueList or an individual PropertyValue.
  + *
  + * If 'value' is an individual PropertyValue, it must contain
  + * either
  + *   a FromParent value,
  + *   a FromNearestSpecified value,
  + *   an Inherit value,
  + *   an Auto value,
  + *   a Numeric value which is a distance, rather than a number.
  + *
  + * If 'value' 

Re: table overflow and markers on 20.2

2002-08-01 Thread J.Pietschmann

[EMAIL PROTECTED] wrote:
>  but I thought these were a function of the unfinished markers in 20.2.

I still don't know what "these" refers to, and
what function is meant.

J.Pietschmann



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]




Re: table overflow and markers on 20.2

2002-08-01 Thread Louis . Masters


J.Pietschmann:

Let me restate the line:

 > but I thought these were a function of markers in 20.2.

as

 but I thought these were a function of the unfinished markers in 20.2.

Sorry if I offended.  Thanks for the info.
-Lou






"J.Pietschmann" <[EMAIL PROTECTED]> on 08/01/2002 09:30:29

Please respond to [EMAIL PROTECTED]

To:   [EMAIL PROTECTED]
cc:

Subject:  Re: table overflow and markers on 20.2

[EMAIL PROTECTED] wrote:
> The markers work fine
> except in one instance:  if ROW4 and ROW5 overflow into the next page,
the
> retrieve marker will pull ROW5MARKERDATA1 and ignore ROW4MARKERDATA1 even
> though ROW 4 is a distinctly new row.  If more than two rows overflow, it
> seems to work OK (i.e. if ROW3,ROW4 and ROW5 overflow, it pulls from
ROW3).

This could have something to do with the spilling
algorithm. The ROW4 is added to a page, with markers,
then it is discovered not to fit, the layout is undone
and the row goes onto the next page. It is quite
possible that markers aren't handled properly in this
case.
There *could* be problems with rendering areas if
the marker isn't the first child of the FO it marks,
though I was unsuccessful so far to construct one.


> I do get several "ERROR  [fop]:fo:marker
> must be an initial child,and 'marker-class-name' must be unique for same
> parent" messages,

Markers which cause the latter message are ignored. You should
fix these errors.
The first message can already be caused by whitespace preceding
the marker, like
   
 
(you see the whitespace, don't you?)
This is usually not a real pressing problem, though it is
always advisable to fix error messages as well as warnings,
lest you ignore something important.

 > but I thought these were a function of markers in 20.2.
Duh?

J.Pietschmann


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]









-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]




Re: table overflow and markers on 20.2

2002-08-01 Thread J.Pietschmann

[EMAIL PROTECTED] wrote:
> The markers work fine
> except in one instance:  if ROW4 and ROW5 overflow into the next page, the
> retrieve marker will pull ROW5MARKERDATA1 and ignore ROW4MARKERDATA1 even
> though ROW 4 is a distinctly new row.  If more than two rows overflow, it
> seems to work OK (i.e. if ROW3,ROW4 and ROW5 overflow, it pulls from ROW3).

This could have something to do with the spilling
algorithm. The ROW4 is added to a page, with markers,
then it is discovered not to fit, the layout is undone
and the row goes onto the next page. It is quite
possible that markers aren't handled properly in this
case.
There *could* be problems with rendering areas if
the marker isn't the first child of the FO it marks,
though I was unsuccessful so far to construct one.


> I do get several "ERROR  [fop]:fo:marker
> must be an initial child,and 'marker-class-name' must be unique for same
> parent" messages,

Markers which cause the latter message are ignored. You should
fix these errors.
The first message can already be caused by whitespace preceding
the marker, like
   
 
(you see the whitespace, don't you?)
This is usually not a real pressing problem, though it is
always advisable to fix error messages as well as warnings,
lest you ignore something important.

 > but I thought these were a function of markers in 20.2.
Duh?

J.Pietschmann


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]




RE: FOP Specialized Classloader

2002-08-01 Thread Rhett Aultman

I've posted a new attachment to the classloader improvement issue with a casual 
proposal of the format for the "rules document" mentioned in the inital proposal.  
Comments are welcome.  Barring any disagreements with my ideas, I'll get to writing a 
DTD for the format and start building a "rule tree generator" for the classloader to 
use.

-Original Message-
From: Keiron Liddle [mailto:[EMAIL PROTECTED]]
Sent: Monday, July 22, 2002 11:50 AM
To: FOP
Subject: RE: FOP Specialized Classloader


Hi,

If I remember correctly (and read the right archive messages) the
original trigger was the jdk1.3 specific code for AWT fonts. Suggesting
the need to handle jdk version specific issues.
There are a number of potential issues.
For jdk1.4 I recently discovered they have image IO classes that use JAI
in the background. There is also the PDFGraphicsConfiguration class
(this has the added problem that both jdk1.4 and pre-jdk1.4 versions
cannot be compiled by the same compiler).

So there are issues that need to be dealt with, the question then is
what is the best way: a runtime classloader solution or a compile time
solution.
Run time (if it works well) is better for distribution and users.

>From what I have seen most of the "Classloader problems" occur due to
the classloader not properly implementing something and when classes it
loads load other libraries it can get into trouble.

It feels to me like a separate project: for example a wrapper that loads
the jar, the default jar contains the all the classes for normal use and
other jars contain a subset of classes for particular jdk versions, the
configuration determines what jar contains classes for particular jdks.
But it still needs a place to start.

Sorry I can't give a definite yes or no answer. Will it be useful, quite
possibly. Will it cause trouble, I don't think so. Is it the best
solution, no idea.

Hope that helps.
Keiron.

On Fri, 2002-07-19 at 21:09, Rhett Aultman wrote:
> I'm content being on my own.  I just don't want to end up building something that 
>nobody wants or needs, which was really why I'd put up a proposal and asked for 
>comments.  Honestly, the thumbs-up I was looking for was from someone like Keiron so 
>that I'd know it was believed that I was correctly addressing an issue that needs 
>addressing.  The majority of the work on the classloader will be pretty easy stuff, 
>and I can even take on the "splitting" system-dependant classes into their 
>version-specific components and so forth.  And write documentation on how to do that.
> 
> I was just hoping that I could get a word from a higher-up or two that there was an 
>interest in this being pursued.  That you've suggested I go for it is definitely 
>encouraging.  Anyone else want to throw in?  Any +1s, gang?
> 
> -Original Message-
> From: Peter B. West [mailto:[EMAIL PROTECTED]]
> Rhett,
> 
> Judging by the deafening silence, I would say you are on your own on 
> this one.  You may take heart from the fact that no-one has said 
> "Don't!"  So go for it.  If you don't do it, nobody will.  However, It 
> would probably be a good idea to send a message to the other Apache Java 
> projects, briefly outlining what you are thinking about.  It may be that 
> similar efforts are underway elsewhere.
> 
> One of the more experienced devops like Keiron may be able to make more 
> informed comments on this.
> 
> Peter



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]




DO NOT REPLY [Bug 10379] - Improvement to FOP Classloader

2002-08-01 Thread bugzilla

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=10379

Improvement to FOP Classloader





--- Additional Comments From [EMAIL PROTECTED]  2002-08-01 13:17 ---
Created an attachment (id=2557)
Proposal for classloader "rules document"

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]




table overflow and markers on 20.2

2002-08-01 Thread Louis . Masters

I just experienced some bizarre marker/table behavior that I hope someone
can shed some light on.  I am using fop 0.20.2.  Here is the scenario:

Say I have a table that has rows of data and marker data:

ROW1DATA1ROW1DATA2ROW1DATA3ROW1MARKERDATA1
ROW2DATA1ROW2DATA2ROW2DATA3ROW2MARKERDATA1
ROW3DATA1ROW3DATA2ROW3DATA3ROW3MARKERDATA1
ROW4DATA1ROW4DATA2ROW4DATA3ROW4MARKERDATA1
ROW5DATA1ROW5DATA2ROW5DATA3ROW5MARKERDATA1

The marker data is being used for running headers on each page
(retrieve-position=first-starting-within-page).  The markers work fine
except in one instance:  if ROW4 and ROW5 overflow into the next page, the
retrieve marker will pull ROW5MARKERDATA1 and ignore ROW4MARKERDATA1 even
though ROW 4 is a distinctly new row.  If more than two rows overflow, it
seems to work OK (i.e. if ROW3,ROW4 and ROW5 overflow, it pulls from ROW3).

Am I doing something wrong here?  I do get several "ERROR  [fop]:fo:marker
must be an initial child,and 'marker-class-name' must be unique for same
parent" messages, but I thought these were a function of markers in 20.2.

-Lou



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]




patch EPSReader (BoundingBox)

2002-08-01 Thread Torsten Erler

Hi

, I've a lot of (incorrect) ps-files produced from a foreign app. The files
have BoundingBox values like:

%%BoundingBox: 0.0 0.0 139.0 25.8239998

I know that it isn't conform with the spec, which requires
%%HiResBoundingBox for floating point values, but I think it is a little bit
to restrictive to ignore this file totally on rendering (Image Area has 0x0
dimension).
I think we should warn the user, that the postscript file has a failure, but
we should preserve the space in the document with round off Integers.

Here is the modified code, which seems to be working fine.

// - code snip
private int readLongString(long[] mbbox, int i, int idx) {
while (idx < epsFile.length &&
   (epsFile[idx] == 32))
   idx++;

int nidx = idx;

while (nidx < epsFile.length &&
((epsFile[nidx] >= 48 && epsFile[nidx] <= 57) ||
(epsFile[nidx] == 45) || (epsFile[nidx] == 46) ))//here check
also for ANSI46(".") to identify floating point values
nidx++;

byte[] num = new byte[nidx - idx];
System.arraycopy(epsFile, idx, num, 0, nidx-idx);
String ns = new String(num);

if( ns.indexOf(".") > -1 )
{
//here do something like logging a warning
}

mbbox[i] = (long) Math.ceil( Double.parseDouble( ns ) );//then parse 
the
double and round off to the next math. Integer

return (1 + nidx - idx);
}
// - end code snip

It were great if any commiter can put this into the original file.

cu Torsten
-
Unless otherwise indicated, this e-mail and any attachments hereto contain
information which is confidential and/or protected by intellectual property
rights and are intended for the sole use of the recipient(s) named above
under terms of confidentiality nd non-use agreements. Any use of the
information contained herein (including, but not limited to, total or
partial reproduction, communication or distribution in any form) by persons
other than the designated recipient(s) or for purposes not permitted by such
agreements, is prohibited. If you have received this e-mail in error, please
notify the sender either by telephone or by e-mail and delete the material
from any computer. Thank you for your cooperation.
-


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]




DO NOT REPLY [Bug 11247] - Error encountered in converting ttf file in FOP

2002-08-01 Thread bugzilla

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=11247

Error encountered in converting ttf file in FOP





--- Additional Comments From [EMAIL PROTECTED]  2002-08-01 12:09 ---
You can't extract fonts which are not in the font collection. Try
 -ttcname "MingLiU"

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]




AW: Adding Arial font support

2002-08-01 Thread J.U. Anderegg

from PDF Reference p.319

Standard Type 1 Fonts

The PostScript names of 14 Type 1 fonts, known as the standard fonts, are as
follows:

1  Helvetica"Sans-Serif"
2  Helvetica?Bold
3  Helvetica?Oblique
4  Helvetica?BoldOblique
5  Times?Roman  "Serif"
6  Times?Bold
7  Times?Italic
8  Times?BoldItalic
9  Courier  "MonoSpaced
10 Courier?Bold
11 Courier?Oblique
12 Courier?BoldOblique
"Symbol"
13 Symbol
14 ZapfDingbats

These fonts, or their font metrics and suitable substitution fonts, are
guaranteed
to be available to the viewer application.

+-+-+--+
-+
| Postscript Fonts  |  XSL:FO properties
|| |
+-+-+--+
-+
| F1  |Helvetica|  "Helvetica" | "sans-serif", "normal",
"normal"|
| F2  |HelveticaOblique |  "Helvetica" | "sans-serif", "oblique",
"normal"   |
| | |  "Helvetica" | "sans-serif", "italic",
"normal"|
| F3  |HelveticaBold|  "Helvetica" | "sans-serif", "normal",
"bold"  |
| F4  |HelveticaBoldOblique |  "Helvetica" | "sans-serif", "oblique",
"bold" |
| | |  "Helvetica" | "sans-serif", "italic",
"bold"  |
| F5  |TimesRoman   |  "Times" | "serif", "normal", "normal"
|
| F6  |TimesItalic  |  "Times" | "serif", "oblique",
"normal"|
| | |  "Times" | "serif", "italic", "normal"
|
| F7  |TimesBold|  "Times" | "serif", "normal", "bold"
|
| F8  |TimesBoldItalic  |  "Times" | "serif", "oblique", "bold"
|
| | |  "Times" | "serif", "italic", "bold"
|
| F9  |Courier  |  "Courier| "monospace", "normal",
"normal" |
| F10 |CourierOblique   |  "Courier| "monospace", "oblique",
"normal"|
| | |  "Courier| "monospace", "italic",
"normal" |
| F11 |CourierBold  |  "Courier| "monospace", "normal",
"bold"   |
| F12 |CourierBoldOblique   |  "Courier| "monospace", "oblique",
"bold"  |
| | |  "Courier| "monospace", "italic",
"bold"   |
| F13 |Symbol   |  "Symbol"|
|
| F14 |ZapfDingbats |  "ZapfDingbats"  |
|
+-+-+--+
-+


__


from PDF Reference p.319


Table H.3 shows the complete list of font names that are accepted as the
names of standard fonts. In each group, the ?rst name (for example,
Helvetica) is the proper one; the others (Arial, ArialMT) are alternatives.

TABLE H.3 Names of standard fonts

Times?Roman Helvetica   Courier
TimesNewRoman   Arial   CourierNew
TimesNewRomanPS ArialMT CourierNewPSMT
TimesNewRomanPSMT

Times?Bold  Helvetica?Bold  Courier?Bold
TimesNewRoman?Bold  Helvetica,Bold  Courier,Bold
TimesNewRoman,Bold  Arial?Bold  CourierNew?Bold
TimesNewRomanPS?BoldArial,Bold  CourierNew,Bold
TimesNewRomanPS?BoldMT  Arial?BoldMTCourierNewPS?BoldMT

Times?ItalicHelvetica?Oblique   Courier?Oblique
TimesNewRoman?ItalicHelvetica?ItalicCourier,Italic
TimesNewRoman,ItalicHelvetica,ItalicCourierNew?Italic
TimesNewRomanPS?Italic  Arial?ItalicCourierNew,Italic
TimesNewRomanPS?ItalicMTArial,ItalicCourierNewPS?ItalicMT
Arial?ItalicMT

Times?BoldItalicHelvetica?BoldOblique   Courier?BoldOblique
TimesNewRoman?BoldItalicHelvetica?BoldItalicCourier,BoldItalic
TimesNewRoman,BoldItalicHelvetica,BoldItalicCourierNew?BoldItalic
TimesNewRomanPS?BoldItalic  Arial?BoldItalicCourierNew,BoldItalic
TimesNewRomanPS?BoldItalicMTArial,BoldItalic
CourierNewPS?BoldItalicMT
Arial?BoldItalicMT

Symbol  ZapfDingbats


__

Conclusion: just use standard fonts unless you are going for a beauty
contest.

Hansuli Anderegg



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]




DO NOT REPLY [Bug 11247] - Error encountered in converting ttf file in FOP

2002-08-01 Thread bugzilla

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=11247

Error encountered in converting ttf file in FOP





--- Additional Comments From [EMAIL PROTECTED]  2002-08-01 10:36 ---
For the problem 2, I use the following command:

java -cp build/fop.jar:lib/xercesImpl-2.0.1.jar:lib/xml-apis.jar:lib/xalan-
2.3.1.jar:lib/batik.jar org.apache.fop.fonts.apps.TTFReader -ttcname "Ming 
Liu" /data/fop/fop-0.20.4/mingliu.ttc mingliu.xml

the result is:

TTF Reader v1.1.1

Reading /data/fop/fop-0.20.4/mingliu.ttc...

This is a TrueType collection file with2 fonts
Containing the following fonts: 
MingLiU
PMingLiU
java.io.IOException: Failed to read font
at java.lang.Throwable.fillInStackTrace(Native Method)
at java.lang.Throwable.fillInStackTrace(Compiled Code)
at java.lang.Throwable.(Compiled Code)
at java.lang.Exception.(Exception.java:42)
at java.io.IOException.(IOException.java:47)
at org.apache.fop.fonts.TTFFile.readFont(Unknown Source)
at org.apache.fop.fonts.apps.TTFReader.loadTTF(Unknown Source)
at org.apache.fop.fonts.apps.TTFReader.main(Unknown Source)

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]




DO NOT REPLY [Bug 11247] - Error encountered in converting ttf file in FOP

2002-08-01 Thread bugzilla

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=11247

Error encountered in converting ttf file in FOP

[EMAIL PROTECTED] changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||WORKSFORME



--- Additional Comments From [EMAIL PROTECTED]  2002-08-01 10:08 ---
Problem 1: Arialuni.ttf: I can't reproduce the problem. Check the Memory
 settingsof your JVM
Problem 2: mingliu.ttc: A ttc file is a collection of TrueType fonts, not
 a single font. You have to supply the font to extract with the -ttcname 
 option
Problem 3: Using a userconfig for a embedded FOP: this is a FAQ. Check the
 archives for the fop-user and fop-dev lists, as mentioned in the documentation
 delivered with the FOP binary distribution (docs/html-docs/ressources.html)

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]




RE: Adding Arial font support

2002-08-01 Thread RamanaJV

What's the relation between Arial and sans-serif,  I couldn't get u...

-Original Message-
From: PATEL, DINESH (ISD) [mailto:[EMAIL PROTECTED]]
Sent: Thursday, August 01, 2002 2:50 PM
To: '[EMAIL PROTECTED]'
Subject: RE: Adding Arial font support



Don't you get Arial font by default if you specify font-family="sans-serif"
?

> -Original Message-
> From: RamanaJV [SMTP:[EMAIL PROTECTED]]
> Sent: Thu 01 August 2002 07:13
> To:   [EMAIL PROTECTED]
> Subject:  Adding Arial font support
> 
> HI group,
>   Is it possible to add Arial font support to FOP?
> 
> Ramana.
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, email: [EMAIL PROTECTED]


This email and any accompanying documents are intended only for the named
recipient, are confidential and may be privileged. if you are not the
intended recipient please notify us immediately by
mailto:[EMAIL PROTECTED] and you must not copy, disclose or otherwise
use this message. Unauthorised use is strictly prohibited and may be
unlawful. The content of this email represents the view of the individual
and not the company. The company reserves the right to monitor the content
of all emails in accordance with lawful business practice.

Whilst attachments are virus checked before transmission, neither Britannic
Management Services Limited or the Britannic Group of companies accepts any
liability in respect of any virus which is not detected.

Britannic Management Services Limited, No.3588063 is registered in England
and maintains its registered office at 1 Wythall Green Way, Wythall,
Birmingham B47 6WG.
Telephone: 0870 887 0001
Fax: 0870 887 0002
Website: www.britannicassurance.com

Britannic Assurance plc, Britannic Unit Linked Assurance Limited, Britannic
Distribution and Sales Limited and Britannic Unit Trust Managers Limited are
regulated by the Financial Services Authority. Each of these companies is a
member of the Britannic marketing group which only advises on and sells its
own life assurance, pension, unit trust and ISA products.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]




RE: Adding Arial font support

2002-08-01 Thread PATEL, DINESH (ISD)


Don't you get Arial font by default if you specify font-family="sans-serif"
?

> -Original Message-
> From: RamanaJV [SMTP:[EMAIL PROTECTED]]
> Sent: Thu 01 August 2002 07:13
> To:   [EMAIL PROTECTED]
> Subject:  Adding Arial font support
> 
> HI group,
>   Is it possible to add Arial font support to FOP?
> 
> Ramana.
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, email: [EMAIL PROTECTED]


This email and any accompanying documents are intended only for the named recipient, 
are confidential and may be privileged. if you are not the intended recipient please 
notify us immediately by mailto:[EMAIL PROTECTED] and you must not copy, disclose 
or otherwise use this message. Unauthorised use is strictly prohibited and may be 
unlawful. The content of this email represents the view of the individual and not the 
company. The company reserves the right to monitor the content of all emails in 
accordance with lawful business practice.

Whilst attachments are virus checked before transmission, neither Britannic Management 
Services Limited or the Britannic Group of companies accepts any liability in respect 
of any virus which is not detected.

Britannic Management Services Limited, No.3588063 is registered in England and 
maintains its registered office at 1 Wythall Green Way, Wythall, Birmingham B47 6WG.
Telephone: 0870 887 0001
Fax: 0870 887 0002
Website: www.britannicassurance.com

Britannic Assurance plc, Britannic Unit Linked Assurance Limited, Britannic 
Distribution and Sales Limited and Britannic Unit Trust Managers Limited are regulated 
by the Financial Services Authority. Each of these companies is a member of the 
Britannic marketing group which only advises on and sells its own life assurance, 
pension, unit trust and ISA products.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]