Re: Embedding FOP in SVG in FOP?

2004-07-02 Thread Jeremias Maerki
The work-around obviously only works for simple cases. In FOP 0.20.5
there's no chance to do what you suggest. Even with the current
development code I doubt this would be so simple. I don't think this is
even on the task list.

Theoretically, you could try to create a Batik extension to handle FO
elements. You could then write a simple wrapper around the FO snippet to
create a full XSL-FO document that could be rendered by FOP's AWT
renderer to the Graphics2D interface given by Batik. But this is very
adventurous.

It's probably better on the long run to somehow support the current
development so FOP 1.0 gets into arm's reach.

On 02.07.2004 19:38:50 Adam Augusta wrote:
 Apparently FOP doesn't support rotating areas.  The compliance page 
 suggests using SVG, but then I'd have to have radically different 
 transforms for handling block spacing, progression, etc just because an 
 area was rotated.
 
 To that end, I was thinking of generating the area in FOP, and somehow 
 saving that output and giving it to SVG to rotate, which I would in 
 turn embed in FOP.  Has anyone had experience with this or other, 
 hopefully better, workarounds?


Jeremias Maerki


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



Re: Embedding FOP, PDF Encryption Custom fonts

2003-10-15 Thread J.Pietschmann
Johannes Stuermer wrote:
Has there been any movement in this area?
No. Encryption wount be fully implemented in the maintenance branch.
Can this problem be avoided by
using Adobe fonts?
If you mean built-in, then yes, encryption works if you use
one of the built-in default fonts (because they are not embedded).
J.Pietschmann
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


RE: Embedding FOP, PDF Encryption Custom fonts

2003-10-15 Thread Johannes Stuermer
 No. Encryption won't be fully implemented in the maintenance branch.
Is there another branch that does have it implemented?

Thanks


-Original Message-
From: J.Pietschmann [mailto:[EMAIL PROTECTED]
Sent: Tuesday, October 14, 2003 4:55 PM
To: [EMAIL PROTECTED]
Subject: Re: Embedding FOP, PDF Encryption  Custom fonts


Johannes Stuermer wrote:
 Has there been any movement in this area?

No. Encryption wount be fully implemented in the maintenance branch.

 Can this problem be avoided by
 using Adobe fonts?
If you mean built-in, then yes, encryption works if you use
one of the built-in default fonts (because they are not embedded).

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: Embedding FOP, PDF Encryption Custom fonts

2003-10-15 Thread J.Pietschmann
Chris Bowditch wrote:
The code in HEAD of CVS has PDF encryption fully implemented. However, 
it is lacking support for key FO constructs, and is currently unusable 
in real world scenarios.
Testing and detailed new bug reports are welcome though. I just
can't make promises anything gets fixed soon.
J.Pietschmann
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


RE: Embedding FOP, PDF Encryption Custom fonts

2003-10-15 Thread Johannes Stuermer
Thank you both for the update.


-Original Message-
From: J.Pietschmann [mailto:[EMAIL PROTECTED]
Sent: Wednesday, October 15, 2003 6:13 AM
To: [EMAIL PROTECTED]
Subject: Re: Embedding FOP, PDF Encryption  Custom fonts


Chris Bowditch wrote:
 The code in HEAD of CVS has PDF encryption fully implemented. However, 
 it is lacking support for key FO constructs, and is currently unusable 
 in real world scenarios.

Testing and detailed new bug reports are welcome though. I just
can't make promises anything gets fixed soon.

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]



Embedding FOP, PDF Encryption Custom fonts

2003-10-14 Thread Johannes Stuermer
When the PDF file is encrytped, embedded fonts are not rendered correctly.
The message unable to extract embedded font xxx appears.

This issue has been discussed a few months back, with the conclusion:
Known problem. Encryption in the maintenance branch is not completely
finished

Has there been any movement in this area? Can this problem be avoided by
using Adobe fonts?

Thanks


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



Re: Embedding FOP, PDF Encryption Custom fonts

2003-06-23 Thread Jeremias Maerki
What kind of signature/verification? A cryptographic signature inside
the PDF to authenticate the generator of the PDF? This is already standardized
by Adobe.

PDF is designed to be extensible. Therefore it is perfectly valid to add
custom streams/objects to the PDF. But you must be prepared that a PDF
editor may drop the object if it saves the PDF again. And of course, you
need to provide a way to support your proprietary extension. Better
stick to standards.

On 22.06.2003 12:26:04 Andreas Delmelle wrote:
 also, i'm considering the option of creating an 
 additional content-stream, that could contain a 
 signature for verification. 

 is it possible to include an object in the pdf that
 would be left alone by other readers ( but could be 
 used, perhaps as a form of FOP-specific verification )
 and does this even make sense?



Jeremias Maerki


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



RE: Embedding FOP, PDF Encryption Custom fonts

2003-06-23 Thread Andreas Delmelle
i get the picture... thx for the info. ( esp. for pointing out that
a different editor might drop this object; sth i hadn't really
considered )

btw : switched to the latest version of the 'maintain' branch, but
the way the custom config xml is processed seems to differ from the
latest distribution version.

any helpful hints on this one?

thx in advance.

greetz,

ald

-Original Message-
From: Jeremias Maerki [mailto:[EMAIL PROTECTED]
Sent: maandag 23 juni 2003 11:19
To: [EMAIL PROTECTED]
Subject: Re: Embedding FOP, PDF Encryption  Custom fonts


What kind of signature/verification? A cryptographic signature inside
the PDF to authenticate the generator of the PDF? This is already
standardized
by Adobe.

PDF is designed to be extensible. Therefore it is perfectly valid to add
custom streams/objects to the PDF. But you must be prepared that a PDF
editor may drop the object if it saves the PDF again. And of course, you
need to provide a way to support your proprietary extension. Better
stick to standards.

On 22.06.2003 12:26:04 Andreas Delmelle wrote:
 also, i'm considering the option of creating an
 additional content-stream, that could contain a
 signature for verification.

 is it possible to include an object in the pdf that
 would be left alone by other readers ( but could be
 used, perhaps as a form of FOP-specific verification )
 and does this even make sense?



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: Embedding FOP, PDF Encryption Custom fonts

2003-06-23 Thread Jeremias Maerki
That hasn't changed as far as I know. Are you sure you got the
maintenance branch and not the redesign/trunk/HEAD?

On 23.06.2003 19:26:11 Andreas Delmelle wrote:
 btw : switched to the latest version of the 'maintain' branch, but
 the way the custom config xml is processed seems to differ from the
 latest distribution version.
 
 any helpful hints on this one?


Jeremias Maerki


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



RE: Embedding FOP, PDF Encryption Custom fonts

2003-06-23 Thread Andreas Delmelle
damn'! got me again ;) dl'ed the wrong branch
(still got to get used to the cvs tool... sigh)

thx for another helpful hint

greetz,

ald

-Original Message-
From: Jeremias Maerki [mailto:[EMAIL PROTECTED]
Sent: maandag 23 juni 2003 20:05
To: [EMAIL PROTECTED]
Subject: Re: Embedding FOP, PDF Encryption  Custom fonts


That hasn't changed as far as I know. Are you sure you got the
maintenance branch and not the redesign/trunk/HEAD?

On 23.06.2003 19:26:11 Andreas Delmelle wrote:
 btw : switched to the latest version of the 'maintain' branch, but
 the way the custom config xml is processed seems to differ from the
 latest distribution version.
 
 any helpful hints on this one?


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: Embedding FOP, PDF Encryption Custom fonts

2003-06-22 Thread Chris Faulkner
Hello all

I am already using FOP to create PDF documents in a servlet environment. I
would like to encrypt these documents. I can see on the website that there
are instructions to create encrypted documents using the command line tool -
how can I use the utilities in a servlet  ?

Thanks

Chris



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



RE: Embedding FOP, PDF Encryption Custom fonts

2003-06-22 Thread Andreas Delmelle
If u don't use custom fonts, code like in my earlier message should do the
trick.
( Create an options Hashmap  use driver.getRenderer().setOptions(...) ).

Only downside for the moment is that the producer info will get scrambled,
but as this is a
mere detail... The supplied restrictions are fully  correctly applied
though.

greetz,

ald

-Original Message-
From: Chris Faulkner [mailto:[EMAIL PROTECTED]
Sent: zondag 22 juni 2003 11:00
To: [EMAIL PROTECTED]
Subject: RE: Embedding FOP, PDF Encryption  Custom fonts


Hello all

I am already using FOP to create PDF documents in a servlet environment. I
would like to encrypt these documents. I can see on the website that there
are instructions to create encrypted documents using the command line tool -
how can I use the utilities in a servlet  ?

Thanks

Chris



-
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: Embedding FOP, PDF Encryption Custom fonts

2003-06-22 Thread Andreas Delmelle
's allright. no hurry.

another side-effect : on pressing the OK button
in the doc properties summary screen, you get the message
that 'this operation is not allowed' ( maybe caused by the 
fact that this screen is a restricted version of the
one in the full Acrobat Version  issues a command 
on pressing that button which is not allowed under 
the applied restrictions? )

also, i'm considering the option of creating an 
additional content-stream, that could contain a 
signature for verification. 
is it possible to include an object in the pdf that
would be left alone by other readers ( but could be 
used, perhaps as a form of FOP-specific verification )
and does this even make sense?


greetz,

ald

-Original Message-
From: Jeremias Maerki [mailto:[EMAIL PROTECTED]
Sent: zondag 22 juni 2003 9:19
To: [EMAIL PROTECTED]
Subject: Re: Embedding FOP, PDF Encryption  Custom fonts



On 21.06.2003 12:45:06 Andreas Delmelle wrote:
 while embedding FOP using embedded TrueType  implementing PDF
 encryption,
 stumbled upon the following (Acrobat Reader 5.1) :
 
 - - unable to extract embedded font ...

That's the missing ToUnicode functionality that was discussed a few days
ago. It looks like this is becoming a major topic.

 - - also the producer ( author / title / date - added myself)
 properties in the PDFInfo
   produce weird results

snip/

 anyone encounter this problem yet?

Known problem. Encryption in the maintenance branch is not completely
finished. Dictionary strings don't get encrypted like they should. This
is fixed in the redesign, however. But that won't help you right now.
Either someone has to complete the encryption part or we have to switch
the the PDF library from the redesign.


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: Embedding FOP, PDF Encryption Custom fonts

2003-06-22 Thread Andreas Delmelle
switched to latest dev cvs snapshot.

trouble now is i don't have the apache.commons package.
( imported in AbstracPDFStream.java )

anyone know where to get it?


thx,

ald
-Original Message-
From: Jeremias Maerki [mailto:[EMAIL PROTECTED]
Sent: zondag 22 juni 2003 9:19
To: [EMAIL PROTECTED]
Subject: Re: Embedding FOP, PDF Encryption  Custom fonts



On 21.06.2003 12:45:06 Andreas Delmelle wrote:
 while embedding FOP using embedded TrueType  implementing PDF
 encryption,
 stumbled upon the following (Acrobat Reader 5.1) :
 
 - - unable to extract embedded font ...

That's the missing ToUnicode functionality that was discussed a few days
ago. It looks like this is becoming a major topic.

 - - also the producer ( author / title / date - added myself)
 properties in the PDFInfo
   produce weird results

snip/

 anyone encounter this problem yet?

Known problem. Encryption in the maintenance branch is not completely
finished. Dictionary strings don't get encrypted like they should. This
is fixed in the redesign, however. But that won't help you right now.
Either someone has to complete the encryption part or we have to switch
the the PDF library from the redesign.


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: Embedding FOP, PDF Encryption Custom fonts

2003-06-22 Thread Jeremias Maerki
That's the redesign. You will want to get the branch with tag
fop-0_20_2-maintain. See: http://xml.apache.org/fop/dev/

On 22.06.2003 15:07:20 Andreas Delmelle wrote:
 switched to latest dev cvs snapshot.
 
 trouble now is i don't have the apache.commons package.
 ( imported in AbstracPDFStream.java )
 
 anyone know where to get it?


Jeremias Maerki


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



Embedding FOP, PDF Encryption Custom fonts

2003-06-21 Thread Andreas Delmelle
 
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

while embedding FOP using embedded TrueType  implementing PDF
encryption,
stumbled upon the following (Acrobat Reader 5.1) :

- - unable to extract embedded font ...

- - also the producer ( author / title / date - added myself)
properties in the PDFInfo
produce weird results

code :

driver.setRenderer(Driver.RENDER_PDF);
log.info( Renderer set... );
driver.getRenderer().setAuthor( author );
driver.getRenderer().setTitle( title );

opt = new java.util.HashMap();
opt.put( allowEditContent, FALSE );
opt.put( allowPrint, FALSE );
log.info( Options created... );
driver.getRenderer().setOptions(opt);

anyone encounter this problem yet?

greetz

ald

-BEGIN PGP SIGNATURE-
Version: PGPfreeware 7.0.3 for non-commercial use http://www.pgp.com

iQA/AwUBPvQ3J9Bw/OvTa+XUEQIzMwCeNTL8S61/nij4s254OFf/OeaFAEgAnikH
mj+rkkPb1j95uQQtxHjaJ7T2
=TNu7
-END PGP SIGNATURE-


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



font and embedding FOP question

2003-04-28 Thread Steve Albin








I would like to use additional fonts with FOP, where FOP is embedded
in a Servlet. The instructions at http://xml.apache.org/fop/fonts.html
say to use the c conf/userconfig.xml option on the command line in order
for FOP to find custom font information. However how do you specify this
information when FOP is embedded (e.g. when using the FOP APIs)?



Thanks,

Steve








Re: font and embedding FOP question

2003-04-28 Thread J.Pietschmann
Steve Albin wrote:
I would like to use additional fonts with FOP, where FOP is embedded in
a Servlet. The instructions at http://xml.apache.org/fop/fonts.html say
to use the -c conf/userconfig.xml option on the command line in order
for FOP to find custom font information. However how do you specify this
information when FOP is embedded (e.g. when using the FOP APIs)?
See
 http://xml.apache.org/fop/faq.html#usercfg
J.Pietschmann

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


embedding fop

2003-02-10 Thread Marisol Garcia





Hello,



Where could I find the source of the 
examples: ExampleFO2PDF.java, 
ExampleXML2FO.java, ExampleXML2PDF.java, ExampleObj2XML.java and 
ExampleObj2PDF.java ?

Thanks in 
advance.


RE: embedding fop

2003-02-10 Thread Matthew Lancashire




Try 
this
http://cvs.apache.org/viewcvs.cgi/xml-fop/examples/embedding/java/embedding/Attic/

  -Original Message-From: Marisol Garcia 
  [mailto:[EMAIL PROTECTED]Sent: 10 Feb 2003 11:50To: 
  [EMAIL PROTECTED]Subject: embedding fop
  
  
  Hello,
  
  
  
  Where could I find the source of the 
  examples: ExampleFO2PDF.java, 
  ExampleXML2FO.java, ExampleXML2PDF.java, ExampleObj2XML.java and 
  ExampleObj2PDF.java ?
  
  Thanks in 
  advance.
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

RE: embedding FOP

2002-12-12 Thread Lucian Opris



Hi,
Could 
anyone explain step by step, how can I embed userconfig.xml in FopServlet? I'm 
using Tomcat webserver. I'm assuming, I have tore-build somejava 
file but I don't know which ones.
Thanks 
in advance for any help.
P.S.Exemple of FOPServlet would be great
Lucian Opris



embedding FOP

2002-12-11 Thread Boris Rousseau



All,

Sorry about the newby question, but I have some trouble with the 
FOPServlet.
I managed to build the .war. However when I put it under my \Tomcat 
4.1\webapps directory
and I start Tomcat I get the following error in the "Start Tomcat" command 
prompt:
"11-Dec-2002 12:18:57 org.apache.commons.digester.Digester errorSEVERE: 
Parse Error at line 21 column 11: The content of element type "web-app"must 
match 
"(icon?,display-name?,description?,distributable?,context-param*,servlet*,servlet-mapping*,session-config?,mime-mapping*,welcome-file-list?,error-page*,taglib*,resource-ref*,security-constraint*,login-config?,security-role*,env-entry*,ejb-ref*)"." 

...
Can you point me out what is wrong ?

Regards,
Boris


RE: embedding FOP

2002-12-11 Thread Jean-Philippe VALENTIN
Hi,

This is an example of my web.xml file :

...
servlet
servlet-nameservletpdf/servlet-name
descriptionImpression des rapports au format PDF
/description
 
servlet-classcom.sncf.margo.testRapport2.FopServlet/servlet-class
/servlet
...
servlet-mapping
   servlet-nameservletpdf/servlet-name
   url-pattern/servletpdf/url-pattern
/servlet-mapping


You must put all servlet tag before the servlet-mapping tag.
PS : I have inserted in a package the FopServlet.

Jean-Philippe VALENTIN
Groupe SQLI - France

 

-Message d'origine-
De: Boris Rousseau
A: [EMAIL PROTECTED]
Date: 11/12/02 13:25
Objet: embedding FOP

All,
 
Sorry about the newby question, but I have some trouble with the
FOPServlet.
I managed to build the .war. However when I put it under my \Tomcat
4.1\webapps directory
and I start Tomcat I get the following error in the Start Tomcat
command prompt:
11-Dec-2002 12:18:57 org.apache.commons.digester.Digester error
SEVERE: Parse Error at line 21 column 11: The content of element type
web-app
must match
(icon?,display-name?,description?,distributable?,context-param*,serv
let*,servlet-mapping*,session-config?,mime-mapping*,welcome-file-list?,e
rror-pag
e*,taglib*,resource-ref*,security-constraint*,login-config?,security-rol
e*,env-e
ntry*,ejb-ref*). 
...
Can you point me out what is wrong ?
 
Regards,
Boris

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



RE: embedding FOP

2002-12-11 Thread Cox, Charlie



this 
is a problem in your web.xml. the elements must be in the order listed in the 
error message. This is not a FOP problem - you will get better support on the 
tomcat-user list
http://jakarta.apache.org/site/mail.html

Charlie

  -Original Message-From: Boris Rousseau 
  [mailto:[EMAIL PROTECTED]Sent: Wednesday, December 11, 2002 7:26 
  AMTo: [EMAIL PROTECTED]Subject: embedding 
  FOP
  All,
  
  Sorry about the newby question, but I have some trouble with the 
  FOPServlet.
  I managed to build the .war. However when I put it under my \Tomcat 
  4.1\webapps directory
  and I start Tomcat I get the following error in the "Start Tomcat" 
  command prompt:
  "11-Dec-2002 12:18:57 org.apache.commons.digester.Digester 
  errorSEVERE: Parse Error at line 21 column 11: The content of element type 
  "web-app"must match 
  "(icon?,display-name?,description?,distributable?,context-param*,servlet*,servlet-mapping*,session-config?,mime-mapping*,welcome-file-list?,error-page*,taglib*,resource-ref*,security-constraint*,login-config?,security-role*,env-entry*,ejb-ref*)"." 
  
  ...
  Can you point me out what is wrong ?
  
  Regards,
  Boris


Re: embedding FOP in Java

2002-12-10 Thread Boris Rousseau
All,

Do you always need a servlet to run an embedded FOP in a Java ?
I am a bit confused with the example provided in fop-0.20.4.
(an API documentation of the Driver, XSLTInputHandler, MessageHandler
classes would help a lot)
Obviously I don't want to use a servlet but rather use a Web Service to
be able to submit XML documents and get back PDFs.

Regards,
Boris

- Original Message -
From: Oleg Tkachenko [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Monday, December 09, 2002 6:13 PM
Subject: Re: embedding FOP in Java


 *This message was transferred with a trial version of CommuniGate(tm) Pro*
 Boris Rousseau wrote:

  Unfortunately when I compile it, I get the following error:
  fop.java:19: cannot resolve symbol
  symbol  : constructor XSLTInputHandler
(java.lang.String,java.lang.String)
  location: class org.apache.fop.apps.XSLTInputHandler
  InputHandler inputHandler = new XSLTInputHandler(xmlFile,
xslFile);
  ^
  1 error
 
  Can you help me ?
 The only constructor XSLTInputHandler class has is
 public XSLTInputHandler(File xmlfile, File xsltfile), there is no
 XSLTInputHandler (java.lang.String,java.lang.String) constructor.

 --
 Oleg Tkachenko
 eXperanto team
 Multiconn Technologies, Israel


 -
 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: embedding FOP in Java

2002-12-10 Thread Oleg Tkachenko
Boris Rousseau wrote:
Do you always need a servlet to run an embedded FOP in a Java ?
Not really, you can embed FOP anywhere from standalone application to ejb. 
FOPServlet is just an example of how to embed, useful though.

Obviously I don't want to use a servlet but rather use a Web Service to
be able to submit XML documents and get back PDFs.
And what's you problem? You know how to embed FOP already, so write your web 
service and embed FOP there.

--
Oleg Tkachenko
eXperanto team
Multiconn Technologies, Israel
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


embedding FOP in Java

2002-12-09 Thread Boris Rousseau



Hello,

I am using the following file embedding fop:
"import org.apache.fop.apps.Driver;import 
org.apache.fop.layout.Page;import org.apache.fop.apps.Version;import 
org.apache.fop.apps.XSLTInputHandler;import 
org.apache.fop.apps.InputHandler;import org.xml.sax.*;import 
org.apache.fop.messaging.MessageHandler;import java.io.*;

//import org.apache.fop.apps.InputHandler;//import 
org.apache.fop.apps.XSLTInputHandler;

public class fop{

public void fop(String xmlFile, String xslFile, String outFile){

Driver driver = new 
Driver();driver.setRenderer(Driver.RENDER_PDF);InputHandler 
inputHandler = new XSLTInputHandler(xmlFile, xslFile);XMLReader parser 
= inputHandler.getParser();driver.setOutputStream(new 
FileOutputStream(outFile));driver.render(parser, 
inputHandler.getInputSource());}}"

Unfortunately when I compile it, I get the following error:
fop.java:19: cannot resolve symbolsymbol : constructor 
XSLTInputHandler (java.lang.String,java.lang.String)location: class 
org.apache.fop.apps.XSLTInputHandler 
InputHandler inputHandler = new XSLTInputHandler(xmlFile, 
xslFile); 
^1 error

Can you help me ?

I would also like to embed the FOP as a Web Service.
Can you give me any pointers to tutorials on this ?

Regards,
Boris


Re: embedding FOP in Java

2002-12-09 Thread adis . katkic
i use this method and it works fine


 public void createPdf(String xml, String xslPath, String outputPdfPath) throws 
TransformerConfigurationException, TransformerException,
FileNotFoundException, FOPException, IOException
  {

MessageHandler.setScreenLogger(log);

FileOutputStream fos=new FileOutputStream(outputPdfPath);

Driver driver=new Driver();
driver.setLogger(log);
driver.setOutputStream(fos);
driver.setRenderer(Driver.RENDER_PDF);

StreamSource xmlStreamSource=new StreamSource(new StringReader(xml));

Transformer transformer=TransformerFactory.newInstance().newTransformer(new 
StreamSource(xslPath));
transformer.transform(xmlStreamSource, new 
SAXResult(driver.getContentHandler()));

fos.close();
  }


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



embedding FOP in Java

2002-12-09 Thread adis . katkic
Sorry for beeing forced to ask this question,
I have created I java class that takes xml file and xsl file and creates
pdf.

Now my xml has croatian character and those are showen as #.
I read documentation and it says that fonts must be avaliable on the
platform.
Now I don't understand this since I have croatina locale set and I can view
pdf files that have
croatian characters.
I have tried to use different font familises for fo:block tag. (Arial,
Symbol etc ...)


What should I do to make it work. If you can explain it to me step by step
I would be very thankful.

My method is

 public void createPdf(String xml, String xslPath, String outputPdfPath)
throws TransformerConfigurationException, TransformerException,
FileNotFoundException, FOPException, IOException
  {
   Logger log = new ConsoleLogger(ConsoleLogger.LEVEL_WARN);
   MessageHandler.setScreenLogger(log);
   FileOutputStream fos=new FileOutputStream(outputPdfPath);

   //Options options = new Options(new File(c:
   \\Adis\\MedicSoft\\MedicsoftClient\\GUI\\config\\print\\userconfig.xml));

   Driver driver=new Driver();
   driver.setLogger(log);
   driver.setOutputStream(fos);
   driver.setRenderer(Driver.RENDER_PDF);
   StreamSource xmlStreamSource=new StreamSource(new StringReader(xml));
   Transformer transformer=TransformerFactory.newInstance
   ().newTransformer(new StreamSource(xslPath));
   transformer.transform(xmlStreamSource, new
   SAXResult(driver.getContentHandler()));
   fos.close();
  }

and xsl that is used for fop is very easy

?xml version=1.0 encoding=UTF-8?
xsl:stylesheet version=1.0
  xmlns:xsl=http://www.w3.org/1999/XSL/Transform;
  xmlns:fo=http://www.w3.org/1999/XSL/Format;

 xsl:template match=/
 fo:root xmlns:fo=http://www.w3.org/1999/XSL/Format;
   fo:layout-master-set
fo:simple-page-master master-name=simple
page-height=29.7cm
page-width=21cm
margin-top=1cm
margin-bottom=2cm
margin-left=2.5cm
margin-right=2.5cm
  fo:region-body margin-top=3cm/
  fo:region-before extent=3cm/
  fo:region-after extent=1.5cm/
/fo:simple-page-master
   /fo:layout-master-set

   fo:page-sequence master-reference=simple
fo:flow flow-name=xsl-region-body
  xsl:apply-templates select=data/
/fo:flow
   /fo:page-sequence
  /fo:root
 /xsl:template

 xsl:template match=data
  fo:block
xsl:apply-templates select=name/
xsl:apply-templates select=description/
  /fo:block
 /xsl:template

 xsl:template match=name
  fo:block font-size=18pt
   font-family=sans-serif
   line-height=24pt
   space-after.optimum=15pt
   background-color=blue
   color=white
   text-align=center
   padding-top=3pt
xsl:value-of select=./
  /fo:block
 /xsl:template

 xsl:template match=description
  fo:block font-size=12pt
  font-family=Symbol
  line-height=15pt
  space-after.optimum=3pt
  text-align=justify
xsl:value-of select=./
/fo:block
/xsl:template

 /xsl:stylesheet







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



Re: embedding FOP in Java

2002-12-09 Thread Oleg Tkachenko
Boris Rousseau wrote:
Unfortunately when I compile it, I get the following error:
fop.java:19: cannot resolve symbol
symbol  : constructor XSLTInputHandler (java.lang.String,java.lang.String)
location: class org.apache.fop.apps.XSLTInputHandler
InputHandler inputHandler = new XSLTInputHandler(xmlFile, xslFile);
^
1 error
 
Can you help me ?
The only constructor XSLTInputHandler class has is
public XSLTInputHandler(File xmlfile, File xsltfile), there is no
XSLTInputHandler (java.lang.String,java.lang.String) constructor.
--
Oleg Tkachenko
eXperanto team
Multiconn Technologies, Israel
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: embedding FOP in Java

2002-12-09 Thread Oleg Tkachenko
[EMAIL PROTECTED] wrote:
Now my xml has croatian character and those are showen as #.
I read documentation and it says that fonts must be avaliable on the
platform.
Now I don't understand this since I have croatina locale set and I can view
pdf files that have
croatian characters.
See http://xml.apache.org/fop/faq.html#faq-N103ED and 
http://xml.apache.org/fop/fonts.html.

--
Oleg Tkachenko
eXperanto team
Multiconn Technologies, Israel
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Embedding FOP within Servlet

2002-04-22 Thread Georg Daniel Vassilopulos



Hello All,

With the example "embedding" distributed with 
fop-0.20.3-src.tar.gz I got stuck.

The PDF generation from a *.fo file works fine. But 
while generating 
a PDF out of a xml file and a xsl stylesheet I 
always get the exception:

org.apache.fop.apps.FOPException: javax.xml.transform.Transformer	at 
org.apache.fop.apps.XSLTInputHandler.getParser(XSLTInputHandler.java:107)	at 
FopServlet.renderXML(FopServlet.java:118)	at 
FopServlet.doGet(FopServlet.java:67)	at 
javax.servlet.http.HttpServlet.service(HttpServlet.java:740)

I have following jar files in my 
tomcat/webapps/WEB_INF/lib directory and the logiles report
that following jar file were found (yes I did put 
them there):

ant.jar
ant-1.3-optional.jar
avalon-framework-4.0.jar
batik.jar
bsf.jar
buildtools.jar
fop.jar
logkit-1.0.jar
stylebook.jar
xalan-2.0.0.jar
xerces-1.2.3.jar


I thougt the Transformer class ships with 
xalan-2.0.0.jar but anyway, I get the exception.

Any help would be great. 

Thanks a lot...
Georg



Re: Embedding FOP within Servlet

2002-04-22 Thread Jeremias Maerki
That's a classloader issue. I haven't investigated what exactly the
problem is, but putting xalan.jar in common/lib or lib instead of
WEB-INF/lib should do the trick.


On 22.04.2002 16:29:16 Georg Daniel Vassilopulos wrote:
 Hello All,
 
 With the example embedding distributed with fop-0.20.3-src.tar.gz I got 
 stuck.
 
 The PDF generation from a *.fo file works fine. But while generating 
 a PDF out of a xml file and a xsl stylesheet I always get the exception:
 
 org.apache.fop.apps.FOPException: javax.xml.transform.Transformer
   at 
 org.apache.fop.apps.XSLTInputHandler.getParser(XSLTInputHandler.java:107)
   at FopServlet.renderXML(FopServlet.java:118)
   at FopServlet.doGet(FopServlet.java:67)
   at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
 
 
 I have following jar files in my tomcat/webapps/WEB_INF/lib directory and the 
 logiles report
 that following jar file were found (yes I did put them there):
 
 ant.jar
 ant-1.3-optional.jar
 avalon-framework-4.0.jar
 batik.jar
 bsf.jar
 buildtools.jar
 fop.jar
 logkit-1.0.jar
 stylebook.jar
 xalan-2.0.0.jar
 xerces-1.2.3.jar
 
 
 I thougt the Transformer class ships with xalan-2.0.0.jar but anyway, I get 
 the exception.
 
 Any help would be great. 
 
 Thanks a lot...
 Georg
 


Cheers,
Jeremias Maerki



problem with embedding fop solved

2002-04-12 Thread Marianne von den Driesch und Viktor Goebel
We used the Oracle JDeveloper to edit the Java application. Some of the 
libraries supplied by FOP are already available in the Oracle Java Packages. 
We had to remove the Oracle Java Packages and to add only the FOP Packages 
and the problems were solved.

The code from Mr.Fischer worked:

import org.apache.log.*;

public class EmbeddingFOP_1
{
  public static void main(String[] args) throws Exception 
  {
try 
{
  javax.xml.transform.stream.StreamSource xmlSource=new 
javax.xml.transform.stream.StreamSource(new java.io.File(D:\\glossary.xml));
  javax.xml.transform.stream.StreamSource xslSource=new 
javax.xml.transform.stream.StreamSource(new java.io.File(D:\\glossary.xsl));
  javax.xml.transform.Transformer 
transformer=javax.xml.transform.TransformerFactory.newInstance().newTransformer(xslSource);

  Logger log;
  Hierarchy hierarchy = Hierarchy.getDefaultHierarchy();
  log = hierarchy.getLoggerFor(fop);
  log.setPriority(Priority.WARN);

  org.apache.fop.apps.Driver driver=new org.apache.fop.apps.Driver();
  driver.setLogger(log);
  driver.setOutputStream(new 
java.io.FileOutputStream(D:\\glossary.pdf));
  driver.setRenderer(org.apache.fop.apps.Driver.RENDER_PDF);
  transformer.transform(xmlSource,new 
javax.xml.transform.sax.SAXResult(driver.getContentHandler()));
}
catch( Exception e ) 
{
  e.printStackTrace(System.out);
}
  }
}

The following code also worked:

import java.io.*;
import org.xml.sax.InputSource;
import org.xml.sax.XMLReader;
import org.apache.fop.apps.Driver;
import org.apache.fop.apps.Version;
import org.apache.fop.apps.*;
import org.apache.log.*;

public class EmbeddingFOP_2 
{
public static void main(String[] args) throws Exception 
{
File fxml=new File(D:\\glossary.xml);
File fxsl=new File(D:\\glossary.xsl);
File fpdf=new File(D:\\glossary.pdf);

Logger log;
Hierarchy hierarchy = Hierarchy.getDefaultHierarchy();
log = hierarchy.getLoggerFor(fop);
log.setPriority(Priority.WARN);

Driver dr=new Driver();
dr.setLogger(log);
dr.setRenderer(Driver.RENDER_PDF);
InputHandler ih=new XSLTInputHandler(fxml,fxsl);
XMLReader p=ih.getParser();
dr.setOutputStream(new FileOutputStream(fpdf));
dr.render(p,ih.getInputSource());
}
}



Thanks to all for the help,
Marianne and Viktor.



Re: embedding fop

2002-04-05 Thread Mihael Knezevic
On 2002.04.04 22:08 J.Pietschmann wrote:
 Mihael Knezevic wrote:
  hi,
  
  has someone been successfull on embedding fop in his/her own
 application.
  i'm trying but it doesn't work. there are some error messages:
  [ERROR]: Logger not set
  [DEBUG]: using SAX parser org.apache.xerces.parsers.SAXParser
  SystemId Unknown; Line 0; Column 0; Couldn't create PDF file.
  File myfile not found.
  but when use fop on the same xml file, it works.
 
 A lot of people have embedded FOP successfully.
 You'll have to supply some more information to get a useful
 answer.
 Your problem has probably something to do with resolving
 relative URIs.

sorry for me being so ignorant. my problem was the relative URI.

  and perhaps someone can enlighten my on what SystemId is?
 If you don't know what your SystemId is, how should I?

that's no answer to my question, but as the error doesn't appear it doesn't
really matter cause i don't have any time for research the beauty and
wealth of xsl-fo and fop. i'm just happy it is working.

thanx for all your help.

mk


embedding fop

2002-04-04 Thread Mihael Knezevic
hi,

has someone been successfull on embedding fop in his/her own application.
i'm trying but it doesn't work. there are some error messages:

[ERROR]: Logger not set
[DEBUG]: using SAX parser org.apache.xerces.parsers.SAXParser
SystemId Unknown; Line 0; Column 0; Couldn't create PDF file.
File myfile not found.

but when use fop on the same xml file, it works.

any idea?

and perhaps someone can enlighten my on what SystemId is?

thanx.

mk


Re: embedding fop

2002-04-04 Thread J.Pietschmann
Mihael Knezevic wrote:
hi,
has someone been successfull on embedding fop in his/her own application.
i'm trying but it doesn't work. there are some error messages:
[ERROR]: Logger not set
[DEBUG]: using SAX parser org.apache.xerces.parsers.SAXParser
SystemId Unknown; Line 0; Column 0; Couldn't create PDF file.
File myfile not found.
but when use fop on the same xml file, it works.
A lot of people have embedded FOP successfully.
You'll have to supply some more information to get a useful
answer.
Your problem has probably something to do with resolving
relative URIs. If you use the command line FOP application,
the current working directory is used for resolving relative
URIs. This means, if you simply give a file name, the file
will be searched in the current directory.
The servlet engine probably has some other CWD, so it won't
find the file.
Try to specify the absolute pathname of the file, like
 /my/dir/myfile or C:\my\dir\myfile
and perhaps someone can enlighten my on what SystemId is?
If you don't know what your SystemId is, how should I?
J.Pietschmann



embedding fop in php

2002-01-17 Thread Sam Prokop
Hi,
i am trying to embed fop in php.

i ´ve got an example:
fo2pdf.php,v 1.2 2001/11/20 17:28:47
by Christian Stocker [EMAIL PROTECTED]

but it is using CommandLine, and i am using fop 0.20.2, and since 0.19
there is no class CommandLine anymore (correct me, if i´m wrong)

  function run($fo, $pdf = , $DelFo = False)
{
if (!$pdf)
$pdf = tempnam($this-tmpdir, $this-tmppdfprefix);

$this-pdf = $pdf;
$this-fo = $fo;
$options = array($this-fo, $this-pdf);
$java = new Java(org.apache.fop.apps.CommandLine, $options);
$java-run();
if ($DelFo) {
$this-deleteFo($fo);
}
}

so what i need, is a how to, for an absolute java-beginner, to embed fop
in php. 
(i heard this should be faster than command line)

thanx in anticipation

Sam