[GUMP@lsd]: xml-fop-maintenance/xml-fop-maintenance failed

2004-03-16 Thread Sam Ruby
To whom it may engage...

This is an automated request, but not an unsolicited one. For help 
understanding the request please visit 
http://gump.apache.org/nagged.html, 
and/or contact [EMAIL PROTECTED]

Project xml-fop-maintenance has an issue affecting its community integration. The 
current state is 'Failed', for reason 'Configuration Failed'

Full details are available at: 
http://lsd.student.utwente.nl/gump/xml-fop-maintenance/xml-fop-maintenance.html, 
however some snippets follow:

-  -  -  -  - -- --  G U M P

Gump provided these annotations:

 - Info - Sole jar [/data3/gump/xml-fop-maintenance/build/fop.jar] identifier set to 
project name
 - Error - Failed with reason configuration failed
 - Error - Bad Dependency. Project: avalon-framework unknown to *this* workspace


To subscribe to this information via syndicated feeds:
RSS: http://lsd.student.utwente.nl/gump/xml-fop-maintenance/xml-fop-maintenance.rss | 
Atom: http://lsd.student.utwente.nl/gump/xml-fop-maintenance/xml-fop-maintenance.atom

--
Gump http://gump.apache.org/
[lsd]


[GUMP@lsd]: xml-fop/xml-fop failed

2004-03-16 Thread Sam Ruby
To whom it may engage...

This is an automated request, but not an unsolicited one. For help 
understanding the request please visit 
http://gump.apache.org/nagged.html, 
and/or contact [EMAIL PROTECTED]

Project xml-fop has an issue affecting its community integration. The current state is 
'Failed', for reason 'Configuration Failed'

Full details are available at: 
http://lsd.student.utwente.nl/gump/xml-fop/xml-fop.html, however some snippets follow:

-  -  -  -  - -- --  G U M P

Gump provided these annotations:

 - Info - Sole jar [/data3/gump/xml-fop/build/fop.jar] identifier set to project name
 - Error - Failed with reason configuration failed
 - Error - Bad Dependency. Project: avalon-framework unknown to *this* workspace


To subscribe to this information via syndicated feeds:
RSS: http://lsd.student.utwente.nl/gump/xml-fop/xml-fop.rss | Atom: 
http://lsd.student.utwente.nl/gump/xml-fop/xml-fop.atom

--
Gump http://gump.apache.org/
[lsd]


DO NOT REPLY [Bug 27727] New: - problem displaying Japanese fonts in PDF.

2004-03-16 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://issues.apache.org/bugzilla/show_bug.cgi?id=27727

problem displaying Japanese fonts in PDF.

   Summary: problem displaying Japanese fonts in PDF.
   Product: Fop
   Version: 0.15
  Platform: HP
OS/Version: Windows NT/2K
Status: NEW
  Severity: Major
  Priority: Other
 Component: pdf renderer
AssignedTo: [EMAIL PROTECTED]
ReportedBy: [EMAIL PROTECTED]


I have a problem while rendering XML containing unicode characters into japanese
characters.

   I am working on Weblogic 8.1 on NT OS. When the font
file(Msmincho.ttf) is placed in c:/winnt/fonts
directory the rendering works fine and pdf is
generated with Japanese Characters. But when the ttf
file is place in a different folder I get the
following exception even though I have made an entry in basedir element of
userconfig file.

java.lang.NullPointerException
at
org.apache.fop.render.pdf.fonts.LazyFont.getAscender(LazyFont.java:82)
at
org.apache.fop.layout.FontState.getAscender(FontState.java:56)
at
org.apache.fop.layout.LineArea.(LineArea.java:111)
at
org.apache.fop.layout.BlockArea.start(BlockArea.java:181)
at
org.apache.fop.fo.flow.Block.layout(Block.java:251)
at
org.apache.fop.fo.flow.TableCell.layout(TableCell.java:269)
at
org.apache.fop.fo.flow.TableRow.layout(TableRow.java:344)
at
org.apache.fop.fo.flow.TableBody.layout(TableBody.java:172)
at
org.apache.fop.fo.flow.Table.layout(Table.java:247)
at
org.apache.fop.fo.flow.Flow.layout(Flow.java:156)
at
org.apache.fop.fo.flow.Flow.layout(Flow.java:113)
at
org.apache.fop.fo.pagination.PageSequence.format(PageSequence.java:296)
at
org.apache.fop.apps.StreamRenderer.render(StreamRenderer.java:200)
at
org.apache.fop.fo.FOTreeBuilder.endElement(FOTreeBuilder.java:182)
at
org.apache.xerces.parsers.AbstractSAXParser.endElement(Unknown
Source)
at
org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanEndElement(Unknown
Source)
at
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown
Source)
at
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown
Source)
at
org.apache.xerces.parsers.DTDConfiguration.parse(Unknown
Source)
at
org.apache.xerces.parsers.DTDConfiguration.parse(Unknown
Source)
at
org.apache.xerces.parsers.XMLParser.parse(Unknown
Source)
at
org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown
Source)
at
org.apache.fop.apps.Driver.render(Driver.java:481)
at
org.apache.fop.apps.Driver.run(Driver.java:554)
at
com.db.eqr.ger.ui.web.company.pdf.GenerateMYPDF.createPDF(GenerateMYPDF.java:150)
at
com.db.eqr.ger.ui.web.company.pdf.CompanyPDFAction.execute(CompanyPDFAction.java:146)
at
org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:465)
at
org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:274)
at
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1422)
at
org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:523)
at
javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
at
javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at
weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run(ServletStubImpl.java:1053)
at
weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:387)
at
weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:28)
at
weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:27)


Can anyone help me out and let me know what could be the problem here.

 I have used the following userconfig file.








  
baseDir
c:/shyamajoshi/conf/fop
  


  







 
 
 
   
  
  
  
  
   

  








Regards,
Shyama


cvs commit: xml-fop/src/java/org/apache/fop/layoutmgr AddLMVisitor.java

2004-03-16 Thread gmazza
gmazza  2004/03/16 19:54:53

  Modified:src/java/org/apache/fop/layoutmgr AddLMVisitor.java
  Log:
  Unneeded line of code removed.
  
  Revision  ChangesPath
  1.33  +1 -2  xml-fop/src/java/org/apache/fop/layoutmgr/AddLMVisitor.java
  
  Index: AddLMVisitor.java
  ===
  RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/layoutmgr/AddLMVisitor.java,v
  retrieving revision 1.32
  retrieving revision 1.33
  diff -u -r1.32 -r1.33
  --- AddLMVisitor.java 12 Mar 2004 00:41:04 -  1.32
  +++ AddLMVisitor.java 17 Mar 2004 03:54:53 -  1.33
  @@ -189,7 +189,6 @@
   if (node.getChildren() != null) {
   InlineStackingLayoutManager lm;
   lm = new InlineStackingLayoutManager();
  -Document doc = (Document)node.getFOTreeControl();
   lm.setUserAgent(node.getUserAgent());
   lm.setFObj(node);
   lm.setLMiter(new LMiter(lm, node.getChildren()));
  
  
  

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



Re: Fonts and Document

2004-03-16 Thread Peter B. West
Jeremias,

See below...

Jeremias Maerki wrote:
The font subsystem is still far from finished. It's still quite complex
to understand, unnecessarily so IMO. My font source idea still need to
be implemented... Let's see if I can pull together some connectors.
I agree that it is complex to understand.

As you've seen the Document class is a central class in font handling.
It currently (not in my ideas) provides direct access to font metric
information and to the list of fonts actually used in a rendering run 
(we don't always want to embedd them all). The setup of all fonts is
done in the FontSetup class where the base 14 fonts are defined.
Additionally, custom fonts are added there. But the custom fonts are
mostly renderer-dependant, so at the moment, some font setup also takes
place in PDFRenderer for example. See PDFRenderer.configure (which
can build custom font information using an Avalon Configuration object
using a helper method from FontSetup) and PrintRenderer.setupFontInfo
which actually triggers the font setup. The fonts get registered with
the Document object and subsequently is available to the layout engine.
One of the complications is that Document wears so many hats.  I see a 
Document object referred to by the variable fontInfo in one place, and 
by the variable foTreeControl in another.  Document implements 
FOTreeControl, FOTreeListener and AreaTreeControl, so the foTreeControl 
variable looks deliberate, but the fontInfo may be a hangover.  In any 
case, wouldn't it be clearer to have such functions realized in separate 
objects which are created and managed by Document?

Most font classes in the fonts package deal with the different font
formats (single byte und unicode, base und custom...). There's also a
difference in audience: The layout needs different information (metrics
in particular) than the renderers (primarily information for using and
embedding the font in the target format.
This is my first close look at fonts, and I have browsed the 
java.awt.Font and java.awt.FontMetrics classes and the java.awt.font 
package.  In itself, this bundle of interfaces and classes is complex, 
but the nub of it seems to be the 2D font classes.  At first glance, 
there is a close connection between fonts, glyphs, strings, text 
attributes and line layout, all covered in these classes.

I am wondering if we cannot use the Java model as a basis for FOP's line 
 area layout API.  The discussion in 
http://java.sun.com/j2se/1.4.2/docs/guide/2d/spec/j2d-fonts.html#wp66677 
contains a discussion of implementing a custom text layout mechanism to 
enable features like kerning and ligatures.

My intention is to develop the initial alt-design layout using AWT 
rendering.  I assumed that I could get usable testing output more 
quickly that way, without having to delve into PDF.  My comments may 
simply be conditioned by that perception.  I'm not talking about 
adopting 1.4 (and 1.5 when it is stable), but using the API model where 
it provides appropriate methods for laying out text.  One implication of 
that would be a fairly intricate interaction between all the phases of 
FOP, involving the font details provided by the renderer.

However, I recall that Hansuli Anderegg has been working along these 
lines for some time now.

Btw, what search keys should I use to recover details of your font model 
from the archive, assuming there are differences between your model and 
the wiki?

Peter
--
Peter B. West 


cvs commit: xml-fop/src/java/org/apache/fop/layoutmgr TextLayoutManager.java

2004-03-16 Thread gmazza
gmazza  2004/03/16 19:37:32

  Modified:src/java/org/apache/fop/layoutmgr TextLayoutManager.java
  Log:
  minor simplifications; removed redundant variables.
  
  Revision  ChangesPath
  1.12  +37 -41xml-fop/src/java/org/apache/fop/layoutmgr/TextLayoutManager.java
  
  Index: TextLayoutManager.java
  ===
  RCS file: 
/home/cvs/xml-fop/src/java/org/apache/fop/layoutmgr/TextLayoutManager.java,v
  retrieving revision 1.11
  retrieving revision 1.12
  diff -u -r1.11 -r1.12
  --- TextLayoutManager.java12 Mar 2004 00:41:04 -  1.11
  +++ TextLayoutManager.java17 Mar 2004 03:37:32 -  1.12
  @@ -21,7 +21,6 @@
   import java.util.ArrayList;
   
   import org.apache.fop.fo.FOText;
  -import org.apache.fop.fo.TextInfo;
   import org.apache.fop.traits.SpaceVal;
   import org.apache.fop.area.Trait;
   import org.apache.fop.area.inline.InlineArea;
  @@ -63,9 +62,8 @@
   /** Non-space characters on which we can end a line. */
   private static final String BREAK_CHARS = "-/" ;
   
  +private FOText foText;
   private char[] textArray;
  -private int textArrayLength;
  -private TextInfo textInfo;
   
   private static final char NEWLINE = '\n';
   private static final char SPACE = '\u0020'; // Normal space
  @@ -95,25 +93,23 @@
   /**
* Create a Text layout manager.
*
  - * @param chars character array
  - * @param length length of the above array to be processed
  - * @param textInfo the text information for doing layout
  + * @param node The FOText object to be rendered
*/
   public TextLayoutManager(FOText node) {
   super(node);
  -this.textArray = new char[node.ca.length - node.start];
  -System.arraycopy(node.ca, node.start, this.textArray, 0,
  +foText = node;
  +textArray = new char[node.ca.length - node.start];
  +System.arraycopy(node.ca, node.start, textArray, 0,
   node.ca.length - node.start);
  -this.textArrayLength = node.ca.length - node.start;
  -this.textInfo = node.textInfo;
  -this.vecAreaInfo = new java.util.ArrayList();
  +
  +vecAreaInfo = new java.util.ArrayList();
   
   // With CID fonts, space isn't neccesary currentFontState.width(32)
  -spaceCharIPD = textInfo.fs.getCharWidth(' ');
  +spaceCharIPD = foText.textInfo.fs.getCharWidth(' ');
   // Use hyphenationChar property
  -hyphIPD = textInfo.fs.getCharWidth('-');
  +hyphIPD = foText.textInfo.fs.getCharWidth('-');
   // Make half-space:  on either side of a word-space)
  -SpaceVal ws = textInfo.wordSpacing;
  +SpaceVal ws = foText.textInfo.wordSpacing;
   halfWS = new SpaceVal(MinOptMax.multiply(ws.getSpace(), 0.5),
   ws.isConditional(), ws.isForcing(), ws.getPrecedence());
   }
  @@ -161,7 +157,7 @@
*/
   public boolean canBreakBefore(LayoutContext context) {
   char c = textArray[iNextStart];
  -return ((c == NEWLINE) || (textInfo.bWrap 
  +return ((c == NEWLINE) || (foText.textInfo.bWrap 
   && (CharUtilities.isBreakableSpace(c)
   || (BREAK_CHARS.indexOf(c) >= 0 && (iNextStart == 0 
   || Character.isLetterOrDigit(textArray[iNextStart-1]));
  @@ -205,15 +201,15 @@
   boolean bCanHyphenate = true;
   int iStopIndex = iNextStart + hc.getNextHyphPoint();
   
  -if (textArrayLength < iStopIndex || textInfo.bCanHyphenate == false) {
  -iStopIndex = textArrayLength;
  +if (textArray.length < iStopIndex || foText.textInfo.bCanHyphenate == 
false) {
  +iStopIndex = textArray.length;
   bCanHyphenate = false;
   }
   hc.updateOffset(iStopIndex - iNextStart);
   
   for (; iNextStart < iStopIndex; iNextStart++) {
   char c = textArray[iNextStart];
  -hyphIPD.opt += textInfo.fs.getCharWidth(c);
  +hyphIPD.opt += foText.textInfo.fs.getCharWidth(c);
   // letter-space?
   }
   // Need to include hyphen size too, but don't count it in the
  @@ -261,11 +257,11 @@
* retained.
*/
   if (context.suppressLeadingSpace()) {
  -for (; iNextStart < textArrayLength
  +for (; iNextStart < textArray.length
   && textArray[iNextStart] == SPACE; iNextStart++) {
   }
   // If now at end, nothing to compose here!
  -if (iNextStart >= textArrayLength) {
  +if (iNextStart >= textArray.length) {
   setFinished(true);
   return null; // Or an "empty" BreakPoss?
   }
  @@ -286,7 +282,7 @@
   short iWScount = 0; // Count of word spaces
   boolean bSawNonSuppressible 

RE: Fonts and Document

2004-03-16 Thread Manuel Mall
Simon,

tried the URL you gave
(http://www.leverkruid.nl/FOP/documentation.xml) and got the error (IE
6):

"The system cannot locate the object specified. Error processing
resource 'http://www.leverkruid.nl/FOP/docbookx.dtd'. "

Mozilla Firefox fails as well.

Manuel


Re: InputHandler - re baseURL commits

2004-03-16 Thread Peter B. West
Glen Mazza wrote:
(Hmmm...I'm supposed to be learning Cocoon right now,
but am already suffering FOP-withdrawal.  Apache's got
me good...  ;)
[just removed the namespace-prefixes issue you were
mentioning earlier, btw.]
I noticed that.

FOFileHandler.createParser() is just a simple static
function that generates a parser.  It can be placed in
any class, and is not something that needs to be 
inherited. (Actually, the hyphenation class'
PatternParser also creates a parser, although it could
use the one in FOFileHandler as well.)

InputHandler has a abstract getParser() method which
is used by Driver et. al.  This method *does* need to
be overridden in each of the base classes, and of
course it is.  

It just so happens, but is not necessarily required,
that the current implementation of XSLTInputHandler
uses the createParser() of FOFileHandler for its
implementation of getParser().  This is just an
implementation detail. 

XSLTInputHandler's getXMLFilter() (called by its
getParser()):

// Create an XMLReader.
XMLReader parser = FOFileHandler.createParser();

I preferred the direct reference to the FOFileHandler
method (as opposed to simple inheritance) for reasons
of documentation:  this way, we're clearly stating
that XSLTInputHandler is using FOFileHandler's parser
as part of its XMLFilter.
(Also, at the time I was doing this, I was planning on
having a DOMInputHandler--but was running into
difficulty doing so--that I believe would have caused
a createParser() to not have been relevant in the base
class.)
Glen,

Thanks for the explanation, and thanks for surfacing.

Peter
--
Peter B. West 


Re: InputHandler - re baseURL commits

2004-03-16 Thread Glen Mazza
(Hmmm...I'm supposed to be learning Cocoon right now,
but am already suffering FOP-withdrawal.  Apache's got
me good...  ;)

[just removed the namespace-prefixes issue you were
mentioning earlier, btw.]

FOFileHandler.createParser() is just a simple static
function that generates a parser.  It can be placed in
any class, and is not something that needs to be 
inherited. (Actually, the hyphenation class'
PatternParser also creates a parser, although it could
use the one in FOFileHandler as well.)

InputHandler has a abstract getParser() method which
is used by Driver et. al.  This method *does* need to
be overridden in each of the base classes, and of
course it is.  

It just so happens, but is not necessarily required,
that the current implementation of XSLTInputHandler
uses the createParser() of FOFileHandler for its
implementation of getParser().  This is just an
implementation detail. 

XSLTInputHandler's getXMLFilter() (called by its
getParser()):

// Create an XMLReader.
XMLReader parser = FOFileHandler.createParser();


I preferred the direct reference to the FOFileHandler
method (as opposed to simple inheritance) for reasons
of documentation:  this way, we're clearly stating
that XSLTInputHandler is using FOFileHandler's parser
as part of its XMLFilter.

(Also, at the time I was doing this, I was planning on
having a DOMInputHandler--but was running into
difficulty doing so--that I believe would have caused
a createParser() to not have been relevant in the base
class.)

Thanks,
Glen

--- Peter West wrote:
> 
> Glen at al.
> 
> One of the things I noticed when I was looking for
> ways to bring the 
> apps classes of alt-design and HEAD closer together
> was that the 
> createParser method seemed to belong in
> InputHandler,
> because it is 
> required by both subclasses.  Any reason why it
> isn't
> there?
> 
> Peter
> 



cvs commit: xml-fop/src/java/org/apache/fop/apps FOFileHandler.java

2004-03-16 Thread gmazza
gmazza  2004/03/16 14:17:09

  Modified:src/java/org/apache/fop/apps FOFileHandler.java
  Log:
  Removed obsolete request for namespace-prefixes (supported by all SAX2
  parsers by definition, questionable whether needed by FOP anyway.)
  
  Revision  ChangesPath
  1.4   +1 -7  xml-fop/src/java/org/apache/fop/apps/FOFileHandler.java
  
  Index: FOFileHandler.java
  ===
  RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/apps/FOFileHandler.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- FOFileHandler.java16 Mar 2004 05:25:16 -  1.3
  +++ FOFileHandler.java16 Mar 2004 22:17:09 -  1.4
  @@ -88,13 +88,7 @@
   try {
   SAXParserFactory factory = SAXParserFactory.newInstance();
   factory.setNamespaceAware(true);
  -factory.setFeature(
  -"http://xml.org/sax/features/namespace-prefixes";, true);
   return factory.newSAXParser().getXMLReader();
  -} catch (SAXNotSupportedException se) {
  -throw new FOPException("Error: You need a parser which allows the"
  -   + " http://xml.org/sax/features/namespace-prefixes";
  -   + " feature to be set to true to support namespaces", se);
   } catch (SAXException se) {
   throw new FOPException("Couldn't create XMLReader", se);
   } catch (ParserConfigurationException pce) {
  
  
  

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



Re: baseline-shift property

2004-03-16 Thread Simon Pepping
You are looking at the code that initialized the property subsystem at
startup. BaselineShiftMaker and all other makers play a role in this
part of the process.

All properties are stored in the FO tree. This happens during parsing
of the FO document; you do not have to do anything here. During layout
(area tree building) you can access them with fobj.getProperty(int
propId), where propId = Constants.PR_BASELINE_SHIFT, and fobj is the
node in the FO tree. See org.apache.fop.fo.FObj.java. You can also use
propertyList.get(int propId), where propertyList is the PropertyList
object of the FO node. See org.apache.fop.fo.PropertyList.java. The
return value is a LengthProperty, a subclass of Property. If I am not
mistaken, the keywords sub, super, baseline have been resolved to a
length value.

Note that you seem to be using the HEAD version from CVS, which is
still under development and is not guaranteed to be complete.

On Tue, Mar 16, 2004 at 03:04:40PM +0100, Søren Christiansen wrote:
> Hi,
> Im currently planing to use FOP as a PDF render for our XML documents
> (transformed (XSLT) to the FO syntax). Everything seems to work fine but I
> need the render to support the baseline-shift property  -which currently
> isnt supported by the release version of FOP. Therefore I want to add this
> to the PDF render, but I after ive been studying the source and the
> development articles in 2 days I still cant figure out how to do it. It
> seems like the baseline-shift property is recognized as a implemented
> Lengthproperty in 
> 
> 
>   private void createAreaAlignmentProperties()
>   ...
>   // baseline-shift
> m  = new LengthProperty.Maker(PR_BASELINE_SHIFT);
> m.setInherited(false);
> m.addEnum("baseline", makeEnumProperty(BASELINE));
> m.addEnum("sub", makeEnumProperty(SUB));
> m.addEnum("super", makeEnumProperty(SUPER));
> m.setDefault("baseline");
> addPropertyMaker("baseline-shift", m);
>   ...
> But how do I access the values (sub,super,baseline) of the property in a
> parsed fo:inline block in the PDF renderer(RenderText)?. Im unable to access
> it through getTrait() - Im rather uncertain whether this property is stored
> in the FO tree or not?  and if not how do I store this in the FO tree?
> I came across a subclass Class BaselineShiftMaker in the API doc but its not
> distributed with the snapshot of the source !?
> 
> Ive problary been misunderstanding a great deal here - but I hope you  can
> help me anyway ...

Regards,
Simon Pepping

-- 
Simon Pepping
home page: http://www.leverkruid.nl



Re: Fonts and Document

2004-03-16 Thread Simon Pepping
On Mon, Mar 15, 2004 at 01:40:59PM -0800, Clay Leeds wrote:
> 
> On Mar 15, 2004, at 1:15 PM, Simon Pepping wrote:
> Looks good, Simon... I don't suppose you could create a PDF version? (I 
> know a great XML => PDF conversion tool. :-)) Seriously though, this 
> looks like a great potential addition to the Developer documentation we 
> have on the FOP site. BTW, it looks like everything after Chapter 2, #3 
> is under  or  tags, so you've lost the formatting.

I am glad you like it. I do not see your problem after Chapter 2,
#3. In my browser, Mozilla and Mozilla FireBird viewing the local
file (i.e. not via a server), everything looks as I expect.

I will try this great conversion tool. If it can deal with the fo file
that is produced by the Docbook XSL style sheets, it should be
easy. You can try it yourself, because the DocBook XML file is also
available from my web site,
http://www.leverkruid.nl/FOP/documentation.xml.

I am currently converting my raw notes to DocBook XML, and in the
process rewrite those portions that do not seem good enough. I hope to
finish this in two to four weeks. I would be pleased to add it to the
developer documentation on the FOP web site if it is appreciated. I
wonder if DocBook XML is the right format for the web site. For me it
is the right format to write this kind of technical documentation.

Regards,
Simon Pepping

-- 
Simon Pepping
home page: http://www.leverkruid.nl



Re: baseline-shift property

2004-03-16 Thread J.Pietschmann
Søren Christiansen wrote:
Therefore I want 
to add this to the PDF render, but I after ive been studying the source 
and the development articles in 2 days I still cant figure out how to do 
it.
Don't bother. It is already implemented in the new code. If you want to
work at HEAD, you are welcome.
I came across a subclass*** Class BaselineShiftMaker* in the API doc but 
its not distributed with the snapshot of the source !?
It's code generated during the build.

J.Pietschmann


Hyphenation

2004-03-16 Thread Luca Furini

Hi all!

I am an italian student of the University of Bologna.

I have tried to solve a few problems concerning hyphenation, in
particular:
- show the '-' at the end of the hyphenated lines
- use the fo:hyphenate property to enable hyphenation, instead of the
  alignment
- specify the hyphenation character using the fo:hyphenation-character
  property

So, here are the modifications I suggest; I have done some (simple) tests
and they seem to work.


*** layoutmgr/LineLayoutManager.java ***
I changed the condition tested to decide whether try hyphenate, now it
only looks at the appropriate fo property

24a25
> import org.apache.fop.fo.Constants;
212c213,214
< if (bTextAlignment == TextAlign.JUSTIFY || prevBP == null) {
---
> //if (bTextAlignment == TextAlign.JUSTIFY || prevBP == null) {
> if (hyphProps.hyphenate == Constants.TRUE) {


*** fo/TextInfo.java ***
I added the hyphenation character, and removed the bCanHyphenate boolean,
which is no longer necessary, because of the previous change

54c54,56
< public boolean bCanHyphenate = true;
---
> //public boolean bCanHyphenate = true;
> /** the hyphenation character to be used */
> public char hyphChar = '-';


*** fo/PropertyManager.java ***
Sets the hyphenation character in the TextInfo object


496a497,498
>   textInfo.hyphChar = this.propertyList.get(
>   PR_HYPHENATION_CHARACTER).getCharacter();


*** layoutmgr/TextLayoutManager.java ***
I added a iHyphenated boolean in the AreaInfo class; it is set to true
according to the flags of the break possibility chosen, and is value is
looked at before creating the areas, to decide whether to add the
hyphenation character

49a50,52
>   private boolean iHyphenated;
> //public AreaInfo(short iSIndex, short iBIndex, short iWS,
> // MinOptMax ipd) {
51c54,55
<  MinOptMax ipd) {
---
>  MinOptMax ipd, boolean iHyp) {
> iHyphenated = iHyp;
114c118,119
< hyphIPD = textInfo.fs.getCharWidth('-');
---
> //hyphIPD = textInfo.fs.getCharWidth('-');
>   hyphIPD = textInfo.fs.getCharWidth(textInfo.hyphChar);
208c213,214
< if (textArrayLength < iStopIndex || textInfo.bCanHyphenate == false) {
---
> //if (textArrayLength < iStopIndex || textInfo.bCanHyphenate == false) {
> if (textArrayLength < iStopIndex) {
401a408,409
> //vecAreaInfo.add(
> //  new AreaInfo(iWordStart, iNextStart, iWScount, ipd));
403c411
<   new AreaInfo(iWordStart, iNextStart, iWScount, ipd));
---
>   new AreaInfo(iWordStart, iNextStart, iWScount, ipd, ((flags & 
> BreakPoss.HYPHENATED) != 0)));
499a508,512
>
>   // add hyphenation character if the last word is hyphenated
> if (ai.iHyphenated) {
> str += textInfo.hyphChar;
> }


Ok, that's all, I hope this can be useful.

Bye
Luca



baseline-shift property

2004-03-16 Thread Søren Christiansen
Title: baseline-shift property





Hi,
Im currently planing to use FOP as a PDF render for our XML documents (transformed (XSLT) to the FO syntax). Everything seems to work fine but I need the render to support the baseline-shift property  -which currently isnt supported by the release version of FOP. Therefore I want to add this to the PDF render, but I after ive been studying the source and the development articles in 2 days I still cant figure out how to do it. It seems like the baseline-shift property is recognized as a implemented Lengthproperty in 


    private void createAreaAlignmentProperties()
    ...
        // baseline-shift
    m  = new LengthProperty.Maker(PR_BASELINE_SHIFT);
    m.setInherited(false);
    m.addEnum("baseline", makeEnumProperty(BASELINE));
    m.addEnum("sub", makeEnumProperty(SUB));
    m.addEnum("super", makeEnumProperty(SUPER));
    m.setDefault("baseline");
    addPropertyMaker("baseline-shift", m);
    ...
But how do I access the values (sub,super,baseline) of the property in a parsed fo:inline block in the PDF renderer(RenderText)?. Im unable to access it through getTrait() - Im rather uncertain whether this property is stored in the FO tree or not?  and if not how do I store this in the FO tree?

I came across a subclass Class BaselineShiftMaker in the API doc but its not distributed with the snapshot of the source !?

Ive problary been misunderstanding a great deal here - but I hope you  can help me anyway ...


thanx!





Med Venlig Hilsen / Best Regards
Søren Christiansen
Systemkonsulent / System Consultant


DES A/S
Gothersgade 49
1123 København K
tlf: (+45) 33 93 11 13 / (+45) 33 93 11 44 - 287 
mob: (+45) 27 21 58 09
mail: [EMAIL PROTECTED]





InputHandler - re baseURL commits

2004-03-16 Thread Peter B. West
Glen at al.

One of the things I noticed when I was looking for ways to bring the 
apps classes of alt-design and HEAD closer together was that the 
createParser method seemed to belong in InputHandler, because it is 
required by both subclasses.  Any reason why it isn't there?

Peter

--
Peter B. West 


cvs commit: xml-fop/src/java/org/apache/fop/render AbstractRenderer.java Renderer.java

2004-03-16 Thread pbwest
pbwest  2004/03/16 04:17:54

  Modified:src/java/org/apache/fop/render Tag: FOP_0-20-0_Alt-Design
AbstractRenderer.java Renderer.java
  Log:
  startRenderer and stopRenderer methods removed.
  Many fields and their setter removed - use general options setter.
  Commented out many fields until design of rendering in alt-design is finalised.
  
  Revision  ChangesPath
  No   revision
  No   revision
  1.24.2.3  +38 -88xml-fop/src/java/org/apache/fop/render/AbstractRenderer.java
  
  Index: AbstractRenderer.java
  ===
  RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/render/AbstractRenderer.java,v
  retrieving revision 1.24.2.2
  retrieving revision 1.24.2.3
  diff -u -r1.24.2.2 -r1.24.2.3
  --- AbstractRenderer.java 13 Mar 2004 08:46:05 -  1.24.2.2
  +++ AbstractRenderer.java 16 Mar 2004 12:17:53 -  1.24.2.3
  @@ -18,9 +18,8 @@
   
   package org.apache.fop.render;
   
  -import java.io.IOException;
   import java.io.OutputStream;
  -import java.util.Date;
  +import java.util.HashMap;
   import java.util.Map;
   import java.util.logging.Logger;
   // XML
  @@ -33,87 +32,56 @@
   import org.apache.fop.apps.Fop;
   import org.apache.fop.configuration.FOUserAgent;
   
  -import org.apache.avalon.framework.configuration.Configurable;
  -import org.apache.avalon.framework.configuration.Configuration;
  -import org.apache.avalon.framework.configuration.ConfigurationException;
  -
   /**
* Abstract base class for all renderers. The Abstract renderer does all the
* top level processing of the area tree and adds some abstract methods to
* handle viewports. This keeps track of the current block and inline position.
*/
   public abstract class AbstractRenderer
  - implements Renderer, Configurable {
  + implements Renderer {
   
  -/**
  - * user agent
  - */
  +protected OutputStream output;
  +/** user agent */
   protected FOUserAgent userAgent;
   
  -/**
  - * producer (usually "FOP")
  - */
  -protected String producer = "FOP";
  -
  -/**
  - * creator of document
  - */
  -protected String creator = null;
  -
  -/**
  - * creation time
  - */
  -protected Date creationDate = null;
  -
  -/**
  - * renderer configuration
  - */
  -protected Map options;
  -
  -/**
  - * block progression position
  - */
  -protected int currentBPPosition = 0;
  -
  -/**
  - * inline progression position
  - */
  -protected int currentIPPosition = 0;
  -
  -/**
  - * current inline progression position in block
  - */
  -protected int currentBlockIPPosition = 0;
  -
  -/**
  - * the block progression position of the containing block used for
  - * absolutely positioned blocks
  - */
  -protected int containingBPPosition = 0;
  +/** renderer configuration */
  +protected Map options = new HashMap();
   
  -/**
  - * the inline progression position of the containing block used for
  - * absolutely positioned blocks
  - */
  -protected int containingIPPosition = 0;
  +///** block progression position  */
  +//protected int currentBPPosition = 0;
  +//
  +///** inline progression position */
  +//protected int currentIPPosition = 0;
  +//
  +///** current inline progression position in block */
  +//protected int currentBlockIPPosition = 0;
  +//
  +///**
  +// * the block progression position of the containing block used for
  +// * absolutely positioned blocks
  +// */
  +//protected int containingBPPosition = 0;
  +//
  +///**
  +// * the inline progression position of the containing block used for
  +// * absolutely positioned blocks
  +// */
  +//protected int containingIPPosition = 0;
   
   
   protected Logger log = Logger.getLogger(Fop.fopPackage);
  -
  +
   /**
  - * @see 
org.apache.avalon.framework.configuration.Configurable#configure(Configuration)
  + * Implements Runnable.run() so that this thread can be started.
  + * Set up the fonts and perform other initialization.
  + * Respond to requests from layout thread for information
  + * Wait for requests from layout thread for layout.
*/
  -public void configure(Configuration conf) throws ConfigurationException {
  -}
  -
  -/** @see org.apache.fop.render.Renderer */
  -public void setProducer(String inProducer) {
  -producer = inProducer;
  +public void run() {
   }
   
  -/** @see org.apache.fop.render.Renderer */
  -public void setCreator(String inCreator) {
  -creator = inCreator;
  +public synchronized void setOutputStream(OutputStream output) {
  +this.output = output;
   }
   
   ///**
  @@ -121,32 +89,14 @@
   // */
 

cvs commit: xml-fop/src/java/org/apache/fop/render/awt AWTRenderer.java AWTPrintRenderer.java

2004-03-16 Thread pbwest
pbwest  2004/03/16 04:07:09

  Modified:src/java/org/apache/fop/render/awt Tag:
FOP_0-20-0_Alt-Design AWTRenderer.java
AWTPrintRenderer.java
  Log:
  startRenderer and stopRenderer methods commented out
  
  Revision  ChangesPath
  No   revision
  No   revision
  1.21.2.3  +17 -16xml-fop/src/java/org/apache/fop/render/awt/AWTRenderer.java
  
  Index: AWTRenderer.java
  ===
  RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/render/awt/AWTRenderer.java,v
  retrieving revision 1.21.2.2
  retrieving revision 1.21.2.3
  diff -u -r1.21.2.2 -r1.21.2.3
  --- AWTRenderer.java  13 Mar 2004 08:46:05 -  1.21.2.2
  +++ AWTRenderer.java  16 Mar 2004 12:07:08 -  1.21.2.3
  @@ -37,7 +37,6 @@
   import java.awt.print.Pageable;
   import java.awt.print.Printable;
   import java.io.IOException;
  -import java.io.OutputStream;
   import java.util.Map;
   import java.util.Vector;
   
  @@ -52,7 +51,9 @@
   /**
* This is FOP's AWT renderer.
*/
  -public class AWTRenderer extends AbstractRenderer implements Printable, Pageable {
  +public class AWTRenderer
  +extends AbstractRenderer
  +implements Printable, Pageable {
   
   protected double scaleFactor = 100.0;
   protected int pageNumber = 0;
  @@ -134,20 +135,20 @@
   return scaleFactor;
   }
   
  -public void startRenderer(OutputStream out)
  -throws IOException {
  -// empty pageViewportList, in case of a reload from PreviewDialog
  -pageViewportList.removeAllElements();
  -pageList.removeAllElements();
  -bufferedImageList.removeAllElements();
  -System.out.println("\nRegion Types: 0-Before/Top, 1-Start/Left, 2-Body, 
3-End/Right, 4-After/Bottom");
  -}
  -
  -public void stopRenderer()
  -throws IOException {
  -frame.setStatus(translator.getString("Status.Show"));
  -frame.showPage();
  -}
  +//public void startRenderer(OutputStream out)
  +//throws IOException {
  +//// empty pageViewportList, in case of a reload from PreviewDialog
  +//pageViewportList.removeAllElements();
  +//pageList.removeAllElements();
  +//bufferedImageList.removeAllElements();
  +//System.out.println("\nRegion Types: 0-Before/Top, 1-Start/Left, 2-Body, 
3-End/Right, 4-After/Bottom");
  +//}
  +//
  +//public void stopRenderer()
  +//throws IOException {
  +//frame.setStatus(translator.getString("Status.Show"));
  +//frame.showPage();
  +//}
   
   // Printable Interface
   public PageFormat getPageFormat(int pos) {
  
  
  
  1.7.2.2   +24 -24xml-fop/src/java/org/apache/fop/render/awt/AWTPrintRenderer.java
  
  Index: AWTPrintRenderer.java
  ===
  RCS file: 
/home/cvs/xml-fop/src/java/org/apache/fop/render/awt/AWTPrintRenderer.java,v
  retrieving revision 1.7.2.1
  retrieving revision 1.7.2.2
  diff -u -r1.7.2.1 -r1.7.2.2
  --- AWTPrintRenderer.java 10 Mar 2004 06:24:28 -  1.7.2.1
  +++ AWTPrintRenderer.java 16 Mar 2004 12:07:08 -  1.7.2.2
  @@ -18,9 +18,9 @@

   package org.apache.fop.render.awt;
   
  -import java.awt.print.PrinterException;
  +//import java.awt.print.PrinterException;
   import java.awt.print.PrinterJob;
  -import java.io.IOException;
  +//import java.io.IOException;
   import java.util.Vector;
   
   public class AWTPrintRenderer extends AWTRenderer {
  @@ -60,27 +60,27 @@
   printerJob.setPageable(this);
   }   
   
  -public void stopRenderer() throws IOException {
  -super.stopRenderer();
  -
  -if (endNumber == -1) {
  -endNumber = getNumberOfPages();
  -}
  -
  -Vector numbers = getInvalidPageNumbers();
  -for (int i = numbers.size() - 1; i > -1; i--) {
  -// removePage(Integer.parseInt((String)numbers.elementAt(i)));
  -}
  -
  -try {
  -printerJob.print();
  -} catch (PrinterException e) {
  -e.printStackTrace();
  -throw new IOException("Unable to print: " 
  -+ e.getClass().getName()
  -+ ": " + e.getMessage());
  -}
  -}
  +//public void stopRenderer() throws IOException {
  +//super.stopRenderer();
  +//
  +//if (endNumber == -1) {
  +//endNumber = getNumberOfPages();
  +//}
  +//
  +//Vector numbers = getInvalidPageNumbers();
  +//for (int i = numbers.size() - 1; i > -1; i--) {
  +//// removePage(Integer.parseInt((String)numbers.elementAt(i)));
  +//}
  +//
  +//try {
  +//printerJob.print();
  +//} catch (PrinterException e) {
  +//e.printStackTrace();
  +//throw new IOException("Unable to pr

cvs commit: xml-fop/src/java/org/apache/fop/render/awt AWTFontMetrics.java

2004-03-16 Thread pbwest
pbwest  2004/03/16 04:02:37

  Modified:src/java/org/apache/fop/render/awt Tag:
FOP_0-20-0_Alt-Design AWTFontMetrics.java
  Log:
  Assume getAscent bug is now fixed
  
  Revision  ChangesPath
  No   revision
  No   revision
  1.2.2.2   +7 -6  xml-fop/src/java/org/apache/fop/render/awt/AWTFontMetrics.java
  
  Index: AWTFontMetrics.java
  ===
  RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/render/awt/AWTFontMetrics.java,v
  retrieving revision 1.2.2.1
  retrieving revision 1.2.2.2
  diff -u -r1.2.2.1 -r1.2.2.2
  --- AWTFontMetrics.java   10 Mar 2004 06:24:28 -  1.2.2.1
  +++ AWTFontMetrics.java   16 Mar 2004 12:02:37 -  1.2.2.2
  @@ -111,13 +111,13 @@
*/
   public int getAscender(String family, int style, int size) {
   setFont(family, style, size);
  -// return (int)(FONT_FACTOR * fmt.getAscent());
  +return FONT_FACTOR * fmt.getAscent();
   
  -// workaround for sun bug on FontMetrics.getAscent()
  -// http://developer.java.sun.com/developer/bugParade/bugs/4399887.html
  -int realAscent = fmt.getAscent()
  - - (fmt.getDescent() + fmt.getLeading());
  -return FONT_FACTOR * realAscent;
  +//// workaround for sun bug on FontMetrics.getAscent()
  +//// http://developer.java.sun.com/developer/bugParade/bugs/4399887.html
  +//int realAscent = fmt.getAscent()
  +// - (fmt.getDescent() + fmt.getLeading());
  +//return FONT_FACTOR * realAscent;
   }
   
   
  @@ -175,6 +175,7 @@
   // the output seems to look a little better if the
   // space is rendered larger than given by
   // the FontMetrics object
  +// TODO find out why
   if (i <= 32) {
   w = (int)(1.4 * fmt.charWidth(i) * FONT_FACTOR);
   } else {
  
  
  

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