Re: Big Small Doubt

2003-01-14 Thread VipinJ

But I think you're mixing things here. You're talking about a HTML
preview and you're talking about Excel. Is that linked together
somehow?
What are trying to accomplish?

The clients need the same report in 3 formats :
PDF
HTML
Excel

We are doing an MIS for a leading airline.
There are around 80 reports.
So what we are trying to do is to reuse the same FOP code to generate
HTML and Excel reports.

If this is not successful, we will have to add 80+80=160 new files.
:-))

So before giving them the estimate, we would like to see how much of
work is left

That is the intention.


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



RE: Big Small Doubt

2003-01-14 Thread Calero, Roberto
Title: RE: Big Small Doubt





My friend,


Please do not mix apples and oranges. You can generate XML data and from that point you can create whatever you want.
My personal approach would be:
- Create XML data to power your report
- Create 1 XSLT for creating CSV content, 1 for HTML and 1 for XSL-FO
- By using the above XSLT's now you are ready to create CSV and HTML content. Just run a simple XSLT transformation and you are done!! No need for using FOP whatsoever.

- For creating your PDF version you only need to run an XSLT transformation to create XSL-FO content then you can use FOP to create PDF content based on the previously generated XSL-FO content.

- If the layout of your report ever changes (but not the data to be displayed) you ONLY need to update your XSLT files instead of changing your app.

Roberto


-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, 14 January 2003 2:51 PM
To: [EMAIL PROTECTED]
Subject: Re: Big Small Doubt




But I think you're mixing things here. You're talking about a HTML
preview and you're talking about Excel. Is that linked together
somehow?
What are trying to accomplish?


The clients need the same report in 3 formats :
PDF
HTML
Excel


We are doing an MIS for a leading airline.
There are around 80 reports.
So what we are trying to do is to reuse the same FOP code to generate
HTML and Excel reports.


If this is not successful, we will have to add 80+80=160 new files.
:-))


So before giving them the estimate, we would like to see how much of
work is left


That is the intention.



-
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: Big Small Doubt

2003-01-14 Thread Jeremias Maerki

On 14.01.2003 04:51:13 VipinJ wrote:
 
 But I think you're mixing things here. You're talking about a HTML
 preview and you're talking about Excel. Is that linked together
 somehow?
 What are trying to accomplish?
 
 The clients need the same report in 3 formats :
 PDF
 HTML
 Excel
 
 We are doing an MIS for a leading airline.
 There are around 80 reports.
 So what we are trying to do is to reuse the same FOP code to generate
 HTML and Excel reports.
 
 If this is not successful, we will have to add 80+80=160 new files.
 :-))

I know how you must feel with this prospect. Roberto Calero is right
about his observations in general, but I'd like to add a few points:
- Every report you generate also has to be in Excel format. I guess that
  means that every report is primarily a table of data. So all 80
  reports are probably more or less the same to a certain degree. What
  you could try is to find a common denominator on the data you have to
  generate the report. What I want to say is this: If you can come up
  with a common XML format (not XSL:FO, HTML or something like that,
  your own XML format) in which you can map every or most of your 80
  reports, then you might be in a position where you only have to write
  only one single XSLT for each output format (HTML, XSL-FO and
  CSV/Excel). I guess you already have to do a lot of copy/paste when
  you create your XSLT if you haven't sorted out a common stylesheet
  library already.
  
MIS report data (XML)
  +---+--- XSLT --- HTML
  +--- XSLT --- CSV (alternative 1)
  +--- XSLT --- Gnumeric XML --- Cocoon/POI --- XLS
  ¦  (alternative 2)
  +--- XSLT --- XSL-FO --- FOP --- PDF

See here for the Cocoon/POI stuff: 
http://xml.apache.org/cocoon/userdocs/serializers/xls-serializer.html
  
- You seem to be wanting to convert XSL-FO to Excel. I don't think this
  is a good idea. XSL-FO is made to define a page layout, not to
  generate a spreadsheet document. That's simply not what it was made
  for. It's better to do this before you get to XSL-FO like I suggest in
  the point above.

 So before giving them the estimate, we would like to see how much of
 work is left
 
 That is the intention.

I hope this helps along the way.

Jeremias Maerki


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



RE: Big Small Doubt

2003-01-14 Thread Calero, Roberto
Title: RE: Big Small Doubt





Exactly! Moreover, you can reuse your already existing XML file. The data is not the one changing but the format for generating the report and maybe the report layout (maybe depending on the selected format)

-Original Message-
From: Jeremias Maerki [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, 14 January 2003 5:54 PM
To: [EMAIL PROTECTED]
Subject: Re: Big Small Doubt




On 14.01.2003 04:51:13 VipinJ wrote:
 
 But I think you're mixing things here. You're talking about a HTML
 preview and you're talking about Excel. Is that linked together
 somehow?
 What are trying to accomplish?
 
 The clients need the same report in 3 formats :
 PDF
 HTML
 Excel
 
 We are doing an MIS for a leading airline.
 There are around 80 reports.
 So what we are trying to do is to reuse the same FOP code to generate
 HTML and Excel reports.
 
 If this is not successful, we will have to add 80+80=160 new files.
 :-))


I know how you must feel with this prospect. Roberto Calero is right
about his observations in general, but I'd like to add a few points:
- Every report you generate also has to be in Excel format. I guess that
 means that every report is primarily a table of data. So all 80
 reports are probably more or less the same to a certain degree. What
 you could try is to find a common denominator on the data you have to
 generate the report. What I want to say is this: If you can come up
 with a common XML format (not XSL:FO, HTML or something like that,
 your own XML format) in which you can map every or most of your 80
 reports, then you might be in a position where you only have to write
 only one single XSLT for each output format (HTML, XSL-FO and
 CSV/Excel). I guess you already have to do a lot of copy/paste when
 you create your XSLT if you haven't sorted out a common stylesheet
 library already.
 
MIS report data (XML)
 +---+--- XSLT --- HTML
 +--- XSLT --- CSV (alternative 1)
 +--- XSLT --- Gnumeric XML --- Cocoon/POI --- XLS
 ¦ (alternative 2)
 +--- XSLT --- XSL-FO --- FOP --- PDF


See here for the Cocoon/POI stuff: 
http://xml.apache.org/cocoon/userdocs/serializers/xls-serializer.html
 
- You seem to be wanting to convert XSL-FO to Excel. I don't think this
 is a good idea. XSL-FO is made to define a page layout, not to
 generate a spreadsheet document. That's simply not what it was made
 for. It's better to do this before you get to XSL-FO like I suggest in
 the point above.


 So before giving them the estimate, we would like to see how much of
 work is left
 
 That is the intention.


I hope this helps along the way.


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]



Demo: XML to PDF (and HTML) by FOP

2003-01-14 Thread gianni

I write to ask your feedback about a XML demo that we 
realized by EDW International for Rassegna Grafica  
(http://www.apenet.it/ita/rg/index.asp), italian 
magazine that talks about printing technologies for 
53 years.
A small demo to show the power of XML for the 
realization of pages HTML and PDF.

You can see the demo at the URL
http://80.206.120.8/process.jsp
(that soon it will be linked from the Rassegna 
Grafica's web site).

The demo, that generates a hypothetical business 
card, starts when you write in the fields of the form 
at the first page, here the English translation (the 
demo is in Italian):

Inserisci i tuoi dati per visualizzarli in PDF e per 
il web (Insert your data to visualize them in PDF and 
for the web)

Inserisci il tuo nome e cognome:
(Insert your name and surname)

Inserisci il tuo indirizzo email:
(Insert your e-mail)

Inserisci il tuo ruolo:
(Insert your responsability)

Inserisci la tua città:
(Insert your city)

So a page should have to appear a page that show the 
data that you have inserted and asks if you want 
visualize them in HTML or pdf, by a simple click. 
HTML and pdf are created in that moment through XSL 
and Xsl-fo.

We wanted to show that if you use XML in the writing 
it is easier to re-use the data that you receive for 
the printing in HTML and managing a personalized 
printing hiding to the author the complexity of the 
mechanism that is behind this result.

The demo is better explained by3 articles, the first 
one of them has already appeared on issue 1 of 
January (already in distribution) of Rassegna
Grafica: let me want if you like to read them.

I hope that this initiative diffuses necessary 
computer science culture in the world of the press in 
Italy and you reward the courage of Rassegna Grafica 
in the supporting of this kind of innovation.

Gianni Rubagotti
EDW International
http://www.edw-international.com







Questo messaggio arriva da Postino, il (mitico) servizio di posta di Punto
(http://www.punto.it)
-
Punto Internet Gratis: la connessione gratuita a Internet realizzata da
Punto con Elitel, senza costi di abbonamento o di attivazione e senza
vincoli!
(http://www.punto.it/free_internet.php)
-

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



Re: Demo: XML to PDF (and HTML) by FOP

2003-01-14 Thread Jeremias Maerki
Very nice! Except that you've got a problem when someone enters a name
containing an umlaut (ä/ae, ö/oe etc.) that are frequent in a lot of
languages.


Jeremias Maerki


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



runtests.bat

2003-01-14 Thread Toufic Nehme
Hi guys,
I have a very simple problem and appreciate any help !
I get the error messages below when I try to run the
script runtests.bat  under 0.20.5rc .
With the 0.20.4 version there is no problem !!

am I missing something ?  do I have to modify the script ?

Thanks...

D:\fop-0.20.5rc\docs\examplesruntests
Fop Test

D:\j2sdk1.4.1\lib\tools.jar;D:\j2sdk1.4.1\lib\classes.zip;..\..\lib\ant-1.5.1.jar;..\..\lib\xml-apis.jar;..\..\lib\xercesImpl-2.2.1.jar;..\..\lib\xala

n-2.4.1.jar;..\..\lib\batik.jar;..\..\lib\avalon-framework-cvs-20020806.jar;..\..\lib\bsf.jar;..\..\lib\jimi-1.0.jar;..\..\lib\jai_core.jar;..\..\lib\

jai_codec.jar;..\..\build\fop.jar
Starting Tests ...
ECHO is off.
Exception in thread main java.lang.NoClassDefFoundError: and
-

D:\fop-0.20.5rc\docs\examplesant
Buildfile: build.xml
init:
BUILD FAILED
Total time: 1 second
D:\fop-0.20.5rc\docs\examples\build.xml:13: taskdef class
org.apache.fop.tools.anttasks.Fop cannot be found


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



FOP extension functions

2003-01-14 Thread Matthew L. Avizinis
Hello all,
  Could someone elaborate a little on the following from the FOP extensions
documentation please?  Mabye paste some example code as well?
Thanks in advance for help,

  Matthew L. Avizinis
Gleim Publications, Inc.
   4201 NW 95th Blvd.
 Gainesville, FL 32606
(352)-375-0772
 www.gleim.com


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



FOP extension functions

2003-01-14 Thread Matthew L. Avizinis
Sorry, forgot to include what I wanted commentary on... :-)
Hello all,
  Could someone elaborate a little on the following from the FOP extensions
documentation please?  Mabye paste some example code as well?

Create a jar file with your classes, it must also include the following file
/META-INF/services/org.apache.fop.fo.ElementMapping. In this file you need
to put the fully qualified classname of your element mappings class. This
class must implement the org.apache.fop.fo.ElementMapping interface.

Thanks in advance for help,

  Matthew L. Avizinis
Gleim Publications, Inc.
   4201 NW 95th Blvd.
 Gainesville, FL 32606
(352)-375-0772
 www.gleim.com


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



Re: runtests.bat

2003-01-14 Thread Jeremias Maerki
Make sure you build FOP before running runtests.bat. It looks like
fop.jar isn't available.

On 14.01.2003 16:16:37 Toufic Nehme wrote:
 Hi guys,
 I have a very simple problem and appreciate any help !
 I get the error messages below when I try to run the
 script runtests.bat  under 0.20.5rc .
 With the 0.20.4 version there is no problem !!
 
 am I missing something ?  do I have to modify the script ?
 
 Thanks...
 
 D:\fop-0.20.5rc\docs\examplesruntests
 Fop Test
 
 D:\j2sdk1.4.1\lib\tools.jar;D:\j2sdk1.4.1\lib\classes.zip;..\..\lib\ant-1.5.1.jar;..\..\lib\xml-apis.jar;..\..\lib\xercesImpl-2.2.1.jar;..\..\lib\xala
 
 n-2.4.1.jar;..\..\lib\batik.jar;..\..\lib\avalon-framework-cvs-20020806.jar;..\..\lib\bsf.jar;..\..\lib\jimi-1.0.jar;..\..\lib\jai_core.jar;..\..\lib\
 
 jai_codec.jar;..\..\build\fop.jar
 Starting Tests ...
 ECHO is off.
 Exception in thread main java.lang.NoClassDefFoundError: and
 -
 
 D:\fop-0.20.5rc\docs\examplesant
 Buildfile: build.xml
 init:
 BUILD FAILED
 Total time: 1 second
 D:\fop-0.20.5rc\docs\examples\build.xml:13: taskdef class
 org.apache.fop.tools.anttasks.Fop cannot be found



Jeremias Maerki


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



Does FOP support full-page background-image?

2003-01-14 Thread gianni
I have to usea pdf (or an image) as full-page 
background for my generated pdf.

Is it possible with FOP?

Have I to use background images on fo:simple-page-
master?

Thank you,
Gianni Rubagotti
EDW International







Questo messaggio arriva da Postino, il (mitico) servizio di posta di Punto
(http://www.punto.it)
-
Punto Internet Gratis: la connessione gratuita a Internet realizzata da
Punto con Elitel, senza costi di abbonamento o di attivazione e senza
vincoli!
(http://www.punto.it/free_internet.php)
-

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



Re: FOP extension functions

2003-01-14 Thread Jeremias Maerki
This passage means that when you package your extension in a separate
JAR file you have to add a certain file to the JAR. It's name is 
org.apache.fop.fo.ElementMapping and must contain the fully qualified
classname of your class that extends the ElementMapping interface. That
file must be in the directory META-INF/services.

So if you have generated your extension jar, it must have approximately
the following contents:
/META-INF/services/org.apache.fop.fo.ElementMapping
com/gleim/myfopext/MyFopExtElementMapping.class
com/gleim/myfopext/MyFopExtElement.class
[..]

In Driver.java (at the end) you will see code that inspects this special
file you have to add. It's to make sure that the extension is registered.

You can also skip this step with tat special file if you call
Driver.addElementMapping() either with the fully qualified classname or
an instance of the ElementMapping implementation.

This may also help on your way:
http://marc.theaimsgroup.com/?l=fop-userm=10384400488w=2

I hope this helps.

May I ask what extension you're planning? Just curious.

On 14.01.2003 16:40:53 Matthew L. Avizinis wrote:
 Sorry, forgot to include what I wanted commentary on... :-)
 Hello all,
   Could someone elaborate a little on the following from the FOP extensions
 documentation please?  Mabye paste some example code as well?
 
 Create a jar file with your classes, it must also include the following file
 /META-INF/services/org.apache.fop.fo.ElementMapping. In this file you need
 to put the fully qualified classname of your element mappings class. This
 class must implement the org.apache.fop.fo.ElementMapping interface.
 
 Thanks in advance for help,


Jeremias Maerki


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



Re: Does FOP support full-page background-image?

2003-01-14 Thread Jeremias Maerki
You mean border-less?

FOP supports the background-image property in its latest version. But
from looking at the FO spec I'd say there's no direct way to have a
background-image on the whole page (without borders). It would work if
place on fo:region-body as in the bgimage.fo example in the distribution.
You could try to create an fo:block-container position=absolute and
adjust the values for top, left, height and width so it covers the whole
page (you can use negative values to accomplish that). I haven't tested
if the background-image attribute is implemented for block-container,
you'll have to try this out.

As for the file type: You can't use a PDF as background image (yet). You
will have to use an image.

If you want to use the PDF as background I recommend that you look at
iText or Etymon PJ. I have successfully placed a PDF in the background
of a FOP-generated PDF in the past.

On 14.01.2003 17:03:23 gianni wrote:
 I have to usea pdf (or an image) as full-page 
 background for my generated pdf.
 
 Is it possible with FOP?
 
 Have I to use background images on fo:simple-page-
 master?


Jeremias Maerki


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



Re: runtests.bat

2003-01-14 Thread Toufic Nehme
ok, perfect !
the original classpath was causing the problem.
Thanks for the hint

J.Pietschmann wrote:

 Toufic Nehme wrote:
  Exception in thread main java.lang.NoClassDefFoundError: and
 Looks like there is a Documents and settings in the Windows
 CLASSPATH. Edit the file and plase double quotes () around
 %LOCALCLASSPATH%;%CLASSPATH% in line 25:
   %LOCALCLASSPATH%;%CLASSPATH%
 Alternatively, clear the CLASSPATH environment variable.

 J.Pietschmann

 -
 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: FOP extension functions

2003-01-14 Thread Matthew L. Avizinis
I have written an extension that I had discussed a while ago about writing
page numbers to an alternate xml file while FOP is running.  I submitted it
a while ago.  It has a number of properties that allow you to name the file,
whether it is the first or last entry going into the file so you can create
a well-formed xml file, name the root element if it is the first entry to
the file, the element name itself, and an id.

This has allowed me to compile large books with many images by chapter (thus
reducing memory usage) and still be able to make page cross-references from
chapter to chapter.

The code has been corrected recently by someone here that is more of a Java
programmer than I.  I will be posting the corrected extension code as soon
as I implement your very information instructions and test it.

Previously, I had only been able to insert the function by rebuilding FOP
with my code files in the source area (I had a misinterpretation of the
instructions that another person here at my company interpreted correctly
and pointed it out to me).

I also have an extension that emits two page numbers (there was a short
discussion a number of months ago) per page, e.g. left page - 1, 2; right
page -- 3, 4, since I recently had a need for such a thing myself.
thanks for the help.

 -Original Message-
 From: Jeremias Maerki [mailto:[EMAIL PROTECTED]
 Sent: Tuesday, January 14, 2003 11:20 AM
 To: [EMAIL PROTECTED]
 Subject: Re: FOP extension functions


 This passage means that when you package your extension in a separate
 JAR file you have to add a certain file to the JAR. It's name is
 org.apache.fop.fo.ElementMapping and must contain the fully qualified
 classname of your class that extends the ElementMapping interface. That
 file must be in the directory META-INF/services.

 So if you have generated your extension jar, it must have approximately
 the following contents:
 /META-INF/services/org.apache.fop.fo.ElementMapping
 com/gleim/myfopext/MyFopExtElementMapping.class
 com/gleim/myfopext/MyFopExtElement.class
 [..]

 In Driver.java (at the end) you will see code that inspects this special
 file you have to add. It's to make sure that the extension is registered.

 You can also skip this step with tat special file if you call
 Driver.addElementMapping() either with the fully qualified classname or
 an instance of the ElementMapping implementation.

 This may also help on your way:
 http://marc.theaimsgroup.com/?l=fop-userm=10384400488w=2

 I hope this helps.

 May I ask what extension you're planning? Just curious.

 On 14.01.2003 16:40:53 Matthew L. Avizinis wrote:
  Sorry, forgot to include what I wanted commentary on... :-)
  Hello all,
Could someone elaborate a little on the following from the
 FOP extensions
  documentation please?  Mabye paste some example code as well?
 
  Create a jar file with your classes, it must also include the
 following file
  /META-INF/services/org.apache.fop.fo.ElementMapping. In this
 file you need
  to put the fully qualified classname of your element mappings
 class. This
  class must implement the org.apache.fop.fo.ElementMapping interface.
 
  Thanks in advance for help,


 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]