Re: Capturing FOP logging message event in an embedded application using FOP 0.94

2007-11-14 Thread Michael Tracey Zellmann
Thanks for the response.

I am trying to think of a way to still succeed.

What I want to do is to send all logging messages from anything related to
FOP to their own file.

In the logging.properties, I tried:
org.apache.fop.FileHandler = java.util.logging.FileHandler
org.apache.fop.FileHandler.pattern = logs/docgen.log
org.apache.fop.FileHandler.limit = 5000
org.apache.fop.FileHandler.formatter = java.util.logging.SimpleFormatter

but that does not work.

I can say
java.util.logging.FileHandler.pattern = logs/docgenAll.log
and that will send all logging messages from any source to the file
docgenALL -
hwoever, I don't want all the messages - only ones froma class in the fop
hierarchy.

What should I do to accomplish this ?



On Nov 13, 2007 3:04 PM, Andreas L Delmelle [EMAIL PROTECTED] wrote:

 On Nov 13, 2007, at 18:29, Michael Tracey Zellmann wrote:

 Hi

  I have developed an application that generates PDFs of
  documentation in an eclipse environment controlled by a variety of
  SWT widgets.
 
  My customer would like his users to know when FOP has encountered a
  problem, but give them a simple message. We are already trapping
  exceptions, so I am interested in the kinds of events where FOP may
  generate a WARNING or SEVERE logging message. Like - the text has
  exceeded the allowed width and is overwriting another area, or the
  bookmark ids are pointing to a null view-port, for instance. I know
  how to write a File Handler to route those message to a file. Is
  there a way I can capture an event that will tell us to pop a
  dialog to the user, and hopefully get part of the logging message ?

 I fear you have stumbled upon a well-known shortcoming of FOP 0.9x:
 the error-reporting is not really what it should be. We all know it,
 but haven't found the time so far to take steps towards implementing
 something better, so exceptions and log messages are all there is to
 catch FTM... :(


 Sorry

 Andreas

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




Capturing FOP logging message event in an embedded application using FOP 0.94

2007-11-13 Thread Michael Tracey Zellmann
I have developed an application that generates PDFs of documentation in an
eclipse environment controlled by a variety of SWT widgets.

My customer would like his users to know when FOP has encountered a problem,
but give them a simple message. We are already trapping exceptions, so I am
interested in the kinds of events where FOP may generate a WARNING or SEVERE
logging message. Like - the text has exceeded the allowed width and is
overwriting another area, or the bookmark ids are pointing to a null
view-port, for instance. I know how to write a File Handler to route those
message to a file. Is there a way I can capture an event that will tell us
to pop a dialog to the user, and hopefully get part of the logging message ?


Re: getting FOP to work with Java using 0.94

2007-11-02 Thread Michael Tracey Zellmann
Thanks.

closing the OutputStream fixed my problem, and your way of getting the
xml file is clearly better.

I used to get a Fop instance directly from the constructor, but that
is deprecated now, in favor of the FopFactory. That was the change I
had encountered.

On Nov 2, 2007 3:41 AM, Jeremias Maerki [EMAIL PROTECTED] wrote:
 FOP's API hasn't changed. I don't remember any change in that area that
 could trigger this, but I could also be wrong. Anyway, what I'm missing
 in your code snippet is a try..finally around the code where the
 OutputStream is closed in the finally section. That omission is most
 likely the reason for the file corruption.

 As a side-note, it's inefficient to load the XML file as a DOM and then
 pass it to the XSL transformation. Please take a look at our examples
 and use a SAX-based approach:
 http://xmlgraphics.apache.org/fop/0.94/embedding.html#ExampleXML2PDF

 Jeremias Maerki




 On 02.11.2007 00:42:58 Michael Tracey Zellmann wrote:
  I was using 0.93 successfully some time ago, and I have another
  application to use,
  so I downloaded 0.94.
 
  I am using Java 1.5.0_11
 
  I tried to set things up correctly, but the PDF I generated can't be
  read by Adobe Reader 8. I get a message that the file has been damaged
  and can't be repaired.
 
  I have some code that reads a source document, builds an Fop from a
  FopFactory using MimeConstants.MIME_PDF and an OutputStream. I build a
  Transformer from a TransformerFactory using an XSLT file, get a
  SAXResult from the fop, and then transform the source into the result.
 
  I have tried a very simple style sheet but no success.
 
  Can anyone help me understand what is wrong, or point me to a basic
  example that will work with the new version?
 
  Here is the code:
 
 
 DocumentBuilderFactory dbf =
  DocumentBuilderFactory.newInstance();
 DocumentBuilder db = null;
 Document input = null;
 try {
 db = dbf.newDocumentBuilder();
 input = db.parse(new
  File(input/astruct/primitives/System.xml));
 } catch (ParserConfigurationException e) { 
  e.printStackTrace();
 } catch (SAXException e) { e.printStackTrace();
 } catch (IOException e) { e.printStackTrace(); }
 Source src = new DOMSource(input);
 FopFactory fopFactory = FopFactory.newInstance();
 OutputStream out = null;
 File outputDir = new File(output);
 File outputFile = new File(outputDir, System.pdf);
 try {
 out = new BufferedOutputStream(new
  FileOutputStream(outputFile));
 } catch (FileNotFoundException e) {e.printStackTrace();}
 Fop fop = null;
 try {
 fop = fopFactory.newFop(MimeConstants.MIME_PDF, out);
 } catch (FOPException e) { e.printStackTrace(); }
 File xsltFile = new File(xslt/module-fo.xslt);
 TransformerFactory trFactory = 
  TransformerFactory.newInstance();
 Transformer transformer = null;
 try {
 transformer = trFactory.newTransformer(new
  StreamSource(xsltFile));
 } catch (TransformerConfigurationException e)
  {e.printStackTrace();}
 Result res = null;
 try {
 res = new SAXResult(fop.getDefaultHandler());
 } catch (FOPException e) { e.printStackTrace(); }
 try {
 transformer.transform(src, res);
 } catch (TransformerException e) { e.printStackTrace();}
 


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



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



Re: controlling space before a table row

2006-03-21 Thread Tracey Zellmann

Thanks, Jeremias.

Two straightforward solutions.

- Original Message - 
From: Jeremias Maerki [EMAIL PROTECTED]

To: fop-users@xmlgraphics.apache.org
Sent: Tuesday, March 21, 2006 3:41 AM
Subject: Re: controlling space before a table row



padding-top does not apply to table-row. So, you can't use that. Your
second attempt with the border on the table will only place a border on
the table and only if you also specify border-top-style, but it won't
help you either. The easiest thing IMO is to use an empty table-row with
a specified height, i.e.:

fo:table-row height=.2in
 fo:table-cellfo:block//fo:table-cell
/fo:table-row

Of course, you can also use margin-before on every first block in every
table-cell.

On 21.03.2006 01:52:51 Tracey Zellmann wrote:
I have a table in my document, and I would like to make extra space 
appear

between certain rows. Not sure how to accomplish that. I have tried
fo:table-row padding-top=.2in
and
fo:table border-top-width=.2in
but neither have had any affect.

I am trying to achieve something like fo:block margin-before=.2in

I am not sure this is the right approach.

Any help will be appreciated.




Jeremias Maerki


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






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



Re: X-Bar symbol

2006-03-20 Thread Tracey Zellmann

Thanks. That worked perfectly.

- Original Message - 
From: Manuel Mall [EMAIL PROTECTED]

To: fop-users@xmlgraphics.apache.org
Sent: Monday, March 20, 2006 1:19 AM
Subject: Re: X-Bar symbol



On Mar 19, 2006, at 5:54 PM, Tracey Zellmann wrote:


I am looking for an easy way to print an X with a bar over it - the
symbol for the average of a sample. I could do it with svg, but I was
hoping for a slightly easier approach. The symbol will occupy one header
cell in a table row, so it has room to the left and right.


I think you're looking for the text-decoration=line-through
property[1]. I haven't tested it, but according to the FOP Compliance
page[2], this should be supported.

So, it would look like this (untested):

fo:inline text-decoration=line-throughX/fo:inline

snip/

As Tracy seems to look for a bar above the x text-decoration=overline is
probably what she needs.

Another way would be to use a fo:inline or fo:character with an
appropriate border-before and/or padding-before setting.


Clay Leeds
[EMAIL PROTECTED] mailto:[EMAIL PROTECTED]



Manuel


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






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



controlling space before a table row

2006-03-20 Thread Tracey Zellmann
I have a table in my document, and I would like to make extra space appear 
between certain rows. Not sure how to accomplish that. I have tried

fo:table-row padding-top=.2in
and
fo:table border-top-width=.2in
but neither have had any affect.

I am trying to achieve something like fo:block margin-before=.2in

I am not sure this is the right approach.

Any help will be appreciated. 




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



X-Bar symbol

2006-03-19 Thread Tracey Zellmann



I am looking for an easy way to print an X with a 
bar over it - the symbol for the average of a sample. I could do it with svg, 
but I was hoping for a slightly easier approach. The symbol will occupy one 
header cell in a table row, so it has room to the left and 
right.


getting veradana font to work

2006-03-06 Thread Tracey Zellmann
I am not able to get Verdana to work. I have tried to follow the 
documentation. I have also read the recent emails about embedded font 
problems, but I can't quite follow the details.


I am getting this error.
SEVERE: svg graphic could not be rendered: null
java.lang.NullPointerException
at org.apache.fop.fonts.LazyFont.mapChar(LazyFont.java:97)
at org.apache.fop.fonts.Font.mapChar(Font.java:144)
at org.apache.fop.svg.PDFTextPainter.getStringWidth(PDFTextPainter.java:266)
at org.apache.fop.svg.PDFTextPainter.paint(PDFTextPainter.java:219)
at org.apache.batik.gvt.TextNode.primitivePaint(Unknown Source)
at org.apache.batik.gvt.AbstractGraphicsNode.paint(Unknown Source)
at org.apache.batik.gvt.CompositeGraphicsNode.primitivePaint(Unknown Source)
at org.apache.batik.gvt.AbstractGraphicsNode.paint(Unknown Source)
at org.apache.batik.gvt.CompositeGraphicsNode.primitivePaint(Unknown Source)
at org.apache.batik.gvt.CanvasGraphicsNode.primitivePaint(Unknown Source)
at org.apache.batik.gvt.AbstractGraphicsNode.paint(Unknown Source), and many 
more...


Here are the steps I have taken

Create font metrics from the local Verdana.ttf file in C:\WINDOWS\FONTS 
using TTFReader
the command window messages indicates it was successful, and the file is 
ttfcm.xml
I did use the -enc ansi otpion. My target customers are using Windows and 
will have the same Verdana font available locally.


Register Fonts with FOP.
I took the configuration file that comes with the distribution fop.xconf, 
and added these elements in the fonts element.

fo:inline font-family=Verdana font-weight=normal font-style=normal
Verdana-normal-normal font
/fo:inline

font 
metrics-url=fle:///C:/unzipped/fop-0.91beta-bin-jdk1.4/fop-0.91beta/ttfcm.xml

font-triplet name=Verdana style=normal weight=normal/
/font



Tell FOP about the configuration

   Fop fop = new Fop(MimeConstants.MIME_PDF);
   DefaultConfigurationBuilder cfgBuilder =
   new DefaultConfigurationBuilder();
   Configuration cfg = cfgBuilder.buildFromFile(
C:/unzipped/fop-0.91beta-bin-jdk1.4/fop-0.91beta/conf/fop.xconf);
   FOUserAgent userAgent = fop.getUserAgent();
   userAgent.setUserConfig(cfg);

For completeness, here is how I am trying to invoke the font within the svg 
element.


g style=font-family: Verdana, sans-serif; font-size: 10pt; stroke: none; 
fill: black;


Any help would be appreciated. Is there a worked example that touches all 
the aspects?





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



Re: getting veradana font to work

2006-03-06 Thread Tracey Zellmann

HOORAY!

You are exactly right. That was it. I was tearing out my hair.

Sorry to take your time with a typo, but I just couldn't find it without 
another pair of eyes.


- Original Message - 
From: Dirk Bromberg [EMAIL PROTECTED]

To: fop-users@xmlgraphics.apache.org
Sent: Monday, March 06, 2006 7:57 AM
Subject: Re: getting veradana font to work



Have you seen the typo error ?:

font 
metrics-url=fle:///C:/unzipped/fop-0.91beta-bin-jdk1.4/fop-0.91beta/ttfcm.xml

---   
   font-triplet name=Verdana style=normal weight=normal/
/font

Dirk

Tracey Zellmann wrote:
I am not able to get Verdana to work. I have tried to follow the 
documentation. I have also read the recent emails about embedded font 
problems, but I can't quite follow the details.


I am getting this error.
SEVERE: svg graphic could not be rendered: null
java.lang.NullPointerException
at org.apache.fop.fonts.LazyFont.mapChar(LazyFont.java:97)
at org.apache.fop.fonts.Font.mapChar(Font.java:144)
at 
org.apache.fop.svg.PDFTextPainter.getStringWidth(PDFTextPainter.java:266)

at org.apache.fop.svg.PDFTextPainter.paint(PDFTextPainter.java:219)
at org.apache.batik.gvt.TextNode.primitivePaint(Unknown Source)
at org.apache.batik.gvt.AbstractGraphicsNode.paint(Unknown Source)
at org.apache.batik.gvt.CompositeGraphicsNode.primitivePaint(Unknown 
Source)

at org.apache.batik.gvt.AbstractGraphicsNode.paint(Unknown Source)
at org.apache.batik.gvt.CompositeGraphicsNode.primitivePaint(Unknown 
Source)

at org.apache.batik.gvt.CanvasGraphicsNode.primitivePaint(Unknown Source)
at org.apache.batik.gvt.AbstractGraphicsNode.paint(Unknown Source), and 
many more...


Here are the steps I have taken

Create font metrics from the local Verdana.ttf file in C:\WINDOWS\FONTS 
using TTFReader
the command window messages indicates it was successful, and the file is 
ttfcm.xml
I did use the -enc ansi otpion. My target customers are using Windows and 
will have the same Verdana font available locally.


Register Fonts with FOP.
I took the configuration file that comes with the distribution fop.xconf, 
and added these elements in the fonts element.
fo:inline font-family=Verdana font-weight=normal 
font-style=normal

Verdana-normal-normal font
/fo:inline

font 
metrics-url=fle:///C:/unzipped/fop-0.91beta-bin-jdk1.4/fop-0.91beta/ttfcm.xml

font-triplet name=Verdana style=normal weight=normal/
/font



Tell FOP about the configuration

   Fop fop = new Fop(MimeConstants.MIME_PDF);
   DefaultConfigurationBuilder cfgBuilder =
   new DefaultConfigurationBuilder();
   Configuration cfg = cfgBuilder.buildFromFile(
C:/unzipped/fop-0.91beta-bin-jdk1.4/fop- 
0.91beta/conf/fop.xconf);

   FOUserAgent userAgent = fop.getUserAgent();
   userAgent.setUserConfig(cfg);

For completeness, here is how I am trying to invoke the font within the 
svg element.


g style=font-family: Verdana, sans-serif; font-size: 10pt; stroke: 
none; fill: black;


Any help would be appreciated. Is there a worked example that touches all 
the aspects?





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




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






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



Changing logging behavior in an embedded application.

2006-03-04 Thread Tracey Zellmann
I have dug through what documentation I can find, but it hasn't helped me, 
so maybe the list can give me some guidance.


I have my application running successfully.  I am using fop 
0.91beta-bin-jdk1.4 It publishes a PDF using FOP within another java 
application, not from the command line, so I believe you would call it 
embedded.


I need to change the way logging messages are handled. Currently, I am 
getting a large number of warning messages printed to the console. With 
Jeremias Maerki's help, I can see they are caused my some namespace issues 
with some imported svg images I am using from MS Visio. Essentially, they 
can be ignored, and that is what I have been doing. However, next week, I 
have to turn this over to the first wave of normal users, so I don't want 
to overwhelm them with these messages.


I would like all messages to go to a log file, not the console. I would 
prefer that warning level messages go to a file that is typically 
overwritten, so they don't accumulate. Anything higher than warning should 
go to another file which does append and accumulates the message history. I 
am pretty sure I could handle this using Java's java.util.logging API. 
However, I am not sure how to get hold of and change the current behavior of 
FOP logging.


Can someone illuminate this for me?

Thanks. 




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



table-layout

2006-02-26 Thread Tracey Zellmann



I am using fop 0.91.

I am getting a warning that fo:table, 
table-layout="auto" is currently not supported by FOP.
My table looks the way I want it to, but I wonder 
what I should be doing to avoid that warning.

I have a multi-column table where the width of the 
table is specified with 

fo:table width="7in"
for instance, and the columns are typically 
specified with 
fo:table-column column-number="4" 
column-width="35%"
I do not currently have any table-layout 
specified.


Re: table-layout

2006-02-26 Thread Tracey Zellmann



Excellent! That worked like a charm.

Another small question, if you or someone else has 
a moment.

I am using some spanned cells, but, at least for 
now, none of my table cells have any borders.

I am getting a warning with a TODO

WARNING: TODO Add collapsed border painting for 
spanned cells
What am I supposed to 
do? 

- Original Message - 
From: "Andreas L Delmelle" [EMAIL PROTECTED]
To: fop-users@xmlgraphics.apache.org
Sent: Sunday, February 26, 2006 1:30 
PM
Subject: Re: table-layout
 On Feb 26, 2006, at 18:36, Tracey Zellmann wrote:  
Hi Tracey,  I am using fop 0.91. I 
am getting a warning that fo:table, table-layout="auto" is  
currently not supported by FOP. My table looks the way I want it to, 
but I wonder what I should be  doing to avoid that 
warning. I have a multi-column table where the width of 
the table is  specified with fo:table 
width="7in" for instance, and the columns are typically 
specified with fo:table-column column-number="4" 
column-width="35%" I do not currently have any 
table-layout specified.  Just specify 
table-layout="fixed" on the table, and the warning  should go 
away. I guess it's caused by the default/initial value of  
table-layout being "auto"...   HTH!  
Cheers,  Andreas  
- To 
unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] 


Re: table-layout

2006-02-26 Thread Tracey Zellmann

Thanks That worked perfectly as well.

Now that I seem to at least have FOP working, I want to make better use of 
its facilities. How can I get a handle on the basic parameters - like these 
ones that I encounter. The underlying documentation has been helpful to get 
the examples running, and from those, to get my own applictaion running. 
However, when I try to delve deeper, things get a bit murky.


I must say, this list has been very helpful. I am also impressed at the 
global scope - makes 24 * 7 almost feasible!


- Original Message - 
From: Manuel Mall [EMAIL PROTECTED]

To: fop-users@xmlgraphics.apache.org
Sent: Sunday, February 26, 2006 6:04 PM
Subject: Re: table-layout



On Monday 27 February 2006 02:59, Tracey Zellmann wrote:

Excellent! That worked like a charm.

Another small question, if you or someone else has a moment.

I am using some spanned cells, but, at least for now, none of my
table cells have any borders.

I am getting a warning with a TODO

WARNING: TODO Add collapsed border painting for spanned cells

What am I supposed to do?



Try specifying border-collapse=separate on the table.

Manuel

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






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



Re: best way to use fop to layout report.

2006-02-19 Thread Tracey Zellmann
Thanks for your reply and your offer. I'll take you up on it when I am a 
little farther along. Layout and FOP is new ground for me, so I appreciate 
any help.


- Original Message - 
From: Jeremias Maerki [EMAIL PROTECTED]

To: fop-users@xmlgraphics.apache.org
Sent: Saturday, February 18, 2006 4:50 PM
Subject: Re: best way to use fop to layout report.



Ah, I see now what you've been targetting at: Abusing tables to do all
sorts of layout tricks. Yeah, you can do that with XSL-FO, and yes,
depending on your layout requirements there are better choices. However,
FOP still doesn't implement some of the features that might help in
certain situations (like fo:float). You're welcome to point us/me to
your work if you would like someone give you a second-opinion/review at
any time. Usually, it's easier to make suggestions if you can actually
see what someone's doing.

On 18.02.2006 12:52:20 Tracey Zellmann wrote:

Thanks for the reply.

I will certainly post an example when I get it done. The first cut will 
just
be functional, and needs some feedback from the customer to get the 
layout

and details right.

Regarding Tables in FOP, I was reading Dave Pawson's book XSL-FO from
O'Reilly. His quote is:

XSL-FO is not like HTML. It is mostly unnecessary to use tables for 
layout
as has been done in HTML. The XSL-FO vocabulary provides so much more 
than
HTML that you shouldn't fall back on tables simply to obtain an effect 
you

have achieved on the Web. The table-formatting object is for formatting
tabular data. There may be circumstances where table-based formatting is
necessary, but they will be rare.

So, I am glad to hear that Tables are still useful and acceptable.

- Original Message - 
From: Jeremias Maerki [EMAIL PROTECTED]

To: fop-users@xmlgraphics.apache.org
Sent: Friday, February 17, 2006 4:05 PM
Subject: Re: best way to use fop to layout report.



 On 17.02.2006 20:08:19 Tracey Zellmann wrote:
 I am getting comfortable running and using fop. Now I need some advice
 on the best way to use it to create my report. It seems to me that a
 table at the start of each page will work, but I have read that FOP 
 has
 so much other capability, that tables are seldom needed. Let me 
 briefly

 describe my design, and someone may give me some feedback.

 On the contrary, I think that tables are one of most important features
 in XSL-FO.

 Survey participants have evaluated automobiles by sitting in different
 positions and answering 15 questions - either voting for 0 - 10, or
 marking an image of the car. Then for each question, they can also 
 offer

 text comments. The report will summarize and assemble this data. For
 various cars, there are one, two or three rows, always a left seat and 
 a

 right seat. The votes are tabulated in histograms, and the image marks
 are put onto svg images of the car, one for each question and 
 position.
 A four seat car would have 60. Comments are presented as a bulleted 
 list.


 The report would start one page for each seating row, with two 
 columns,

 left column for the left seat and right column for the right seat. The
 page title states the car name and the specific question. The column
 heading states the position. Then the column would have either a
 histogram or a car image, followed below by a bulleted list of 
 comments.
 Same thing repeated on the right column for the right seating 
 position.

 The number of respondents may be different for each position.

 The data is available as an xml document. I will write an xslt
 stylesheet to transform the data to fo.

 I can see how to do this with a table, much like how I could do it 
 with

 html. The car images and histograms would be in-line svg documents.

 Is there a better approach?

 If I understand your explanations, probably not. I can't think of any.
 Tables offer you a lot of possibilities for layout. Please post an
 example when you have something to show. It's always interesting so see
 what people do with XSL-FO/FOP. Good luck!


 Jeremias Maerki


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





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




Jeremias Maerki


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






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



Re: best way to use fop to layout report.

2006-02-18 Thread Tracey Zellmann

Thanks for the reply.

I will certainly post an example when I get it done. The first cut will just 
be functional, and needs some feedback from the customer to get the layout 
and details right.


Regarding Tables in FOP, I was reading Dave Pawson's book XSL-FO from 
O'Reilly. His quote is:


XSL-FO is not like HTML. It is mostly unnecessary to use tables for layout 
as has been done in HTML. The XSL-FO vocabulary provides so much more than 
HTML that you shouldn't fall back on tables simply to obtain an effect you 
have achieved on the Web. The table-formatting object is for formatting 
tabular data. There may be circumstances where table-based formatting is 
necessary, but they will be rare.


So, I am glad to hear that Tables are still useful and acceptable.

- Original Message - 
From: Jeremias Maerki [EMAIL PROTECTED]

To: fop-users@xmlgraphics.apache.org
Sent: Friday, February 17, 2006 4:05 PM
Subject: Re: best way to use fop to layout report.




On 17.02.2006 20:08:19 Tracey Zellmann wrote:

I am getting comfortable running and using fop. Now I need some advice
on the best way to use it to create my report. It seems to me that a
table at the start of each page will work, but I have read that FOP has
so much other capability, that tables are seldom needed. Let me briefly
describe my design, and someone may give me some feedback.


On the contrary, I think that tables are one of most important features
in XSL-FO.


Survey participants have evaluated automobiles by sitting in different
positions and answering 15 questions - either voting for 0 - 10, or
marking an image of the car. Then for each question, they can also offer
text comments. The report will summarize and assemble this data. For
various cars, there are one, two or three rows, always a left seat and a
right seat. The votes are tabulated in histograms, and the image marks
are put onto svg images of the car, one for each question and position.
A four seat car would have 60. Comments are presented as a bulleted list.

The report would start one page for each seating row, with two columns,
left column for the left seat and right column for the right seat. The
page title states the car name and the specific question. The column
heading states the position. Then the column would have either a
histogram or a car image, followed below by a bulleted list of comments.
Same thing repeated on the right column for the right seating position.
The number of respondents may be different for each position.

The data is available as an xml document. I will write an xslt
stylesheet to transform the data to fo.

I can see how to do this with a table, much like how I could do it with
html. The car images and histograms would be in-line svg documents.

Is there a better approach?


If I understand your explanations, probably not. I can't think of any.
Tables offer you a lot of possibilities for layout. Please post an
example when you have something to show. It's always interesting so see
what people do with XSL-FO/FOP. Good luck!


Jeremias Maerki


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






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



instream-foreign-object

2006-02-18 Thread Tracey Zellmann



I am having some trouble gettiong an instream svg 
image into my fop document, and hope that soemone in this formum might 
help.

I have an xml document, which contains several svg 
images, as well as other content. Some of the images were created from a 
template developed through Microsoft Visio. My application then adds some 
specific marks. The other images are based on a histogram template that I 
developed manually and, again, my application adds marks. Presently, I can get 
the histogram images into my document, using:
fo:instream-foreign-object
 svg...

 /svg
/fo:instream-foreign-object

However,when I try to do that with the svg 
images adapted from the MS Visio template, I can produce the pdf report, but I 
get a bunch of messages - ERRORs with fop-0.20.5 and WARNINGs with fop-0.91. The 
problem seems to be the microsoft namespace reference.


Feb 18, 2006 1:47:12 PM org.apache.fop.fo.FOTreeBuilder findFOMaker
WARNING: Unknown formatting object http://schemas.microsoft.com/visio/2003/SVGExtensions/^documentProperties
I have attached a copy of the file. 

Any thoughts about how to resolve 
this?


imageExample.svg
Description: image/svg
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

best way to use fop to layout report.

2006-02-17 Thread Tracey Zellmann



I am getting comfortable running and using fop. Now 
I need some advice on the best way to use it to create my report. It seems to me 
that a table at the start of each page will work, but I have read that FOP has 
so much other capability, that tables are seldom needed. Let me briefly describe 
my design, and someone may give me some feedback.

Survey participants have evaluated automobiles by 
sitting in different positions and answering 15 questions - either voting for 0 
- 10, or marking an image of the car. Then for each question, they can also 
offer text comments. The report will summarize and assemble this data. For 
various cars, there are one, two or three rows, always a left seat and a right 
seat. The votes are tabulated in histograms, and the image marks are put onto 
svg images of the car, one for each question and position. A four seat car would 
have 60. Comments are presented as a bulleted list.

The report would start one page for each seating 
row, with two columns, left column for the left seat and right column for the 
right seat. The page titlestates the car name and the specific question. 
The column heading states the position. Then the column would have either a 
histogram or a car image, followed below by a bulleted list of comments. Same 
thing repeated on the right column for the right seating position. The number of 
respondents may be different for each position.

The data is available as an xml document. I will 
write an xslt stylesheet to transform the data to fo.

I can see how to do this with a table, much like 
how I could do it with html. The car images and histograms would be in-line svg 
documents.

Is there a better 
approach?


Re: porblem running new fop-0.91

2006-02-16 Thread Tracey Zellmann
Thanks again. I am making progress. I also emailed StylueStudio. They had 
also seen the problem and sent me a corrected version of the xsl file. Now I 
can get the application to run through to the success message. However, here 
is a small problem. Normally, when I run this with the older fop (0.20.5), 
the generated Adobe document is about 208 K. It is a catalog of videos, with 
formatted text and gif images of the video covers. However, when I run it 
with the new fop, I get an 8 K Adobe document, which fails when I try to 
open it. In the output folder, I do get an application file, named I - a 210 
K file with no extension. If I open that with Adobe, I get the actual 
document. Any ideas what I can do about this?


I am using this example to wring out my process and give me some ideas on 
how to format my document.


I am developing an application that will take several in-line svg files and 
a variety of text elements, all included in an xml document. I will develop 
an xsl sheet to format this, and my customer will use it to generate a pdf 
document, which will be mailed to their survey participants. Personally, if 
the file really was successful, I could just rename it, but my user wont be 
able to do that, and I ought to get it right.



- Original Message - 
From: Jeremias Maerki [EMAIL PROTECTED]

To: fop-users@xmlgraphics.apache.org
Sent: Wednesday, February 15, 2006 5:13 PM
Subject: Re: porblem running new fop-0.91



Actually, this message refers to the fo:region-before element in the
single-page-master. The specification dictates that border and/or padding
must not be specified on a region-before which seems to be the case in
your example. Either remove the offending properties or disable strict
validation [1][2] (-r on the command-line). In the latter case, you
will still receive a warning but not an exception anymore. Have fun.

[1] http://xmlgraphics.apache.org/fop/0.91/embedding.html#config-internal
[2] 
http://xmlgraphics.apache.org/fop/0.91/configuration.html#general-elements


On 15.02.2006 22:50:26 Tracey Zellmann wrote:
Now that I have fixed the problem with my classpath, I am tryign to run 
some examples that worked on the older fop-0.20.5 but don't seem to 
succeed when using the new version.


Specifically, I have an example tha comes with StyluStudio thate creates 
a catalog with text pictures. Using the new fop, I get this error:
(Location of error unknown)org.apache.fop.fo.expr.PropertyException: 
Border and padding for region xsl-region-before must be '0' (See 6.4.13 
in XSL 1.0).


I believe the specific area in the style sheet that the error is 
referring to is this:


!-- Define the contents of the header. --

fo:static-content flow-name=xsl-region-before

fo:block font-size=8.0pt font-family=serif padding-after=2.0pt

space-before=4.0pt text-align=center

border-bottom-style=solid border-bottom-width=1.0pt

xsl:textStylus Studio Multimedia Catalog of Video and Computer 
Books/xsl:text


/fo:block

/fo:static-content

Any help or advice would be appreciated. I have tried to make some 
changes to the attributes, but I haven't been successful.




Jeremias Maerki


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






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



Re: porblem running new fop-0.91

2006-02-16 Thread Tracey Zellmann
I was able to fix it. I actually had an extraneous I as the third 
command-line argument, followed by catalog.pdf. That was the source of the 
problem. Once I cleaned that up, it worked fine.


Thanks again. Sorry to bother you with these small problems. Your replies 
have been good prompts.


- Original Message - 
From: Jeremias Maerki [EMAIL PROTECTED]

To: fop-users@xmlgraphics.apache.org
Sent: Thursday, February 16, 2006 10:25 AM
Subject: Re: porblem running new fop-0.91



How do you actually run FOP? From within Stylus Studio? From the
command-line? From Java code? If you run FOP from the command-line FOP
doesn't simply create arbitrary files or something like that. There you
specify the filename and that's where FOP writes to. Shrug.





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



Re: Using FOP examples

2006-02-15 Thread Tracey Zellmann
Thanks for the reply. I had taken the old jars out of my Eclipse project, 
but overlooked some buried references in my user and system classpath. Your 
note triggered my memory, and I was able to solve that problem.


- Original Message - 
From: Jeremias Maerki [EMAIL PROTECTED]

To: fop-users@xmlgraphics.apache.org
Sent: Wednesday, February 15, 2006 2:57 AM
Subject: Re: Using FOP examples



Please check that you don't have an old fop.jar (from 0.20.5) still in
your classpath. The old fop.jar also has a org.apache.fop.apps.Fop class
but its function was a different one.

On 14.02.2006 23:31:33 Tracey Zellmann wrote:

I have downloaded fop-0.91beta-bin-jdk1.4 and I am trying to use some
of the examples. Specifically, ExampleXML2PDF. I have put all the jars 
into

my class path. I am getting an error when the program runs -

Exception in thread main java.lang.NoSuchMethodError: 
org.apache.fop.apps.Fop.init(Ljava/lang/String;)V

at embedding.ExampleXML2PDF.main(ExampleXML2PDF.java:69)

The referenced line is:
Fop fop = new Fop(MimeConstants.MIME_PDF);

Any thoughts what migth be wrong?

I have checked that fop.jar for this version is in the path and it 
contains org.apache.fop.apps.Fop






Jeremias Maerki


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






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



porblem running new fop-0.91

2006-02-15 Thread Tracey Zellmann



Now that I have fixed the problem with my 
classpath, I am tryign to run some examples that worked on the older fop-0.20.5 
but don't seem to succeed when using the new version.

Specifically, I have an example tha comes with 
StyluStudio thate creates a catalog with text pictures. Using the new fop, I get 
this error:

(Location of error unknown)org.apache.fop.fo.expr.PropertyException: Border 
and padding for region "xsl-region-before" must be '0' (See 6.4.13 in XSL 
1.0).
I believe the specific area in the style sheet 
that the error is referring to is this:
!-- Define the contents of the header. --
fo:static-content flow-name="xsl-region-before"
fo:block font-size="8.0pt" font-family="serif" padding-after="2.0pt"
space-before="4.0pt" 
text-align="center"
border-bottom-style="solid" 
border-bottom-width="1.0pt"
xsl:textStylus Studio 
Multimedia Catalog of Video and Computer Books/xsl:text
/fo:block
/fo:static-content
Any help or advice would be 
appreciated. I have tried to make some changes to the attributes, but I haven't 
been successful.