RE: Possible thread-safe issue with fonts

2002-04-29 Thread Chris Warr

It'll do, I just load tested it overnight, no problems for 250,000 hits.
I'm running through cocoon, I don't want to be playing with cocoon's source
as well.

Chris.

-Original Message-
From: J.Pietschmann [mailto:[EMAIL PROTECTED]
Sent: Tuesday, 30 April 2002 6:44
To: [EMAIL PROTECTED]
Subject: Re: Possible thread-safe issue with fonts


Chris Warr wrote:
> OK, it was a threading issue, I downloaded the source and had a play.  It
> comes about because the static configuration is updated for every
> translation I do.  FontSetup.addConfiguredFonts() can read from the font
> list at the same time as ConfigurationParser.store() updates it.  I just
put
> a line in ConfigurationParser.endElement() to only add fonts if there are
> none in the list.  Was easier for me than mucking around with
> 'synchronized', I'm only a java beginner.
> 
> 
> } else if (localName.equals("fonts")) {
> -->if (Configuration.getFonts() != null &&
> Configuration.getFonts().size() != 0)
> -->{
> -->// Don't update the fonts
> -->}
> -->else
>{
>this.store("standard", "fonts", fontList);
>}

That's not a good idea.
If you have only one servlet and set the configuration
only once, do so in the servlet's init() method.
If you have several servlets, create a singleton class
wrapping the instantiation of the configuration,
roughly
  final class ConfigSingleton {
   private static Options options;
   public final void synchronized init() {
 if( options==null ) {
   options=new Options("userconfig.xml");
 }
   }

(Beware! Untested!)
And call ConfigSingleton.init() in each of the servlet's
init method.

J.Pietschmann



Incomplete PDF content

2002-04-29 Thread Dutta, Sumanta
I am facing a strange problem while generating PDF in Servlet. I have got
two PDF reports to generate at present. I can generate one PDF properly, but
the other one, whose structure is similar to and simpler than the first one,
is coming out incomplete. It gives me the header and footer, and an
incomplete body. I tested my xsl by running through the standalone fop.dat
(in FOP-0.20.3) against the same XML data. It's generating the complete XML.
I am completely lost. Could anybody please help me!

Thanks,
Sumanta


--
This message is intended only for the personal and confidential use of the 
designated recipient(s) named above.  If you are not the intended recipient of 
this message you are hereby notified that any review, dissemination, 
distribution or copying of this message is strictly prohibited.  This 
communication is for information purposes only and should not be regarded as an 
offer to sell or as a solicitation of an offer to buy any financial product, an 
official confirmation of any transaction, or as an official statement of Lehman 
Brothers.  Email transmission cannot be guaranteed to be secure or error-free.  
Therefore, we do not represent that this information is complete or accurate 
and it should not be relied upon as such.  All information is subject to change 
without notice.




Re: Can I submit XSLT properties to FOP?

2002-04-29 Thread J.Pietschmann
Savino, Matt C wrote:
Here is a servlet we use to generate PDF and HTML. For the PDF first it
calls the transformer w/some parameters, then calls FOP. There's a lot going
on, but you should be able to find the pieces you're looking for.
Using DOM trees to couple the transformation and the FO
processor is a neat architecture, but could be inefficient
for large intermediate FO structures. Using SAX events is
better in this case.
J.Pietschmann


Re: Can I submit XSLT properties to FOP?

2002-04-29 Thread J.Pietschmann
Markus Wiese wrote:
Servlet configuration?
Don't know yet, but I guess you will have to use 1 servlet taking use
of xalan and fop. (2 more servlets)
Supposedly guessed wrong.
J.Pietschmann



Re: Can I submit XSLT properties to FOP?

2002-04-29 Thread J.Pietschmann
Baptiste Casanova wrote:
Hi Markus,
How could i do the same thing with embedded FOP ?
You have to get hold of the transformer object so that you
can use setparameter().
An example:
 ByteArrayOutputStream out=new ByteArrayOutputStream();
 // set up the Driver object
 Driver driver =new Driver();
 driver.setOutputStream(out);
 driver.setRenderer(Driver.RENDER_PDF);
 // get a Transformer object
 Transformer transformer=TransformerFactory.newInstance()
  .newTransformer(new StreamSource(new File("foo.xsl")));
 // set a oparameter
 transformer.setParameter("page-count","126");
 // start the transformation, this will also drive
 // the renderer
 transformer.transform(new StreamSource(new File("foo.xml")),
   new SAXResult(driver.getContentHandler()));
HTH
J.Pietschmann


Re: Rotating the generated pdf

2002-04-29 Thread J.Pietschmann
Andrius Sabanas wrote:
Yes, just I want to rotate the page (like I would to do a real paper 
sheet). If fact, my pdf page is already landscape :-), but I need it to 
be more high than wide, for convenient printing (s custom requirement).
You can do a postprocessing using iText (search the
archives), or just declare a landscape format (h=210mm,
w=297mm) and hope the printer driver is intelligent
enough to rotate it for printing (or can be configured
to do so, all I've seen could).
Or are you supposed to produce a PDF with rotated content,
causing everybody to twist their necks while reading
onscreen? :-)
J.Pietschmann




Re: Possible thread-safe issue with fonts

2002-04-29 Thread J.Pietschmann
Chris Warr wrote:
OK, it was a threading issue, I downloaded the source and had a play.  It
comes about because the static configuration is updated for every
translation I do.  FontSetup.addConfiguredFonts() can read from the font
list at the same time as ConfigurationParser.store() updates it.  I just put
a line in ConfigurationParser.endElement() to only add fonts if there are
none in the list.  Was easier for me than mucking around with
'synchronized', I'm only a java beginner.
} else if (localName.equals("fonts")) {
-->if (Configuration.getFonts() != null &&
Configuration.getFonts().size() != 0)
-->{
-->// Don't update the fonts
-->}
-->else
   {
   this.store("standard", "fonts", fontList);
   }
That's not a good idea.
If you have only one servlet and set the configuration
only once, do so in the servlet's init() method.
If you have several servlets, create a singleton class
wrapping the instantiation of the configuration,
roughly
 final class ConfigSingleton {
  private static Options options;
  public final void synchronized init() {
if( options==null ) {
  options=new Options("userconfig.xml");
}
  }
(Beware! Untested!)
And call ConfigSingleton.init() in each of the servlet's
init method.
J.Pietschmann



RE: Can I submit XSLT properties to FOP?

2002-04-29 Thread Savino, Matt C
Here is a servlet we use to generate PDF and HTML. For the PDF first it
calls the transformer w/some parameters, then calls FOP. There's a lot going
on, but you should be able to find the pieces you're looking for.


Matt Savino



> -Original Message-
> From: Markus Wiese [mailto:[EMAIL PROTECTED]
> Sent: Monday, April 29, 2002 3:40 AM
> To: [EMAIL PROTECTED]
> Subject: Re: Can I submit XSLT properties to FOP?
> 
> 
> Servlet configuration?
> Don't know yet, but I guess you will have to use 1 servlet taking use
> of xalan and fop. (2 more servlets)
> 
> markus
> 
> -Ursprüngliche Nachricht-
> Von: Baptiste Casanova <[EMAIL PROTECTED]>
> An: [EMAIL PROTECTED] <[EMAIL PROTECTED]>
> Datum: Montag, 29. April 2002 11:52
> Betreff: Re: Can I submit XSLT properties to FOP?
> 
> 
> >Hi Markus,
> >How could i do the same thing with embedded FOP ?
> >
> >- Original Message -
> >From: "Markus Wiese" <[EMAIL PROTECTED]>
> >To: <[EMAIL PROTECTED]>
> >Sent: Monday, April 29, 2002 11:17 AM
> >Subject: Re: Can I submit XSLT properties to FOP?
> >
> >
> >> Hi Elmar,
> >> consider doing it like this:
> >> @java org.apache.xalan.xslt.Process -IN myXML.xml -XSL 
> myXSL.xsl -OUT
> >> myFO.fo -PARAM UserName "Elmar Schalück"
> >> @java org.apache.fop.apps.Fop myFO.fo myPDF.pdf
> >>
> >> markus
> >>
> >>
> >> -Ursprüngliche Nachricht-
> >> Von: Schalück, Elmar <[EMAIL PROTECTED]>
> >> An: '[EMAIL PROTECTED]' <[EMAIL PROTECTED]>
> >> Datum: Montag, 29. April 2002 10:53
> >> Betreff: Can I submit XSLT properties to FOP?
> >>
> >>
> >> Hi,
> >> I like to use FOP to produce reports, based on a XSLT stylesheet.
> >>
> >> So the call will look like
> >> fop -xml myXML.xml -xsl myXSL.xsl -pdf myPDF.pdf
> >>
> >> Now I need to parametrize the XSLT with the current 
> date/time, with some
> >> preselections, 
> >>
> >> My idea is to have some more parameters for the command line:
> >> fop -xml myXML.xml -xsl myXSL.xsl -Param=UserName "Elmar Schalück"
> >> -Param=UserLanguage de -pdf myPDF.pdf
> >>
> >> The XSLT stylesheet starts like
> >>  >>  xmlns:xsl="http://www.w3.org/1999/XSL/Transform"; version="1.0"
> >>  xmlns:fo="http://www.w3.org/1999/XSL/Format";>
> >> 
> >> en
> >> ...
> >>
> >> Do you know of any means to fill in these parameters?
> >>
> >> Mit freundlichen Grüßen
> >> With kind regards
> >>
> >> Elmar Schalück
> >>
> >> __
> >>
> >> Elmar Schalück
> >> Advisory Software Developer
> >> CEYONIQ AG
> >> Winterstr. 49
> >> 33649 Bielefeld
> >> Germany
> >> Fon: +49 (0)521 9318-2108
> >> Fax: +49 (0)521 9318-882150
> >> E-Mail: [EMAIL PROTECTED]
> >> http://www.ceyoniq.com
> >> PGP-Fingerprint: BC78 7DEA 7A18 A6F2 A29D  F229 C68F 8C65 F7EE 898A
> >>
> >>
> >
> >
> >
> 
> 



ReportGeneratorServlet.java
Description: Binary data


Re: [urgent] images in pdf via fop - incorrect size

2002-04-29 Thread fop user
On Mon, 29 Apr 2002, J.Pietschmann wrote:

> fop user wrote:
> > All the images are stretched out so their width is equal to the width of
> > the page.
>
> Unless forcibly scaled down, bitmap images are rendered at
> 1/72 inch per pixel in the PDF, or roughly 3.53 cm per
> 100 pixel. Are your images of a high resolution?
>

This was indeed the problem. This hint solved the problem, tnx.




Re: Why is FO(P) a superior model than what most proprietary tools propose

2002-04-29 Thread Patrick Andries
Thank you for all these good ideas. Would anyone happen to know of an 
industry analyst study on the advantages of XSL FO ?
This is to lend some credibility to my recommendation.




RE: Adding Fonts to userconfig...

2002-04-29 Thread Arved_37
Quoting Arved Sandstrom <[EMAIL PROTECTED]>:

> > -Original Message-
> > From: Andrius Sabanas [mailto:[EMAIL PROTECTED]
> > Sent: April 29, 2002 5:32 AM
> > To: [EMAIL PROTECTED]
> > Subject: Re: Adding Fonts to userconfig...
> >
> > {SNIP]
> > Now I wonder if I am going to get a conflict between those two. This
> > design with static (magic) Options passing seems bizzare to me :-)
> > But as I understand, separate webapps get loaded by separate
> > classloaders, so is there any problem? Can anybody comment on this?
> 
> The Servlet 2.3 specification is the first servlet spec to really have much
> to say about classloaders; sections 3.7 and 9.7 in particular. Most of the
> items are recommendations, not definite requirements. (I consider "musts"
> and "shoulds" to be definite requirements). In any case, there is nothing
> in
> the spec that says that each web application gets its own classloader. In
> fact even if all "musts", "shoulds" and recommendations are satisfied you
> could still have one classloader for the servlet container and all
> web-apps;
> it's just that that single classloader has certain rules.
> 
> The situation is akin to that of loading application classes when invoking
> Java on the command line. You might have class A in each of 2 separate
> JARs,
> and also loose in yet another location, all three of which are in your
> classpath. Do you expect each location to be serviced by its own
> classloader? No, likely not.
> 
> It may be that the Tomcat reference implementation has separate
> classloaders
> for each webapp. If so, this would be a signal to other servlet container
> authors that even if that is not required (or suggested) by the spec, that
> it's a good idea. But in the interests of portability I wouldn't rely on
> this.
> 
> I think we are trying to fix things up in terms of use of statics. I want
> to
> point out that when Fop was begun that there was no idea that people would
> want to run the thing inside a servlet; it was meant to be a command-line
> processor that ran in its own JVM and produced PDF files.

I don't normally reply to my own posts but I wanted to add a couple of comments:

1) I was being very pedantic in my above comments. I sometimes get irritated 
with specifications that aren't written clearly in spots, and in this case I 
was being very nitpicky.

2) In fact Tomcat does have separate classloaders for each web-app and this is 
a safe assumption to make in practise. I imagine that all other recent or 
decent servlet containers operate the same way.

3) It's hard work to write a spec. I've had to write a few myself. :-)

Regards,
AHS

-
  This mail sent through Chebucto Community Net
   http://www.chebucto.ns.ca/


Re: Why is FO(P) a superior model than what most proprietary tools propose

2002-04-29 Thread Andrius Sabanas
Alex McLintock wrote:
Isn't this the virtue of XSLT rather than XSL FO ?

XSL:FO *is* XSLT !
One is part of the other and not totally separate!
Alex

Hello,
Although I am not a guru of XSL*, I would dare to argue with that. In 
fact, XSL consists of three technologies - XSLT, XPath and XSL:FO. You 
can simply use XSLT with XPath and do not worry about XSL:FO at all - 
IMHO, this is the most popular scenario of XSL usage. Or you can just 
write straight XSL:FO documents and don't use XSLT.

Andrius



Re: Why is FO(P) a superior model than what most proprietary tools propose

2002-04-29 Thread Alex McLintock
At 17:03 29/04/2002, you wrote:
Consider that once you data is in XML you can use that same data to 
produce PDF, HTML VoiceML (for you automated telephone system) or SVG 
graphical representation of the data by just changing the stylesheet 
using XSLT. No need to have multiple unsynced data sources for your 
different output requirements

Isn't this the virtue of XSLT rather than XSL FO ?

XSL:FO *is* XSLT !
One is part of the other and not totally separate!
Alex

Openweb Analysts Ltd, London: Software For Complex Websites 
http://www.OWAL.co.uk/
Free Consultancy for London Companies thinking of Open Source Software.



Re: Why is FO(P) a superior model than what most proprietary tools propose

2002-04-29 Thread Markus Wiese
Patrick,
don't be silly ;-). In my opinion XML via XSL FO to PDF is _the_
missing link between databases and printable documents. Of course
it's the transformation that matters, but without actual implementation
like the FO namespace you don't get far.

markus

-Ursprüngliche Nachricht-
Von: Patrick Andries <[EMAIL PROTECTED]>
An: [EMAIL PROTECTED] <[EMAIL PROTECTED]>
Datum: Montag, 29. April 2002 18:05
Betreff: Re: Why is FO(P) a superior model than what most proprietary tools
propose


>
>
>L Rutker wrote:
>
>>
>>
>>
>>> From: Patrick Andries <[EMAIL PROTECTED]>
>>> Subject: Why is FO(P) a superior model than what most proprietary
>>> tools propose
>>
>>
>>> 2) I understand that everything related with XML (XSLT/XSL-FO) has a
>>> modern flavour that few techies can resist, but what are the
>>> objectives reasons ?
>>>
>>> 3) Are they any advantages to FO being integrated with XSLT that the
>>> proprietary tools would not have ?
>>>
>>
>> Consider that once you data is in XML you can use that same data to
>> produce PDF, HTML VoiceML (for you automated telephone system) or SVG
>> graphical representation of the data by just changing the stylesheet
>> using XSLT. No need to have multiple unsynced data sources for your
>> different output requirements
>
>
>Isn't this the virtue of XSLT rather than XSL FO ?
>
>
>
>



Re: Why is FO(P) a superior model than what most proprietary tools propose

2002-04-29 Thread Patrick Andries

L Rutker wrote:


From: Patrick Andries <[EMAIL PROTECTED]>
Subject: Why is FO(P) a superior model than what most proprietary 
tools propose

2) I understand that everything related with XML (XSLT/XSL-FO) has a 
modern flavour that few techies can resist, but what are the 
objectives reasons ?

3) Are they any advantages to FO being integrated with XSLT that the 
proprietary tools would not have ?

Consider that once you data is in XML you can use that same data to 
produce PDF, HTML VoiceML (for you automated telephone system) or SVG 
graphical representation of the data by just changing the stylesheet 
using XSLT. No need to have multiple unsynced data sources for your 
different output requirements

Isn't this the virtue of XSLT rather than XSL FO ?



Re: Why is FO(P) a superior model than what most proprietary tools propose

2002-04-29 Thread Cyril Rognon
Hi Fop-users
I do agree that XML data offer interoperability and many many high feature 
regarding to data tranform and sync and exchange. XSL FO is really a nice 
solution because it helps to build paginated presentation layers that longs 
for a long time.

But I would like to say that FO and other XML subtongues are not here to 
kill proprietary tools. Only format is an issue here. This is why FO can be 
a real good choice. It does not tie you to a tool vendor. Yet it does not 
kill tools, it simply takes care of some part of the job. If a publishing 
tool is only a proprietary format, than FO will make it obsolete but then 
it would only be the proof that the tool had no real added-value. Many 
Publishing tools offer high level publishing option to create, manage and 
maintain content. FO just answer one of the issues : standard paginated 
description. Having a W3C Recomendation is a real superior model in this case.

As for other questions :
the relation between XSL and XSL FO offers a decoupled paginated 
description layer. XSL tells you that tranformation is different from 
Formatting by naming xslt and fo namespaces. They want solution providers 
to keep this in mind in order to offer long term stability and higher level 
publishing model.
 For instance, you can use the page number as a parameter to test if you 
use LaTeX (this is a great language, ver mature. I hope thousnds of 
TeX/LaTeX people will come to work on FO) but it is forbidden in FO. You do 
not programaticaly have acces to the value of the page-number of a specific 
page . So you will have to test something that has some meaning in your XML 
data with xsl. This way, you really have decoupled logic/presentation 
layer. One may see it as a disadvantage but it helps you to focus on each 
layer/logic/responsability level thus allow you to have higher level 
maintenance process...

Ok, enough now, it is kind of difficult to sum this up...
Hope that helps...
Cyril
At 12:59 29/04/2002 +0200, you wrote:
I do not know the proprietary tools.
What can I say to you that will convice you?
The power of standards and open-source.
Standards allows interoperability. You do not need to buy
the specs of any closed-source format in order to make a bridge to (let's 
say) PDF or RTF :-)

Force of the open-source is that improvements in the software
impacts all the users. Apache httpd is the most significative example
(or Linux also).
The third problem is that if everyone migrates to FO, the companies behind 
those proprietary formats will disappear. If you plan to
use you datas for a long time, it is rather a difficult choice.

At last, using a XML format allows it to get its content from different
sources. For example, a big usage of XSL:FO is for dynamic PDF creation
from various (very) different XML sources.
Patrick Andries wrote:
Before convincing people to use specifically, FOP I would like to 
convince people that FO is a superior model than traditional model of 
proprietary solutions (3B2, Compuset) for documents that both FOP and 
those traditional tools can produce.
In other words, is FO a good strategic directions.
Some questions a bit more precise :
1) What are the advantages of people using XSL-FO as page description 
language rather than the ones their could be using with proprietary tools ?
2) I understand that everything related with XML (XSLT/XSL-FO) has a 
modern flavour that few techies can resist, but what are the objectives 
reasons ?
3) Are they any advantages to FO being integrated with XSLT that the 
proprietary tools would not have ?
Thanks
Does somebody know if any of the big software publishing companies are 
considering XSL-FO support ?

P. Andries





Re: Why is FO(P) a superior model than what most proprietary tools propose

2002-04-29 Thread L Rutker


From: Patrick Andries <[EMAIL PROTECTED]>
Subject: Why is FO(P) a superior model than what most proprietary tools 
propose

2) I understand that everything related with XML (XSLT/XSL-FO) has a modern 
flavour that few techies can resist, but what are the objectives reasons ?

3) Are they any advantages to FO being integrated with XSLT that the 
proprietary tools would not have ?

Consider that once you data is in XML you can use that same data to produce 
PDF, HTML VoiceML (for you automated telephone system) or SVG graphical 
representation of the data by just changing the stylesheet using XSLT. No 
need to have multiple unsynced data sources for your different output 
requirements

_
MSN Photos is the easiest way to share and print your photos: 
http://photos.msn.com/support/worldwide.aspx



Re: Why is FO(P) a superior model than what most proprietary tools propose

2002-04-29 Thread Olivier Rossel
I do not know the proprietary tools.
What can I say to you that will convice you?
The power of standards and open-source.
Standards allows interoperability. You do not need to buy
the specs of any closed-source format in order to make a bridge to 
(let's say) PDF or RTF :-)

Force of the open-source is that improvements in the software
impacts all the users. Apache httpd is the most significative example
(or Linux also).
The third problem is that if everyone migrates to FO, the companies 
behind those proprietary formats will disappear. If you plan to
use you datas for a long time, it is rather a difficult choice.

At last, using a XML format allows it to get its content from different
sources. For example, a big usage of XSL:FO is for dynamic PDF creation
from various (very) different XML sources.
Patrick Andries wrote:
Before convincing people to use specifically, FOP I would like to 
convince people that FO is a superior model than traditional model of 
proprietary solutions (3B2, Compuset) for documents that both FOP and 
those traditional tools can produce.

In other words, is FO a good strategic directions.
Some questions a bit more precise :
1) What are the advantages of people using XSL-FO as page description 
language rather than the ones their could be using with proprietary tools ?

2) I understand that everything related with XML (XSLT/XSL-FO) has a 
modern flavour that few techies can resist, but what are the objectives 
reasons ?

3) Are they any advantages to FO being integrated with XSLT that the 
proprietary tools would not have ?

Thanks
Does somebody know if any of the big software publishing companies are 
considering XSL-FO support ?

P. Andries







RE: Adding Fonts to userconfig...

2002-04-29 Thread Arved Sandstrom
> -Original Message-
> From: Andrius Sabanas [mailto:[EMAIL PROTECTED]
> Sent: April 29, 2002 5:32 AM
> To: [EMAIL PROTECTED]
> Subject: Re: Adding Fonts to userconfig...
>
>
> J.Pietschmann wrote:
> > [EMAIL PROTECTED] wrote:
> >
> >> ...  Any down side to changing the baseDire?
> >
> >
> > Yes, it's global. You may run into problems with
> > multithreaded servers.
> >
> > J.Pietschmann
> >
>
> Hello,
>
> I would like to install 2 webapps with servlets using FOP on the same
> servlet engine. Both of them specify their own userconfig.xml files, but
> I do not use baseDir, rather get the absolute paths hardcoded.
>
> Now I wonder if I am going to get a conflict between those two. This
> design with static (magic) Options passing seems bizzare to me :-)
> But as I understand, separate webapps get loaded by separate
> classloaders, so is there any problem? Can anybody comment on this?

The Servlet 2.3 specification is the first servlet spec to really have much
to say about classloaders; sections 3.7 and 9.7 in particular. Most of the
items are recommendations, not definite requirements. (I consider "musts"
and "shoulds" to be definite requirements). In any case, there is nothing in
the spec that says that each web application gets its own classloader. In
fact even if all "musts", "shoulds" and recommendations are satisfied you
could still have one classloader for the servlet container and all web-apps;
it's just that that single classloader has certain rules.

The situation is akin to that of loading application classes when invoking
Java on the command line. You might have class A in each of 2 separate JARs,
and also loose in yet another location, all three of which are in your
classpath. Do you expect each location to be serviced by its own
classloader? No, likely not.

It may be that the Tomcat reference implementation has separate classloaders
for each webapp. If so, this would be a signal to other servlet container
authors that even if that is not required (or suggested) by the spec, that
it's a good idea. But in the interests of portability I wouldn't rely on
this.

I think we are trying to fix things up in terms of use of statics. I want to
point out that when Fop was begun that there was no idea that people would
want to run the thing inside a servlet; it was meant to be a command-line
processor that ran in its own JVM and produced PDF files.

Regards,
AHS



Re: Can I submit XSLT properties to FOP?

2002-04-29 Thread Markus Wiese
Servlet configuration?
Don't know yet, but I guess you will have to use 1 servlet taking use
of xalan and fop. (2 more servlets)

markus

-Ursprüngliche Nachricht-
Von: Baptiste Casanova <[EMAIL PROTECTED]>
An: [EMAIL PROTECTED] <[EMAIL PROTECTED]>
Datum: Montag, 29. April 2002 11:52
Betreff: Re: Can I submit XSLT properties to FOP?


>Hi Markus,
>How could i do the same thing with embedded FOP ?
>
>- Original Message -
>From: "Markus Wiese" <[EMAIL PROTECTED]>
>To: <[EMAIL PROTECTED]>
>Sent: Monday, April 29, 2002 11:17 AM
>Subject: Re: Can I submit XSLT properties to FOP?
>
>
>> Hi Elmar,
>> consider doing it like this:
>> @java org.apache.xalan.xslt.Process -IN myXML.xml -XSL myXSL.xsl -OUT
>> myFO.fo -PARAM UserName "Elmar Schalück"
>> @java org.apache.fop.apps.Fop myFO.fo myPDF.pdf
>>
>> markus
>>
>>
>> -Ursprüngliche Nachricht-
>> Von: Schalück, Elmar <[EMAIL PROTECTED]>
>> An: '[EMAIL PROTECTED]' <[EMAIL PROTECTED]>
>> Datum: Montag, 29. April 2002 10:53
>> Betreff: Can I submit XSLT properties to FOP?
>>
>>
>> Hi,
>> I like to use FOP to produce reports, based on a XSLT stylesheet.
>>
>> So the call will look like
>> fop -xml myXML.xml -xsl myXSL.xsl -pdf myPDF.pdf
>>
>> Now I need to parametrize the XSLT with the current date/time, with some
>> preselections, 
>>
>> My idea is to have some more parameters for the command line:
>> fop -xml myXML.xml -xsl myXSL.xsl -Param=UserName "Elmar Schalück"
>> -Param=UserLanguage de -pdf myPDF.pdf
>>
>> The XSLT stylesheet starts like
>> >  xmlns:xsl="http://www.w3.org/1999/XSL/Transform"; version="1.0"
>>  xmlns:fo="http://www.w3.org/1999/XSL/Format";>
>> 
>> en
>> ...
>>
>> Do you know of any means to fill in these parameters?
>>
>> Mit freundlichen Grüßen
>> With kind regards
>>
>> Elmar Schalück
>>
>> __
>>
>> Elmar Schalück
>> Advisory Software Developer
>> CEYONIQ AG
>> Winterstr. 49
>> 33649 Bielefeld
>> Germany
>> Fon: +49 (0)521 9318-2108
>> Fax: +49 (0)521 9318-882150
>> E-Mail: [EMAIL PROTECTED]
>> http://www.ceyoniq.com
>> PGP-Fingerprint: BC78 7DEA 7A18 A6F2 A29D  F229 C68F 8C65 F7EE 898A
>>
>>
>
>
>



Re: Can I submit XSLT properties to FOP?

2002-04-29 Thread Jens v. Pilgrim
Hello Elmar,

Monday, April 29, 2002, 10:54:50 AM, "Schalück, Elmar" wrote:

SE> Now I need to parametrize the XSLT with the current date/time, with some
SE> preselections, 

I'm not sure what FOP does if it's called using the -xsl and -xml
parameters, but I assume that Xalan is called. So I would simply call
Xalan first to generate a FO document. You can pass
some parameters (-PARAM) to Xalan, see Xalan documentation for details.

Best regards,
 Jens



Re: Can I submit XSLT properties to FOP?

2002-04-29 Thread Baptiste Casanova
Hi Markus,
How could i do the same thing with embedded FOP ?

- Original Message -
From: "Markus Wiese" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, April 29, 2002 11:17 AM
Subject: Re: Can I submit XSLT properties to FOP?


> Hi Elmar,
> consider doing it like this:
> @java org.apache.xalan.xslt.Process -IN myXML.xml -XSL myXSL.xsl -OUT
> myFO.fo -PARAM UserName "Elmar Schalück"
> @java org.apache.fop.apps.Fop myFO.fo myPDF.pdf
>
> markus
>
>
> -Ursprüngliche Nachricht-
> Von: Schalück, Elmar <[EMAIL PROTECTED]>
> An: '[EMAIL PROTECTED]' <[EMAIL PROTECTED]>
> Datum: Montag, 29. April 2002 10:53
> Betreff: Can I submit XSLT properties to FOP?
>
>
> Hi,
> I like to use FOP to produce reports, based on a XSLT stylesheet.
>
> So the call will look like
> fop -xml myXML.xml -xsl myXSL.xsl -pdf myPDF.pdf
>
> Now I need to parametrize the XSLT with the current date/time, with some
> preselections, 
>
> My idea is to have some more parameters for the command line:
> fop -xml myXML.xml -xsl myXSL.xsl -Param=UserName "Elmar Schalück"
> -Param=UserLanguage de -pdf myPDF.pdf
>
> The XSLT stylesheet starts like
>   xmlns:xsl="http://www.w3.org/1999/XSL/Transform"; version="1.0"
>  xmlns:fo="http://www.w3.org/1999/XSL/Format";>
> 
> en
> ...
>
> Do you know of any means to fill in these parameters?
>
> Mit freundlichen Grüßen
> With kind regards
>
> Elmar Schalück
>
> __
>
> Elmar Schalück
> Advisory Software Developer
> CEYONIQ AG
> Winterstr. 49
> 33649 Bielefeld
> Germany
> Fon: +49 (0)521 9318-2108
> Fax: +49 (0)521 9318-882150
> E-Mail: [EMAIL PROTECTED]
> http://www.ceyoniq.com
> PGP-Fingerprint: BC78 7DEA 7A18 A6F2 A29D  F229 C68F 8C65 F7EE 898A
>
>




Re: Rotating the generated pdf

2002-04-29 Thread Andrius Sabanas
Mihael Knezevic wrote:
Is there any other way to achieve a simple 90deg rotation of the whole 
page? Maybe there is some pdf post-processing software?

do you want to rotate the page or do you just want to have your page in 
landscape format?
Yes, just I want to rotate the page (like I would to do a real paper 
sheet). If fact, my pdf page is already landscape :-), but I need it to 
be more high than wide, for convenient printing (s custom requirement).

Andrius



Re: Can I submit XSLT properties to FOP?

2002-04-29 Thread Markus Wiese
Hi Elmar,
consider doing it like this:
@java org.apache.xalan.xslt.Process -IN myXML.xml -XSL myXSL.xsl -OUT
myFO.fo -PARAM UserName "Elmar Schalück"
@java org.apache.fop.apps.Fop myFO.fo myPDF.pdf

markus


-Ursprüngliche Nachricht-
Von: Schalück, Elmar <[EMAIL PROTECTED]>
An: '[EMAIL PROTECTED]' <[EMAIL PROTECTED]>
Datum: Montag, 29. April 2002 10:53
Betreff: Can I submit XSLT properties to FOP?


Hi,
I like to use FOP to produce reports, based on a XSLT stylesheet.

So the call will look like
fop -xml myXML.xml -xsl myXSL.xsl -pdf myPDF.pdf

Now I need to parametrize the XSLT with the current date/time, with some
preselections, 

My idea is to have some more parameters for the command line:
fop -xml myXML.xml -xsl myXSL.xsl -Param=UserName "Elmar Schalück"
-Param=UserLanguage de -pdf myPDF.pdf

The XSLT stylesheet starts like
http://www.w3.org/1999/XSL/Transform"; version="1.0"
 xmlns:fo="http://www.w3.org/1999/XSL/Format";>

en
...

Do you know of any means to fill in these parameters?

Mit freundlichen Grüßen
With kind regards

Elmar Schalück

__

Elmar Schalück
Advisory Software Developer
CEYONIQ AG
Winterstr. 49
33649 Bielefeld
Germany
Fon: +49 (0)521 9318-2108
Fax: +49 (0)521 9318-882150
E-Mail: [EMAIL PROTECTED]
http://www.ceyoniq.com
PGP-Fingerprint: BC78 7DEA 7A18 A6F2 A29D  F229 C68F 8C65 F7EE 898A







Re: Rotating the generated pdf

2002-04-29 Thread Rodolphe VAGNER
The ACROBAT SDK does : your pages can be rotated, means all the page with
the text in.

- Original Message -
From: "Andrius Sabanas" <[EMAIL PROTECTED]>
To: "fop-user" <[EMAIL PROTECTED]>
Sent: Monday, April 29, 2002 10:45 AM
Subject: Rotating the generated pdf


> Hello,
>
> Is it possible to generate the rotated pdf using FOP? I checked the
> XSL:FO spec and found the reference-orientation property, but does not
> seem to be supported by FOP as for now.
>
> Is there any other way to achieve a simple 90deg rotation of the whole
> page? Maybe there is some pdf post-processing software?
>
>
> thanks in advance,
>
> Andrius
>
>



Re: Rotating the generated pdf

2002-04-29 Thread Mihael Knezevic
Is there any other way to achieve a simple 90deg rotation of the whole 
page? Maybe there is some pdf post-processing software?
do you want to rotate the page or do you just want to have your page in 
landscape format?


Can I submit XSLT properties to FOP?

2002-04-29 Thread "Schalück, Elmar"
Hi,
I like to use FOP to produce reports, based on a XSLT stylesheet.

So the call will look like
fop -xml myXML.xml -xsl myXSL.xsl -pdf myPDF.pdf

Now I need to parametrize the XSLT with the current date/time, with some
preselections, 

My idea is to have some more parameters for the command line:
fop -xml myXML.xml -xsl myXSL.xsl -Param=UserName "Elmar Schalück"
-Param=UserLanguage de -pdf myPDF.pdf

The XSLT stylesheet starts like
http://www.w3.org/1999/XSL/Transform"; version="1.0"
 xmlns:fo="http://www.w3.org/1999/XSL/Format";>

en
...

Do you know of any means to fill in these parameters?

Mit freundlichen Grüßen
With kind regards

Elmar Schalück

__

Elmar Schalück
Advisory Software Developer 
CEYONIQ AG  
Winterstr. 49   
33649 Bielefeld 
Germany 
Fon: +49 (0)521 9318-2108
Fax: +49 (0)521 9318-882150
E-Mail: [EMAIL PROTECTED]
http://www.ceyoniq.com
PGP-Fingerprint: BC78 7DEA 7A18 A6F2 A29D  F229 C68F 8C65 F7EE 898A






Rotating the generated pdf

2002-04-29 Thread Andrius Sabanas
Hello,
Is it possible to generate the rotated pdf using FOP? I checked the 
XSL:FO spec and found the reference-orientation property, but does not 
seem to be supported by FOP as for now.

Is there any other way to achieve a simple 90deg rotation of the whole 
page? Maybe there is some pdf post-processing software?

thanks in advance,
Andrius



Re: Adding Fonts to userconfig...

2002-04-29 Thread Andrius Sabanas
J.Pietschmann wrote:
[EMAIL PROTECTED] wrote:
...  Any down side to changing the baseDire?

Yes, it's global. You may run into problems with
multithreaded servers.
J.Pietschmann
Hello,
I would like to install 2 webapps with servlets using FOP on the same 
servlet engine. Both of them specify their own userconfig.xml files, but 
I do not use baseDir, rather get the absolute paths hardcoded.

Now I wonder if I am going to get a conflict between those two. This 
design with static (magic) Options passing seems bizzare to me :-)
But as I understand, separate webapps get loaded by separate 
classloaders, so is there any problem? Can anybody comment on this?

thanks,
Andrius



AW: Font-Smoothing of embedded SVG in fop

2002-04-29 Thread Sam Prokop
So, i just embedded Arial Bold Italic in fop with style="normal" and
weight="normal".
I can live with that.

> -Ursprüngliche Nachricht-
> Von: J.Pietschmann [mailto:[EMAIL PROTECTED]
> Gesendet: Sonntag, 28. April 2002 23:05
> An: [EMAIL PROTECTED]
> Betreff: Re: Font-Smoothing of embedded SVG in fop
> 
> 
> Sam Prokop wrote:
> > Yes, it works if i switch off bold and italic.
> > (but then it isn´t bold and italic, just normal sans-serif ;-)
> 
> This means there is a font "dialog", there just isn't
> a bold-italic variant available. You are out of luck
> with this one, I think.
> 
> Have you tried "Helvetica" (upper case H)?
> 
> 
> J.Pietschmann
> 
> 
> 
> 


RE: Possible thread-safe issue with fonts

2002-04-29 Thread Chris Warr

OK, it was a threading issue, I downloaded the source and had a play.  It
comes about because the static configuration is updated for every
translation I do.  FontSetup.addConfiguredFonts() can read from the font
list at the same time as ConfigurationParser.store() updates it.  I just put
a line in ConfigurationParser.endElement() to only add fonts if there are
none in the list.  Was easier for me than mucking around with
'synchronized', I'm only a java beginner.


} else if (localName.equals("fonts")) {
-->if (Configuration.getFonts() != null &&
Configuration.getFonts().size() != 0)
-->{
-->// Don't update the fonts
-->}
-->else
   {
   this.store("standard", "fonts", fontList);
   }

-Original Message-
From: Chris Warr [mailto:[EMAIL PROTECTED]
Sent: Monday, 29 April 2002 9:07
To: [EMAIL PROTECTED]
Subject: RE: Possible thread-safe issue with fonts


I don't get that error, just the one 'unknown font dynamo...'

Is this more appropriate for fop-dev?

Chris.

-Original Message-
From: Keiron Liddle [mailto:[EMAIL PROTECTED]
Sent: Friday, 26 April 2002 17:26
To: [EMAIL PROTECTED]
Subject: Re: Possible thread-safe issue with fonts



It sounds like it is a threading problem.

Do you get any messages like:
"Failed to read font metrics file ... "

It would appear that two threads could be reading the font metrics file at 
the same time.
Accessing the file is done through the parser so we don't know what it is 
actually doing and it depends on the parser.
I think each time it is a new data set in memory so it probably is not 
that.



On 2002.04.26 08:17 Chris Warr wrote:
> 
> Hi, I'm running cocoon 2.1dev under tomcat 4.04b2 with JDK 1.3 and FOP
> 0.20.3.  My cocoon app is generating a PDF using FOP.  I use and embed a
> font in my generated PDF file with the following in my userconfig file:
> 
>kerning="yes"
> embed-file="d:/fonts/dynamo.pfb">
>weight="normal"/>
>weight="bold"/>
>   
> 
> This all works fine and dandy under normal usage, I get the dynamo font
> embedded in my PDF and all is well.  However if I run a load test (20
> concurrent processes) on the same app. I get the following error appear
> in
> my tomcat log files:
> 
> 2002-04-26 15:25:20 ERROR   (2002-04-26) 15:25.20:375   [fop ]
> (/cocoon/invoice.pdf) HttpProcessor[80][11]/MessageHandler: unknown font
> dynamo,normal,normal so defaulted font to any
> 
> Not for every hit, but for some.  So I'm guessing that there is some sort
> of
> problem with resource sharing.  That is, could FOP not be thread safe as
> far
> as accessing this file?  Or if the file is loaded into memory once, could
> there be multi-threading issues with reading from wherever it is stored
> in
> memory?
> 
> Anyone got any ideas?
> 
> Chris.
> 


Why is FO(P) a superior model than what most proprietary tools propose

2002-04-29 Thread Patrick Andries
Before convincing people to use specifically, FOP I would like to 
convince people that FO is a superior model than traditional model of 
proprietary solutions (3B2, Compuset) for documents that both FOP and 
those traditional tools can produce.

In other words, is FO a good strategic directions.
Some questions a bit more precise :
1) What are the advantages of people using XSL-FO as page description language 
rather than the ones their could be using with proprietary tools ?
2) I understand that everything related with XML (XSLT/XSL-FO) has a modern 
flavour that few techies can resist, but what are the objectives reasons ?
3) Are they any advantages to FO being integrated with XSLT that the 
proprietary tools would not have ?
Thanks
Does somebody know if any of the big software publishing companies are 
considering XSL-FO support ?
P. Andries