cvs commit: xml-fop/src/org/apache/fop/svg SVGUtilities.java

2001-07-11 Thread keiron

keiron  01/07/11 03:04:08

  Added:   src/org/apache/fop/svg SVGUtilities.java
  Log:
  a utility file for creating some svg things
  
  Revision  ChangesPath
  1.1  xml-fop/src/org/apache/fop/svg/SVGUtilities.java
  
  Index: SVGUtilities.java
  ===
  /* $Id: SVGUtilities.java,v 1.1 2001/07/11 10:04:07 keiron Exp $
   * Copyright (C) 2001 The Apache Software Foundation. All rights reserved.
   * For details on use and redistribution please refer to the
   * LICENSE file included with these sources.
   */
  
  package org.apache.fop.svg;
  
  import java.util.*;
  import java.text.*;
  import java.awt.*;
  import java.awt.geom.AffineTransform;
  import java.awt.geom.Rectangle2D;
  import java.awt.font.FontRenderContext;
  
  import org.apache.fop.fo.*;
  import org.apache.fop.fo.properties.*;
  import org.apache.fop.layout.*;
  import org.apache.fop.apps.*;
  import org.apache.fop.datatypes.*;
  import org.apache.fop.layout.inline.*;
  import org.apache.fop.svg.*;
  import org.w3c.dom.*;
  import org.w3c.dom.svg.*;
  import org.w3c.dom.css.*;
  
  import org.apache.batik.dom.svg.SVGDOMImplementation;
  
  /**
   * Some utilities for creating svg DOM documents and elements.
   */
  public class SVGUtilities {
  final static String svgNS = SVGDOMImplementation.SVG_NAMESPACE_URI;
  
  
  public static final Document createSVGDocument(float width,
  float height) {
  DOMImplementation impl =
SVGDOMImplementation.getDOMImplementation();
  Document doc = impl.createDocument(svgNS, svg, null);
  
  Element svgRoot = doc.getDocumentElement();
  svgRoot.setAttributeNS(null, width,  + width);
  svgRoot.setAttributeNS(null, height,  + height);
  return doc;
  }
  
  /**
   * Get the string width for a particular string given the font.
   */
  public static final float getStringWidth(String str,
  java.awt.Font font) {
  Rectangle2D rect = font.getStringBounds(str, 0, str.length(),
  new FontRenderContext(new 
AffineTransform(), true, true));
  return (float) rect.getWidth();
  }
  
  /**
   * Get the string height for a particular string given the font.
   */
  public static final float getStringHeight(String str,
  java.awt.Font font) {
  Rectangle2D rect = font.getStringBounds(str, 0, str.length(),
  new FontRenderContext(new 
AffineTransform(), true, true));
  return (float) rect.getHeight();
  }
  
  /**
   * Get the string bounds for a particular string given the font.
   */
  public static final Rectangle2D getStringBounds(String str,
  java.awt.Font font) {
  return font.getStringBounds(str, 0, str.length(),
  new FontRenderContext(new AffineTransform(), 
true, true));
  }
  
  /**
   * Create an SVG Line
   */
  public static final Element createLine(Document doc, float x,
 float y, float x2, float y2) {
  Element ellipse = doc.createElementNS(svgNS, line);
  ellipse.setAttributeNS(null, x1,  + x);
  ellipse.setAttributeNS(null, x2,  + x2);
  ellipse.setAttributeNS(null, y1,  + y);
  ellipse.setAttributeNS(null, y2,  + y2);
  return ellipse;
  }
  
  /**
   * Create an SVG Ellipse
   */
  public static final Element createEllipse(Document doc, float cx,
  float cy, float rx, float ry) {
  Element ellipse = doc.createElementNS(svgNS, ellipse);
  ellipse.setAttributeNS(null, cx,  + cx);
  ellipse.setAttributeNS(null, rx,  + rx);
  ellipse.setAttributeNS(null, cy,  + cy);
  ellipse.setAttributeNS(null, ry,  + ry);
  return ellipse;
  }
  
  /**
   * Create an SVG Path.
   */
  public static final Element createPath(Document doc, String str) {
  Element path = doc.createElementNS(svgNS, path);
  path.setAttributeNS(null, d, str);
  return path;
  }
  
  /**
   * Create an SVG Text object.
   */
  public static final Element createText(Document doc, float x,
 float y, String str) {
  Element textGraph = doc.createElementNS(svgNS, text);
  textGraph.setAttributeNS(null, x,  + x);
  textGraph.setAttributeNS(null, y,  + y);
  org.w3c.dom.Text text = doc.createTextNode(str);
  textGraph.appendChild(text);
  return textGraph;
  }
  
  /**
   * Create an SVG Rectangle.
   */
  public static final Element createRect(Document doc, float x,
 float y, float width, float height) {
   

Re: page numbering

2001-07-11 Thread Keiron Liddle


On Tue, 10 Jul 2001 22:05:41 eric.deandrea wrote:
 I am using FOP 0.14. Any help would be greatly appreciated!

I don't think that 0.14 had page numbering. I would suggest trying the
latest FOP.

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




how starting FOP without XML-File

2001-07-11 Thread Marc Jenzer



Hallo

I generate my 
PDF-File in a servlet:

 File 
xmlFile = new 
File("c:/temp/test.xml"); File 
xslFile = new 
File("c:/temp/test.xsl"); 
InputHandler inputHandler = new XSLTInputHandler(xmlFile, 
xslFile); 
 org.xml.sax.XMLReader parser = 
inputHandler.getParser(); 
driver.buildFOTree(parser, 
inputHandler.getInputSource()); 
driver.format(); 
driver.setOutputStream(out); 
driver.render();
In the above example 
the xml input source is a file. But I would rather passthe input 
source xml file (text.xml) in the memory. It's possible and howcan I do 
this?

Thanks

Marc


BEGIN:VCARD
VERSION:2.1
N:Jenzer;Marc;;Herr
FN:Marc Jenzer
ORG:j-solution GmbH
TITLE:Geschäftsführer / Consultant
TEL;WORK;VOICE:+41 1 851 36 03
TEL;CELL;VOICE:+41 79 543 49 02
TEL;WORK;FAX:+41 1 851 36 04
ADR;WORK:;;Geerenstrasse 18;Niederglatt;;CH-8172
LABEL;WORK;ENCODING=QUOTED-PRINTABLE:Geerenstrasse 18=0D=0ANiederglatt CH-8172
URL:http://www.j-solution.ch
URL:http://www.j-solution.ch
KEY;X509;ENCODING=BASE64:
MIIFDDCCA/SgAwIBAgIGAQIAABLAMA0GCSqGSIb3DQEBBQUAMIGZMQswCQYDVQQGEwJDSDEU
MBIGA1UEChMLU3dpc3NrZXkgQUcxHjAcBgNVBAsTFTAwODUxMDAwMDAwMDUwMDAwMDM5NDEb
MBkGA1UECxMSUHVibGljIENBIFNlcnZpY2VzMRAwDgYDVQQHEwdadWVyaWNoMSUwIwYDVQQD
ExxTd2lzc2tleSBQZXJzb25hbCBJRCBDQSAxMDI0MB4XDTAxMDIwODE0MDA0M1oXDTAzMDIw
ODIzNTkwMFowgZ8xGzAZBgNVBAoTElByaXZhdGUgSW5kaXZpZHVhbDEeMBwGA1UECxMVMDA4
NTEwMDAxMzEyMDAwMDAwMTUwMRMwEQYDVQQLEwoyNC4wMy4xOTc0MQswCQYDVQQGEwJDSDEU
MBIGA1UEAxMLTWFyYyBKZW56ZXIxKDAmBgkqhkiG9w0BCQEWGW1hcmMuamVuemVyQGotc29s
dXRpb24uY2gwgZ8wDQYJKoZIhvcNAQEBBQADgY0AMIGJAoGBAM4rhTOretIUTsndRBChcyte
wdQiURzTTu0TVPNQGm7GGxt9WkdIKrbD4y0q8mZFQxY1PnA98zREHJHPikC5zX2a8w9xwsti
++5MLy3fpHVeFrAbusRX+ocGFPeDS9Z7ZjTK9WzEwhXI8xmyBIa1BAR+FFsPXWygyJ45sgOI
IDqLAgMBAAGjggHUMIIB0DALBgNVHQ8EBAMCBaAwgdcGCWCGSAGG+EIBDQSByRaBxlRoaXMg
Y2VydGlmaWNhdGUgaGFzIGJlZW4gaXNzdWVkIGJ5IFN3aXNza2V5IEFHIGdvdmVybmVkIGJ5
IGl0cyBDZXJ0aWZpY2F0ZSBQcmFjdGljZSBTdGF0ZW1lbnQgKENQUykuIENQUyBhbmQgZnVy
dGhlciBpbmZvcm1hdGlvbiBhYm91dCBTd2lzc2tleSBjZXJ0aWZpY2F0ZXMgYXJlIGF2YWls
YWJsZSBhdCBodHRwOi8vd3d3LnN3aXNza2V5LmNoLjA+BglghkgBhvhCAQMEMRYvaHR0cHM6
Ly9jcmwuc3dpc3NrZXkuY2gvcHJvZHNzbC9nZXRfc3RhdHVzP3NpZD0wQwYDVR0gBDwwOjA4
BgdghXQFCgEBMC0wKwYIKwYBBQUHAgEWH2h0dHA6Ly93d3cuc3dpc3NrZXkuY2gvcHJvZC9j
cHMwQwYDVR0RBDwwOqUdoAYTBDAwODWhExMRMTAwMDEzMTIwMDAwMDAxNTCBGW1hcmMuamVu
emVyQGotc29sdXRpb24uY2gwHQYDVR0lBBYwFAYIKwYBBQUHAwIGCCsGAQUFBwMEMA0GCSqG
SIb3DQEBBQUAA4IBAQBSHXq5nXCnPHC9EOllO+V1DqMI4Kkn2UDtUI6U2rTr8TrlJAot7hb4
eYJAoFQpZvIJbM3pkr6p/JyzmKwlenEQSPor6Z/ib8Qcqz6stl3YNAJFx+6TPMea+CvZnzTM
DwSEQsra11xmoeobPIbaBQAowIhK+7bAkQbzcAriJ+MMa7odsBPHioU0455fpLbL+SXgP1Lo
KgBifz2+RlYUMYnFyDF1rYsPOrlxGT2wsusb03LjNMvpYM8F+C2tF5bzfTy0V2+obw9Tymvp
A01pYTPU+OXGFhfL/x9miRkF32daOocaNAQTebErBFkHkVjsh/OXjtk1Zn35jJIYh6Q/z0aE


EMAIL;PREF;INTERNET:[EMAIL PROTECTED]
REV:20010209T164031Z
END:VCARD



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


XHTML to PDF using FOP????

2001-07-11 Thread rajeev nair

HELLO,
can anybody help me to convert my XHTMLinto pdf.
the XHTML I'M GIVING BELOW.if I avoid all the anchor
tags(a)tags and table tags and make it pure xsl data
file then i'm easily able to write xslfo file for this
and it is making good pdf.
But for the given Xhtml file how i write xslfo.My real
confusion is where there is table,tr,td tags and also
anchor tags.
Can anyone help me.

?xml version=1.0?
html
head
link rel=stylesheet href=test2.css
type=text/x-oeb1-css/
/head
body
a name=toc
toc
table
tr
td align=left
h2
bContent/b
/h2
/td
/tr
tr
a href=#chapTitle Image/a
/tr
tr
a href=#chap0Page1/a
/tr

tr
a href=#chap1Page2/a
/tr

tr
a href=#chap2Page3/a
/tr

tr
a href=#chap3Page4/a
/tr

tr
a href=#chap4Page5/a
/tr

tr
a href=#chap5Page6/a
/tr

/table
/toc
/a
br/
br/
br/
br/
br/
br/
br/
br/
br/
br/
br/
br/
br/
a name=chap
chap
table border=25
img src=part1.gif/
/table
/chap
/a
br/
br/
br/
br/
br/
br/
a name=chap0
chap0
book3.Click the sheet-tab Score to bring
the worksheet Score to front. Now let us select the
range B4:E7 (figure 10.26 shows the data to be
copied). Click the cell B4, press the Shift key (and
hold it down), click the cell E7, release the Shift
key. Now the range B4:E7 is successfully
selected./book
book4.Choose Edit  Copy (or click the Copy
tool) and the data in the range gets copied to the
clipboard. Also a running, dotted rectangle (also
called marching ants, marquis, or moving boundary)
appears around the selected range. These marching ants
indicate that Paste tool (and command Paste in the
Edit-menu) is enabled. Paste tool remains enabled as
long as marching ants are present. In order to remove
these marching ants simply strike the Esc key. /book
book5.We want to paste this data in the 
Sheet2
of Sales Data.xls therefore, choose Window  Sales Data
(or click the Sales Data icon on the taskbar) in order
to make the workbook Sales Data to be current one.
Then click the sheet-tab Sheet2 to bring the worksheet
Sheet2 to the front. /book
book6.Click the cell B4 and choose Edit  
Paste
(or click the Paste tool). Alternatively, click the
cell B4 and simply strike the Enter key. Also, strike
the Esc key to remove the marching ants. /book
book1When you choose Edit  Cut (or click the Cut
tool) then data in the selected cells is moved to the
clipboard. Before concluding this section, notice:
/book1
table border=1
tr
th
img src=pen.gif/
 

page numbers

2001-07-11 Thread eric.deandrea

I am trying to get page numbering to work but it's not showing up. Here's
what I have:

xsl:stylesheet
version=1.0
xmlns:xsl=http://www.w3.org/1999/XSL/Transform;
xmlns:fo=http://www.w3.org/1999/XSL/Format;

xsl:variable name=pagewidth11/xsl:variable

xsl:template match=document
xsl:processing-instruction
name=cocoon-formattype=text/xslfo/xsl:processing-instruction
fo:root xmlns:fo=http://www.w3.org/1999/XSL/Format;
fo:layout-master-set
fo:simple-page-master
master-name=main
page-height=8.5in
page-width={$pagewidth}in
margin-top=0.5in
margin-bottom=0.5in
margin-left=0.5in
margin-right=0.5in
fo:region-body/
/fo:simple-page-master
/fo:layout-master-set

fo:page-sequence 
master-name=main
initial-page-number=1
fo:static-content flow-name=xsl-after
fo:block text-align=centered
fo:page-number/
/fo:block
/fo:static-content

fo:flow flow-name=xsl-region-body
xsl:apply-templates/
/fo:flow
/fo:page-sequence
/fo:root
/xsl:template

I am using FOP 0.14. Any help would be greatly appreciated!


-Eric

===
Eric Deandrea (978) 698-6351
Software Engineer[EMAIL PROTECTED]
Inforonics, Inc
30 Porter Rd.
Littleton, MA 01460  


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




RE: XHTML to PDF using FOP????

2001-07-11 Thread Michiel Verhoef

Hi,

First, there is a weird d element in your last table. I'm no XHTML expert
but it is not HTML AFAIK.

Second, some of the tr are missing td elements. A tr needs a td (at
least, in HTML it does)
so my guess is that your XHTML is not valid HTML. Any xsl that converts
valid HTML to say, fo will give
errors or at least not the desired result..

HTH,

Michiel

$ -Original Message-
$ From: rajeev nair [mailto:[EMAIL PROTECTED]]
$ Sent: woensdag 11 juli 2001 14:15
$ To: [EMAIL PROTECTED]
$ Subject: XHTML to PDF using FOP
$ 
$ 
$ HELLO,
$ can anybody help me to convert my XHTMLinto pdf.
$ the XHTML I'M GIVING BELOW.if I avoid all the anchor
$ tags(a)tags and table tags and make it pure xsl data
$ file then i'm easily able to write xslfo file for this
$ and it is making good pdf.
$ But for the given Xhtml file how i write xslfo.My real
$ confusion is where there is table,tr,td tags and also
$ anchor tags.
$ Can anyone help me.
$ 
$ ?xml version=1.0?
$ html
$   head
$   link rel=stylesheet href=test2.css
$ type=text/x-oeb1-css/
$   /head
$   body
$   a name=toc
$   toc
$   table
$   tr
$   td align=left
$   h2
$   
$ bContent/b
$   /h2
$   /td
$   /tr
$   tr
$   a 
$ href=#chapTitle Image/a
$   /tr
$   tr
$   a 
$ href=#chap0Page1/a
$   /tr
$   
$   tr
$   a 
$ href=#chap1Page2/a
$   /tr
$   
$   tr
$   a 
$ href=#chap2Page3/a
$   /tr
$   
$   tr
$   a 
$ href=#chap3Page4/a
$   /tr
$   
$   tr
$   a 
$ href=#chap4Page5/a
$   /tr
$   
$   tr
$   a 
$ href=#chap5Page6/a
$   /tr
$   
$   /table
$   /toc
$   /a
$   br/
$   br/
$   br/
$   br/
$   br/
$   br/
$   br/
$   br/
$   br/
$   br/
$   br/
$   br/
$   br/
$   a name=chap
$   chap
$   table border=25
$   img src=part1.gif/
$   /table
$   /chap
$   /a
$   br/
$   br/
$   br/
$   br/
$   br/
$   br/
$   a name=chap0
$   chap0
$   book3.Click the 
$ sheet-tab Score to bring
$ the worksheet Score to front. Now let us select the
$ range B4:E7 (figure 10.26 shows the data to be
$ copied). Click the cell B4, press the Shift key (and
$ hold it down), click the cell E7, release the Shift
$ key. Now the range B4:E7 is successfully
$ selected./book
$   book4.Choose Edit  
$ Copy (or click the Copy
$ tool) and the data in the range gets copied to the
$ clipboard. Also a running, dotted rectangle (also
$ called marching ants, marquis, or moving boundary)
$ appears around the selected range. These marching ants
$ indicate that Paste tool (and command Paste in the
$ Edit-menu) is enabled. Paste tool remains enabled as
$ long as marching ants are present. In order to remove
$ these marching ants simply strike the Esc key. /book
$   book5.We want to 
$ paste this data in the Sheet2
$ of Sales Data.xls therefore, choose Window  Sales Data
$ (or click the Sales Data icon on the taskbar) in order
$ to make the workbook Sales Data to be current one.
$ Then click the sheet-tab Sheet2 to bring the worksheet
$ Sheet2 to the front. /book
$   book6.Click 

RE: how starting FOP without XML-File

2001-07-11 Thread Marc Jenzer



Thanks 
for the answer!

But 
with your solution, I can't pass the fop xsl file. This file is on the 
filesystem. Could you help me?

Thanks

 -Original Message-This code will read the XML from a 
String object and write the PDF outputback to the 
browser.: 
try 
{ String fopstring =  
your function to generate the 
XML InputSource foSource = 
InputSource(new 
StringReader(fopstring)); 
ByteArrayOutputStream out = new 
ByteArrayOutputStream(); 
response.setContentType("application/pdf"); 
Driver driver = new Driver(foSource, 
out); 
driver.setRenderer(Driver.RENDER_PDF); 
driver.run(); byte[] content 
= out.toByteArray(); 
response.setContentLength(content.length); 
response.getOutputStream().write(content); 
response.getOutputStream().flush(); 
response.flushBuffer(); }Jim 
Urban -Original Message- From: 
Marc Jenzer [mailto:[EMAIL PROTECTED]] Sent: Wednesday, July 
11, 2001 7:14 AM To: [EMAIL PROTECTED] Subject: how 
starting FOP without XML-File Hallo I generate 
my PDF-File in a 
servlet: File 
xmlFile = new 
File("c:/temp/test.xml"); 
File xslFile = new 
File("c:/temp/test.xsl"); 
InputHandler inputHandler = new 
XSLTInputHandler(xmlFile,xslFile); 
org.xml.sax.XMLReader parser = 
inputHandler.getParser(); 
driver.buildFOTree(parser, 
inputHandler.getInputSource()); 
driver.format(); 
driver.setOutputStream(out); 
driver.render(); In the above example the xml input source 
is a file. But I would ratherpass the input source xml file (text.xml) 
in the memory. It's possible andhow can I do this? 
Thanks Marc


RE: how starting FOP without XML-File

2001-07-11 Thread Jim Urban

If I understand you correctly, in your servlet you wish to apply an xsl
style sheet (from a file) to an xml string in memory to generate a FO xml
string in memory to run through FOP to generate a PDF in memory which you
want to return to the browser.  If that is the case, here are the pieces for
your servlet...


These are class variables...
   TransformerFactory tFactory= null;
   Transformertransformer = null;

Place this code in your init method to save reading and parsing the xsl file
each time your servlet is called...
   tFactory = TransformerFactory.newInstance();
   String xslFile = myfile.xsl;
   File theFile = new File(xslFile);
   Source xslSource = new StreamSource(theFile);
   transformer = tFactory.newTransformer(xslSource);

This code goes in your doGet / doPost method and replaces the code from the
previous email...
   try
   {
  String xmlString = ... function to generate your xml String.
  Writer out = new StringWriter();
  Source xmlSource = new StreamSource(new StringReader(xmlString));
  transformer.transform(xmlSource, new StreamResult(out));
  out.close();
  String fopstring = out.toString();
  InputSource foSource = InputSource(new StringReader(fopstring));
  ByteArrayOutputStream out = new ByteArrayOutputStream();
  response.setContentType(application/pdf);
  Driver driver = new Driver(foSource, out);
  driver.setRenderer(Driver.RENDER_PDF);
  driver.run();
  byte[] content = out.toByteArray();
  response.setContentLength(content.length);
  response.getOutputStream().write(content);
  response.getOutputStream().flush();
   }

I hope this helps.  I wish this example was part of the examples provided
with FOP.  Maybe a FOP developer (I'm just a user) can add an example like
this to the FOP package.

Jim Urban


-Original Message-
From: Marc Jenzer [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, July 11, 2001 8:27 AM
To: [EMAIL PROTECTED]
Subject: RE: how starting FOP without XML-File


Thanks for the answer!

But with your solution, I can't pass the fop xsl file. This file is on the
filesystem. Could you help me?

Thanks

  -Original Message-
This code will read the XML from a String object and write the PDF output
back to the browser.:

  try
  {
 String fopstring =  your function to generate the XML
 InputSource foSource = InputSource(new StringReader(fopstring));
 ByteArrayOutputStream out = new ByteArrayOutputStream();
 response.setContentType(application/pdf);
 Driver driver = new Driver(foSource, out);
 driver.setRenderer(Driver.RENDER_PDF);
 driver.run();
 byte[] content = out.toByteArray();
 response.setContentLength(content.length);
 response.getOutputStream().write(content);
 response.getOutputStream().flush();
 response.flushBuffer();
  }

Jim Urban

  -Original Message-
  From: Marc Jenzer [mailto:[EMAIL PROTECTED]]
  Sent: Wednesday, July 11, 2001 7:14 AM
  To: [EMAIL PROTECTED]
  Subject: how starting FOP without XML-File


  Hallo

  I generate my PDF-File in a servlet:

  File xmlFile= new File(c:/temp/test.xml);
  File xslFile= new File(c:/temp/test.xsl);
  InputHandler inputHandler = new XSLTInputHandler(xmlFile,
xslFile);

  org.xml.sax.XMLReader parser = inputHandler.getParser();
  driver.buildFOTree(parser, inputHandler.getInputSource());
  driver.format();
  driver.setOutputStream(out);
  driver.render();

  In the above example the xml input source is  a file. But I would rather
pass the input source xml file (text.xml) in the memory. It's possible and
how can I do this?

  Thanks

  Marc


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




Re: Migration

2001-07-11 Thread Paul . Hussein


There aren't any fully integrated tools out there ( or I have missed them
).

I use XML Spy ( which is cool ), to do the XML bit, Antenna House XSL
Formatter to display the result of applying XSL to XML to produce FO, and
to edit and debug XSL int the IBM XSL Editor ( which is a really good tool
).

Anyone else have any better tools.






Chris Hamilton-Emery [EMAIL PROTECTED] on 11/07/2001 14:30:24

Please respond to [EMAIL PROTECTED]



To:   [EMAIL PROTECTED]
cc:
Subject:  Migration


Hi

I'm new here and apologies for any inanities. We're busy introducing an XML
workflow at Cambridge, and I want to begin considering the transfer of
traditional composition specifications to FO specs. But where do I start. I
have a DTD and the formatting of any XML will in part depend on a complex
relationship of elements and attributes and an FO spec dependent on these
variances. Nothing surprising here I guess, but is there an XSL stylesheet
tool I can use to design things? Does anybody out there offer consultancy
services of this kind? And lastly, all of this presupposes that I can use
FO
to achieve very high-quality setting of academic books and journals, but is
this the right direction?

That's my first set of queries!

Best

Chris

__

Christopher Hamilton-Emery
Press Production Director
Cambridge University Press
The Edinburgh Building
Cambridge CB2 2RU, UK

tel: +44 (0)1223 325840 (direct and voicemail)
fax: +44 (0)1223 325700
web: http://www.cambridge.org
web: http://printing.cambridge.org (printing services)
web: http://uk.cambridge.org (outside North America)
web: http://us.cambridge.org (North America)
web: http://www.journals.cup.org (Journals)
__


- Original Message -
From: Michiel Verhoef [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, July 11, 2001 2:09 PM
Subject: RE: XHTML to PDF using FOP


 Hi,

 First, there is a weird d element in your last table. I'm no XHTML
expert
 but it is not HTML AFAIK.

 Second, some of the tr are missing td elements. A tr needs a td
(at
 least, in HTML it does)
 so my guess is that your XHTML is not valid HTML. Any xsl that converts
 valid HTML to say, fo will give
 errors or at least not the desired result..

 HTH,

 Michiel

 $ -Original Message-
 $ From: rajeev nair [mailto:[EMAIL PROTECTED]]
 $ Sent: woensdag 11 juli 2001 14:15
 $ To: [EMAIL PROTECTED]
 $ Subject: XHTML to PDF using FOP
 $
 $
 $ HELLO,
 $ can anybody help me to convert my XHTMLinto pdf.
 $ the XHTML I'M GIVING BELOW.if I avoid all the anchor
 $ tags(a)tags and table tags and make it pure xsl data
 $ file then i'm easily able to write xslfo file for this
 $ and it is making good pdf.
 $ But for the given Xhtml file how i write xslfo.My real
 $ confusion is where there is table,tr,td tags and also
 $ anchor tags.
 $ Can anyone help me.
 $
 $ ?xml version=1.0?
 $ html
 $ head
 $ link rel=stylesheet href=test2.css
 $ type=text/x-oeb1-css/
 $ /head
 $ body
 $ a name=toc
 $ toc
 $ table
 $ tr
 $ td align=left
 $ h2
 $
 $ bContent/b
 $ /h2
 $ /td
 $ /tr
 $ tr
 $ a
 $ href=#chapTitle Image/a
 $ /tr
 $ tr
 $ a
 $ href=#chap0Page1/a
 $ /tr
 $
 $ tr
 $ a
 $ href=#chap1Page2/a
 $ /tr
 $
 $ tr
 $ a
 $ href=#chap2Page3/a
 $ /tr
 $
 $ tr
 $ a
 $ href=#chap3Page4/a
 $ /tr
 $
 $ tr
 $ a
 $ href=#chap4Page5/a
 $ /tr
 $
 $ tr
 $ a
 $ href=#chap5Page6/a
 $ /tr
 $
 $ /table
 $ /toc
 $ /a
 $ br/
 $ br/
 $ br/
 $ br/
 $ br/
 $ br/
 $ br/
 $ br/
 $ br/
 $ br/
 $ br/
 $ br/
 $ br/
 $ a name=chap
 $ chap
 $ table border=25
 $ img src=part1.gif/
 $ /table
 $ /chap
 $ /a
 $ br/
 $ br/
 $ br/
 $ br/
 $ br/
 $ br/
 $ a name=chap0
 $ chap0
 $ book3.Click the
 $ sheet-tab Score to bring
 $ the worksheet Score to front. Now let us select the
 $ range B4:E7 (figure 10.26 shows the data to be
 $ copied). Click the cell B4, press the Shift key (and
 $ hold it down), click the cell E7, release the Shift
 $ key. Now the range B4:E7 is successfully
 $ selected./book
 $ book4. Choose Edit
 $ Copy (or click the Copy
 $ tool) and the data in the range gets copied to the
 $ clipboard. Also a running, dotted rectangle (also
 $ called marching ants, marquis, or moving boundary)
 $ appears around the selected range. These marching ants
 $ indicate that Paste tool (and command Paste in the
 $ Edit-menu) is enabled. Paste tool remains enabled as
 $ long as marching ants are present. In order to remove
 $ these marching ants simply strike the Esc key. /book
 $ book5. We want to
 $ paste this data in the Sheet2
 $ of Sales Data.xls therefore, choose Window  Sales Data
 $ (or click the Sales Data icon on the taskbar) in order
 $ to make the workbook Sales Data to be current one.
 $ Then click the sheet-tab Sheet2 to bring the worksheet
 $ Sheet2 to the front. /book
 $ book6. Click the cell
 $ B4 and choose Edit  Paste
 $ (or click the Paste tool). Alternatively, click the
 $ cell B4 and simply strike the Enter key. Also, strike
 

Re: Migration

2001-07-11 Thread Sebastian Rahtz

Chris Hamilton-Emery writes:

  services of this kind? And lastly, all of this presupposes that I can use FO
  to achieve very high-quality setting of academic books and journals, but is
  this the right direction?

My gut feeling is that you would be unwise to depend too much on FO
at this point in the game. Yes, XSL FO works, in various
implementations, and you can do pretty-reasonable typesetting, but

 - the spec is still not fully finished
 - it does  not aim to cover everything in this version
 - the implementations are very much in development

so of course you could and should set up some trial projects, but
don't assume you can switch to it at the end of the year :-}

I have just finished a typical simple book in FO, an academic
conference proceedings. The design is not complex at all, and the
result is indistinguishable from what I would have done last year in
LaTeX. But thats the rub - its like LaTeX, not Quark. So you have the
same power, the same problems, and the same support burden. With the
downside that the typesetting is taken to one remove, so that your
style cannot talk to the typesetting engine.

It's that very high-quality setting phrase that worries me. I know
what sort of standards you have in Cambridge, and I would not want to
bet money that FO is really up to the job.

Sebastian


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




Can't build fop: Hangs after Starting Ant...

2001-07-11 Thread Gregor N. Purdy

Its been some time since I've been able to build fop from CVS. I just
completed a fresh checkout of xml-fop and when I run ./build.sh, the
thing just hangs after printing Starting Ant

Has anyone else run into this? Is it solved? I'd like to get back to
using FOP for some of my projects, and I'd prefer to track the
development rather than go back to an older release.


Regards,

-- Gregor
 _ 
/ \
   Gregor N. Purdy  [EMAIL PROTECTED]
   Focus Research, Inc.http://www.focusresearch.com/
   8080 Beckett Center Drive #203   513-860-3570 vox
   West Chester, OH 45069   513-860-3579 fax
\_/



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




Fop flop?

2001-07-11 Thread Mark Lillywhite

Hi foppers

I just checked out the latest fop from CVS (after a long hiatus). After 
building it I get the attached messages when I try to run it against an 
input file that works under the version of FOP I downloaded from the web 
page today. I suspect this is a problem with the CVS FOP but I'm not 
100% sure, can anyone help me? Is the CVS FOP currently working? One 
point is that the padding- referred to in the error message does not 
exist in my (extremely simple, but very large) input file.

Also I was wondering about the status of the large document (memory 
related) patches that I think were submitted a few weeks ago (since this 
is what I would like to look at/work on). Can anyone tell me if they 
have been committed yet, or if they will be committed, or if I am asking 
too many questions? :-)

My thanks of a general kind to the developers,

Cheers
Mark


[mark@spiffy xml-fop]$ java -jar build/fop.jar /tmp/bigfile.fo 
/tmp/bigfile.pdf
FOP 0.19.0-CVS
using SAX parser org.apache.xerces.parsers.SAXParser
building formatting object tree
setting up fonts
formatting FOs into areas
 [1WARNING: no Maker for padding-
WARNING: property padding- ignored
WARNING: no Maker for padding-
WARNING: no Maker for padding-
WARNING: property padding- ignored
WARNING: no Maker for padding-
WARNING: no Maker for padding-
WARNING: property padding- ignored
WARNING: no Maker for padding-
WARNING: no Maker for padding-
WARNING: property padding- ignored
WARNING: no Maker for padding-
WARNING: property padding- ignored
ERROR: null
[mark@spiffy xml-fop]$



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




RE: Messages

2001-07-11 Thread Don Seib

FOP writes all of its messages out through a static MessageHandler object.
You can direct those messages by calling the setOutputMethod method on that
object before you start the render operation like so:

MessageHandler.setOutputMethod( MessageHandler.NONE );

There are also methods to get the current output method so you can save it
and restore it later.

Don Seib
Software Developer
Landmark Graphics Canada
[EMAIL PROTECTED]
(403) 218-2243

-Original Message-
From: Jim Urban [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, July 11, 2001 10:31 AM
To: [EMAIL PROTECTED]
Subject: Messages

Just a simple question.  Each time I run FOP in my servlet I get the
following messages generated to Tomcat's output:

building formatting object tree
setting up fonts
formatting FOs into areas
 [1]
rendering areas to PDF
writing out PDF

Is there anyway I can turn these messages off?  I will be using FOP quite
heavily in my high traffic application and I don't want my Tomcat log filled
with these messages.
BTW:  Now that I got FOP and Xalan working, I love them, keep up the good
work!

Thanks,

Jim Urban
Product Manager
Netsteps Inc.
Suite 505E
1 Pierce Pl.
Itasca, IL  60143
Voice:  (630) 250-3045 x2164
Fax:  (630) 250-3046


-
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: Messages

2001-07-11 Thread Heiko Barthel

Try the static methos:

// switch off FOP messages
MessageHandler.setOutputMethod(MessageHandler.NONE);


Heiko

 Is there anyway I can turn these messages off?  I will be using FOP quite
 heavily in my high traffic application and I don't want my Tomcat log

-- 
GMX - Die Kommunikationsplattform im Internet.
http://www.gmx.net

GMX Tipp:

Machen Sie Ihr Hobby zu Geld bei unserem Partner 11!
http://profiseller.de/info/index.php3?ac=OM.PS.PS003K00596T0409a


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




Re: properties, elements

2001-07-11 Thread Karen Lease

Keiron Liddle wrote:
 

 
 Then after that I will see about handling the element child constraints (I
 haven't worked out how this should be done yet, any ideas) and doing a
 similar thing (to be impl.) with the rest of the elements that we don't
 have yet.


For things like tables, I had been thinking of handling child type
checking in the addChild method. That way we can give messages early in
the game and also do special things like handling different children in
special ways. An example is when table-cell FO are directly under a
table-body (or header or footer) rather than in a table-row. In that
case, I think it would be better to create a fake row to hold them.
That kind of work is logically done during FO tree building.
 
However that's rather a piecemeal approach. Perhaps it would be good to
describe (schema? DTD?) the possible child types and have the base class
implementation do that kind of checking.

Just my .02 euros!

Karen

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




RE: how starting FOP without XML-File

2001-07-11 Thread Marc Jenzer



Jim,

Thanks a lot for 
your help! It works now!

Cheers

Marc



RE: Messages

2001-07-11 Thread John Wyman

I had to delete the entire build directory and rebuild before these
errors would go away.
John


John H. Wyman
5160 Darry Lane
Dublin, OH 43016
(614)-889-0698
[EMAIL PROTECTED] mailto:[EMAIL PROTECTED]
Wyman Genealogy Site http://www.wyman.org
Francis Wyman Assoc email List
http://groups.yahoo.com/group/FrancisWymanAssoc
Wyman Family Genealogy Forum http://genforum.genealogy.com/wyman/
The Wyman Surname Message Board
http://www.familyhistory.com/messages/messages.asp?category=surnamefor
um=Wyman

  

-Original Message-
From: Don Seib [mailto:[EMAIL PROTECTED]] 
Sent: Wednesday, July 11, 2001 1:40 PM
To: '[EMAIL PROTECTED]'
Subject: RE: Messages


FOP writes all of its messages out through a static MessageHandler
object. You can direct those messages by calling the setOutputMethod
method on that object before you start the render operation like so:

MessageHandler.setOutputMethod( MessageHandler.NONE );

There are also methods to get the current output method so you can save
it and restore it later.

Don Seib
Software Developer
Landmark Graphics Canada
[EMAIL PROTECTED]
(403) 218-2243

-Original Message-
From: Jim Urban [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, July 11, 2001 10:31 AM
To: [EMAIL PROTECTED]
Subject: Messages

Just a simple question.  Each time I run FOP in my servlet I get the
following messages generated to Tomcat's output:

building formatting object tree
setting up fonts
formatting FOs into areas
 [1]
rendering areas to PDF
writing out PDF

Is there anyway I can turn these messages off?  I will be using FOP
quite heavily in my high traffic application and I don't want my Tomcat
log filled with these messages.
BTW:  Now that I got FOP and Xalan working, I love them, keep up the
good work!

Thanks,

Jim Urban
Product Manager
Netsteps Inc.
Suite 505E
1 Pierce Pl.
Itasca, IL  60143
Voice:  (630) 250-3045 x2164
Fax:  (630) 250-3046


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

-
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: Fop flop?

2001-07-11 Thread John Wyman

I had to delete the entire build directory and rebuild before these
errors would go away. Something isn't getting extracted properly.
John


John H. Wyman
5160 Darry Lane
Dublin, OH 43016
(614)-889-0698
[EMAIL PROTECTED] mailto:[EMAIL PROTECTED]
Wyman Genealogy Site http://www.wyman.org
Francis Wyman Assoc email List
http://groups.yahoo.com/group/FrancisWymanAssoc
Wyman Family Genealogy Forum http://genforum.genealogy.com/wyman/
The Wyman Surname Message Board
http://www.familyhistory.com/messages/messages.asp?category=surnamefor
um=Wyman

  

-Original Message-
From: Mark Lillywhite [mailto:[EMAIL PROTECTED]] 
Sent: Wednesday, July 11, 2001 5:45 AM
To: [EMAIL PROTECTED]
Subject: Fop flop?


Hi foppers

I just checked out the latest fop from CVS (after a long hiatus). After 
building it I get the attached messages when I try to run it against an 
input file that works under the version of FOP I downloaded from the web

page today. I suspect this is a problem with the CVS FOP but I'm not 
100% sure, can anyone help me? Is the CVS FOP currently working? One 
point is that the padding- referred to in the error message does not 
exist in my (extremely simple, but very large) input file.

Also I was wondering about the status of the large document (memory 
related) patches that I think were submitted a few weeks ago (since this

is what I would like to look at/work on). Can anyone tell me if they 
have been committed yet, or if they will be committed, or if I am asking

too many questions? :-)

My thanks of a general kind to the developers,

Cheers
Mark


[mark@spiffy xml-fop]$ java -jar build/fop.jar /tmp/bigfile.fo 
/tmp/bigfile.pdf
FOP 0.19.0-CVS
using SAX parser org.apache.xerces.parsers.SAXParser
building formatting object tree
setting up fonts
formatting FOs into areas
 [1WARNING: no Maker for padding-
WARNING: property padding- ignored
WARNING: no Maker for padding-
WARNING: no Maker for padding-
WARNING: property padding- ignored
WARNING: no Maker for padding-
WARNING: no Maker for padding-
WARNING: property padding- ignored
WARNING: no Maker for padding-
WARNING: no Maker for padding-
WARNING: property padding- ignored
WARNING: no Maker for padding-
WARNING: property padding- ignored
ERROR: null
[mark@spiffy xml-fop]$



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


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




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

2001-07-11 Thread klease

klease  01/07/11 14:27:40

  Modified:src/org/apache/fop/fo/flow TableRow.java
  Log:
  Fix spanning bug; use height property
  
  Revision  ChangesPath
  1.46  +6 -5  xml-fop/src/org/apache/fop/fo/flow/TableRow.java
  
  Index: TableRow.java
  ===
  RCS file: /home/cvs/xml-fop/src/org/apache/fop/fo/flow/TableRow.java,v
  retrieving revision 1.45
  retrieving revision 1.46
  diff -u -r1.45 -r1.46
  --- TableRow.java 2001/07/04 21:16:02 1.45
  +++ TableRow.java 2001/07/11 21:27:36 1.46
  @@ -1,4 +1,4 @@
  -/*-- $Id: TableRow.java,v 1.45 2001/07/04 21:16:02 klease Exp $ --
  +/*-- $Id: TableRow.java,v 1.46 2001/07/11 21:27:36 klease Exp $ --
* Copyright (C) 2001 The Apache Software Foundation. All rights reserved.
* For details on use and redistribution please refer to the
* LICENSE file included with these sources.
  @@ -43,7 +43,7 @@
   
   int widthOfCellsSoFar = 0;
   int largestCellHeight = 0;
  -
  +int minHeight = 0; // force row height
   Vector columns;
   
   AreaContainer areaContainer;
  @@ -81,8 +81,8 @@
   * Otherwise return value = input value.
   */
   int getNextFreeCell(int colNum) {
  -for (int i=colNum-1; icells.length; i++) {
  -if (cells[i] == null) return i+1;
  +for (int i=colNum-1; istates.length; i++) {
  +if (states[i] == EMPTY) return i+1;
   }
   return -1;
   }
  @@ -194,6 +194,7 @@
this.keepWithPrevious = getKeepValue(keep-with-previous.within-column);
   
this.id = this.properties.get(id).getString();
  + this.minHeight = this.properties.get(height).getLength().mvalue();
setup = true;
   }
   
  @@ -264,7 +265,7 @@
areaContainer.setAbsoluteHeight(area.getAbsoluteHeight());
areaContainer.setIDReferences(area.getIDReferences());
   
  - largestCellHeight = 0;
  + largestCellHeight = minHeight;
   
// Flag indicaing whether any cell didn't fit in available space
boolean someCellDidNotLayoutCompletely = false;
  
  
  

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




Re: Fop flop?

2001-07-11 Thread Karen Lease

Hi Mark,

To fix the error messages, please build the clean target and then
rebuild. New properties added have changed values for a lot of constants
and all the classes need to be recompiled.

HTH,
Karen

Mark Lillywhite wrote:
 
 Hi foppers
 
 I just checked out the latest fop from CVS (after a long hiatus). After
 building it I get the attached messages when I try to run it against an
 input file that works under the version of FOP I downloaded from the web
 page today. I suspect this is a problem with the CVS FOP but I'm not
 100% sure, can anyone help me? Is the CVS FOP currently working? One
 point is that the padding- referred to in the error message does not
 exist in my (extremely simple, but very large) input file.
 
 Also I was wondering about the status of the large document (memory
 related) patches that I think were submitted a few weeks ago (since this
 is what I would like to look at/work on). Can anyone tell me if they
 have been committed yet, or if they will be committed, or if I am asking
 too many questions? :-)
 
 My thanks of a general kind to the developers,
 
 Cheers
 Mark
 
 [mark@spiffy xml-fop]$ java -jar build/fop.jar /tmp/bigfile.fo
 /tmp/bigfile.pdf
 FOP 0.19.0-CVS
 using SAX parser org.apache.xerces.parsers.SAXParser
 building formatting object tree
 setting up fonts
 formatting FOs into areas
  [1WARNING: no Maker for padding-
 WARNING: property padding- ignored
 WARNING: no Maker for padding-
 WARNING: no Maker for padding-
 WARNING: property padding- ignored
 WARNING: no Maker for padding-
 WARNING: no Maker for padding-
 WARNING: property padding- ignored
 WARNING: no Maker for padding-
 WARNING: no Maker for padding-
 WARNING: property padding- ignored
 WARNING: no Maker for padding-
 WARNING: property padding- ignored
 ERROR: null
 [mark@spiffy xml-fop]$
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, email: [EMAIL PROTECTED]

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




Questions about FOP, Batik, Java Graphics to PDF, SVG, etc

2001-07-11 Thread Randall Parker

I'm intending to try to use Batik and FOP to convert graphics drawn with 
java.awt.Graphics2D to PDF, SVG, and 
PNG. I'm especially interested in generating PDF. 

The relevant classes appear to be:
   org.apache.fop.svg.PDFDocumentGraphics2D
   org.apache.fop.svg.PDFGraphics2D
   org.apache.fop.svg.PDFTranscoder
   org.apache.fop.svg.PDFDocument

   org.apache.batik.svggen.SVGGraphics2D

Questions:

1) I've seen these paths used in discussions on this list. But they are not in the 
source downloads. Are they old 
package paths for old versions that are no longer used?
   org.apache.svg.PDFDocumentGraphics2D
   org.apache.svg.PDFTranscoder

2) Should I be trying to use the release versions of Batik and FOP? Or nightlies?
   Its my impression from reading the lists that important fixes have been getting 
done in this area. I don't need my 
app to be stable enough for production as I'm still developing myself. So it makes 
more sense to me to be on the 
bleeding edge reporting and even debugging what happens in the latest versions of the 
relevant FOP and Batik 
classes so that they work as well as possible in their future versions. 
   So does it make sense to go with the recent FOP nightlies? Kinda seems that way to 
me.

3) Can one use the recent nightlies of Batik with the recent nightlies of FOP? Or does 
Batik need to be customized 
to be workable with FOP? 

4) What's the longer term plan with Batik and FOP integration? Will some of the code 
for doing these things be 
shifted btw FOP and Batik? 





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