Re: carriage return

2002-02-05 Thread Trevor_Campbell

Normal this should be done as 2 separate fo:blocks.

Hi,
Community

Trev




 
"dav sem"   
 
<[EMAIL PROTECTED]   To: [EMAIL PROTECTED]  
 
tmail.com> cc:  
 
   Subject: carriage return 
 
02/05/02 11:09  
 
PM  
 
Please respond  
 
to fop-user 
 

 

 




Hi community,

If i have to fill text inside 
like (I.E.):

Hi, [carriage return]
Community!

is possible?? which fo command I have
to include to tell FOP Render that my text
have 2 row

DS.


_
Prova MSN Messenger per conversare in linea con i tuoi amici:
http://messenger.msn.it







Re: Lock generated PDF was Re: Security on FOP

2002-02-05 Thread ewitness - Ben Fowler
At 6:08 am -0800 5/2/02, Carlos Araya wrote:
On 02/05/02 3:08, "ewitness - Ben Fowler" <[EMAIL PROTECTED]> wrote:
 > My understanding is that is is possible to both digitally
 sign and encrypt PDF files.
Using Acrobat you can do that and a lot more. However I don't think that's
what Fop was designed for. You can always use Acrobat to polish a document
produced with Fop.
If it is outside the design domain for FOP, then we ought
not to spend too much time on it.
See below. I am actually quite keen to use a fully automated
system, dispensing with the need for Acrobat, and actually locking
the documnent (output from a database) against its author, as in
non-repudiation.
 > This is described in the 'ppk_pdfspec.pdf' downloadable.
The fact that it is on the spec doesn't mean that it has to be implemented
by Fop. Before worrying about encryption and digital signatures, Fop needs
to achieve full conformance to the basic FO specification. Remember, Fop
deals primarily with XSL:Fo and PDF is only one of the output methods.
Fair enough, but if it is in an open spec. It is likely
possible, which is what the OP was asking.
I do of course agree that conformance, possibly full conformance
to FO should be achieved before concentrating on minutiae
such as this, which are probably only of interest to a minority.
Standards conformance is in the interests of all.
I think, though, that it is also true that the majority
of people here have a greater interest in PDF than any other
application of FOP. Furthermore there is already a high
quality FO -> TeX pathway, so I don't think that people
would be inconvienced by an effort to 'polish' the PDF
arm of this project.
 > If so, it should surely be still possible to encrypt/lock
 a document.
Do I hear you volunteering to write the code to do it?
Yes. I am not sure that I will get started full before the end of
February, but I intend to contribute to
1. Java 1.1.8 version
2. keep-with
3. Encryption
All of those are things that I potentially need.
Ben.


Re: Help to get started in a servlet

2002-02-05 Thread Chuck Paussa
Chinn, Gale wrote:
I am new to fop and can get it to run command line, but would like to get it
to run in a servlet.
I have followed the info on fop's embedding page using fop.war file in the
webapps directory of Tomcat on ver 3.2 and 4, but cannot get it to work
using:
http://localhost:8080/fop/fop?fo=... or
http://localhost:8080/fop/servlet/fop?fo=... 

I would just like to get a simple pdf to come back to my browser to prove a
point to my group leader.  Any help would be appreciated
TIA,
Gale Chinn
Programmer/Analyst
Cessna Aircraft Company
Wichita, KS
Gale,
I dropped in the WAR, put my .fo file into /webapps and called the 
servlet with

http://localhost:8080/fop/fop?fo=../webapps/test.fo
or
http://localhost:8080/fop/fop?xml=../webapps/test.xml&xsl=../webapps/test.xsl
notice the ../ at the beginning of the path to the files. That's because 
the default root path for files in tomcat is /bin so you have to start 
the relative path from there.

Chuck



Help to get started in a servlet

2002-02-05 Thread Chinn, Gale

I am new to fop and can get it to run command line, but would like to get it
to run in a servlet.
I have followed the info on fop's embedding page using fop.war file in the
webapps directory of Tomcat on ver 3.2 and 4, but cannot get it to work
using:
http://localhost:8080/fop/fop?fo=... or
http://localhost:8080/fop/servlet/fop?fo=... 

I would just like to get a simple pdf to come back to my browser to prove a
point to my group leader.  Any help would be appreciated

TIA,

Gale Chinn
Programmer/Analyst
Cessna Aircraft Company
Wichita, KS



pcl output & landscape documents

2002-02-05 Thread Andy Heynderickx
Hi,

some time ago I posted a question on how to get fop to generate a landscape
document in pcl correctly. I got no answer so I searched for a work-around.
Here it is for anyone who should run into the same problem:
-generate the pcl file as-is. if you send this to the printer you will get a
clipped portrait-oriented document.
-now write a program/script that searches to pcl-file for '&l0O' (\027
+ & + l + zero + capital O), and substitute all these by '&l1O' (\027 +
& + l + one + capital O).
-send this 'enhanced' pcl-file to the printer, you'll get a nice landscape
doc.

In fact what you've done is replace the pcl-code for 'portrait' by the
'landscape'-code.

Dirty, but it works...

I'm not a java expert myself, but why is it so difficult to build into the
pcl-renderer to check the width of the page against the height of the page
and set the orientation accordingly?

Andy



Reusing Driver object instances

2002-02-05 Thread Teemu . Talja
Hi,

I am trying to make my code more efficient, so I was reading FOP
documentation to 
find out what is said there about optimizing. the following is said about
reusing objects 
in file http://xml.apache.org/fop/embedding.html :

***
> If FOP is going to be used multiple times within your application it may
be useful to reuse certain 
> objects to save time.  The renderers and the driver can both be reused. A
renderer is reusable once 
>the previous render has been completed. The driver is reuseable after the
rendering is complete and 
> the reset method is called. You will need to setup the driver again with a
new OutputStream, 
> InputStream and renderer.
***

How can I know in my Java code that the Driver.render method is done?
When is Driver.reset method called?

I am dynamically generating the XSL-FO document from XML and XSL documents.
I am thinking that 
I could have a single class variable for each of my XSL stylesheets, and
always use the same object 
instance when generating XSL-FO documents. Should I have the code that is
calling method Driver.render 
inside a synchronized block to be thread-safe? I am not actually sure if I
want to always have only one PDF 
document rendered at a time... has anyone found a good solution for this?

( in other words: does someone understand what the text i cited from FOP
documentation means at 
practical (Java) level? :) )

Thanks,
- Teemu


Re: Lock generated PDF was Re: Security on FOP

2002-02-05 Thread Carlos Araya
On 02/05/02 3:08, "ewitness - Ben Fowler" <[EMAIL PROTECTED]> wrote:

>>> I have a question:
>>> with FOP, Is possible to lock with a password
>>> the PDF Document generated???
>> 
>> No.
>> 
>> [ snip ]
>> You will have to do some post-processing with other software.
> 
> Is this something that is not implemented? Or something
> that is thought to be not possible or not desirable?
As far as I know it's something that is beyond the capabilities of FOP and
something that should stay there.
> 
> My understanding is that is is possible to both digitally
> sign and encrypt PDF files.
Using Acrobat you can do that and a lot more. However I don't think that's
what Fop was designed for. You can always use Acrobat to polish a document
produced with Fop. 

> 
> This is described in the 'ppk_pdfspec.pdf' downloadable.
The fact that it is on the spec doesn't mean that it has to be implemented
by Fop. Before worrying about encryption and digital signatures, Fop needs
to achieve full conformance to the basic FO specification. Remember, Fop
deals primarily with XSL:Fo and PDF is only one of the output methods.

> 
> Is it known that digital signing needs some form of authorit
> not available to authors of FOP/Apache?
No. If I understand it correctly you can sign your documents with any
public/private key pair. Any cryptographic code may be subject to export
restrictions from the US and maybe other restrictions from other countries

> 
> If so, it should surely be still possible to encrypt/lock
> a document.
Do I hear you volunteering to write the code to do it?


> 
> Ben.

-- 
Carlos E. Araya
---+ WebCT Administrator/Trainer
 P | California Virtual Campus
 - | C/O De Anza College
 G | 21250 Stevens Creek Blvd
---+ Cupertino, CA 95014

email   [EMAIL PROTECTED]
web http://www.cvc1.org/ (work)
http://www.silverwolf-net.net (personal)
phone   408 257 0420 (work)
PGP Fingerprint:E629 5DFD 7EAE 4995 E9D7  3D2F 5A9F 0CE7 DFE7 1756


"Do not meddle in the affairs of dragonsfor you are crunchy and  taste
good with ketchup and mayonnaise.."





Lock generated PDF was Re: Security on FOP

2002-02-05 Thread ewitness - Ben Fowler
I have a question:
with FOP, Is possible to lock with a password
the PDF Document generated???
No.
[ snip ]
You will have to do some post-processing with other software.
Is this something that is not implemented? Or something
that is thought to be not possible or not desirable?
My understanding is that is is possible to both digitally
sign and encrypt PDF files.
This is described in the 'ppk_pdfspec.pdf' downloadable.
Is it known that digital signing needs some form of authorit
not available to authors of FOP/Apache?
If so, it should surely be still possible to encrypt/lock
a document.
Ben.


SOLVED PROBLEM CARRIAGE RETURN

2002-02-05 Thread dav sem
Hi,
the solution is -> linefeed-treatment
set to preserve to tell FOP to
respect carriage return of text!
DS.
_
MSN Photos è il metodo più semplice per condividere, modificare e stampare 
le tue foto preferite. http://photos.msn.it/Support/WorldWide.aspx



Re: carriage return

2002-02-05 Thread Aleksei Vassiljev
But you may to set space between blocks, so it will be looks like not like a
two paragraphs, but like one paragraph with two lines of text

- Original Message -
From: "dav sem" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, February 05, 2002 15:19
Subject: Re: carriage return


> Tanks,
>
> but my text is dynamic (Load from DB)
> and I have to respect the format!
> I wait a text to fill in 1 block!!!
>
> DS.
>
>
>
>
> >From: "Aleksei Vassiljev" <[EMAIL PROTECTED]>
> >Reply-To: [EMAIL PROTECTED]
> >To: <[EMAIL PROTECTED]>
> >Subject: Re: carriage return
> >Date: Tue, 5 Feb 2002 15:18:51 +0200
> >
> >I am splitting such text in two blocks,
> >like
> >Hi,
> >Community
> >
> >Aleksei Vassiljev
> >
> >- Original Message -
> >From: "dav sem" <[EMAIL PROTECTED]>
> >To: <[EMAIL PROTECTED]>
> >Sent: Tuesday, February 05, 2002 15:09
> >Subject: carriage return
> >
> >
> > > Hi community,
> > >
> > > If i have to fill text inside 
> > > like (I.E.):
> > >
> > > Hi, [carriage return]
> > > Community!
> > >
> > > is possible?? which fo command I have
> > > to include to tell FOP Render that my text
> > > have 2 row
> > >
> > > DS.
> > >
> > >
> > > _
> > > Prova MSN Messenger per conversare in linea con i tuoi amici:
> > > http://messenger.msn.it
> > >
> >
>
>
> _
> Fai parte anche tu del più grande servizio di posta elettronica del mondo
> con MSN Hotmail. http://www.hotmail.com/it
>



Re: carriage return

2002-02-05 Thread dav sem
Tanks,
but my text is dynamic (Load from DB)
and I have to respect the format!
I wait a text to fill in 1 block!!!
DS.


From: "Aleksei Vassiljev" <[EMAIL PROTECTED]>
Reply-To: [EMAIL PROTECTED]
To: <[EMAIL PROTECTED]>
Subject: Re: carriage return
Date: Tue, 5 Feb 2002 15:18:51 +0200
I am splitting such text in two blocks,
like
Hi,
Community
Aleksei Vassiljev
- Original Message -
From: "dav sem" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, February 05, 2002 15:09
Subject: carriage return
> Hi community,
>
> If i have to fill text inside 
> like (I.E.):
>
> Hi, [carriage return]
> Community!
>
> is possible?? which fo command I have
> to include to tell FOP Render that my text
> have 2 row
>
> DS.
>
>
> _
> Prova MSN Messenger per conversare in linea con i tuoi amici:
> http://messenger.msn.it
>

_
Fai parte anche tu del più grande servizio di posta elettronica del mondo 
con MSN Hotmail. http://www.hotmail.com/it



Re: carriage return

2002-02-05 Thread Aleksei Vassiljev
I am splitting such text in two blocks,
like
Hi,
Community

Aleksei Vassiljev

- Original Message - 
From: "dav sem" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, February 05, 2002 15:09 
Subject: carriage return


> Hi community,
> 
> If i have to fill text inside 
> like (I.E.):
> 
> Hi, [carriage return]
> Community!
> 
> is possible?? which fo command I have
> to include to tell FOP Render that my text
> have 2 row
> 
> DS.
> 
> 
> _
> Prova MSN Messenger per conversare in linea con i tuoi amici: 
> http://messenger.msn.it
> 



RE: carriage return

2002-02-05 Thread Andy Heynderickx
you could write 2 blocks
Hi,
Community!

or, but really not so practical: make a table with 2 rows

Andy


-Original Message-
From: dav sem [mailto:[EMAIL PROTECTED]
Sent: dinsdag 5 februari 2002 14:10
To: [EMAIL PROTECTED]
Subject: carriage return


Hi community,

If i have to fill text inside 
like (I.E.):

Hi, [carriage return]
Community!

is possible?? which fo command I have
to include to tell FOP Render that my text
have 2 row

DS.


_
Prova MSN Messenger per conversare in linea con i tuoi amici: 
http://messenger.msn.it


Re: carriage return

2002-02-05 Thread Sebastian Will
Hi Dav, 

why don't you write something like this:


  Hi,
  Community!


AFAIK is each block followed by a break.

Regards, 
Sebastian

- Original Message - 
From: "dav sem" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, February 05, 2002 2:09 PM
Subject: carriage return


> Hi community,
> 
> If i have to fill text inside 
> like (I.E.):
> 
> Hi, [carriage return]
> Community!
> 
> is possible?? which fo command I have
> to include to tell FOP Render that my text
> have 2 row
> 
> DS.
> 
> 
> _
> Prova MSN Messenger per conversare in linea con i tuoi amici: 
> http://messenger.msn.it
> 



carriage return

2002-02-05 Thread dav sem
Hi community,
If i have to fill text inside 
like (I.E.):
Hi, [carriage return]
Community!
is possible?? which fo command I have
to include to tell FOP Render that my text
have 2 row
DS.
_
Prova MSN Messenger per conversare in linea con i tuoi amici: 
http://messenger.msn.it



Re: Security on FOP

2002-02-05 Thread dav sem
Tanks,
which software?
I believe that this is possible using Adobe API!
but this requires adobe acrobat installed
on machine!!
(Acrobat reader don't install the OLE Server object)
Is this true???
DS.

From: Christian Geisert <[EMAIL PROTECTED]>
Reply-To: [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Subject: Re: Security on FOP
Date: Tue, 05 Feb 2002 10:26:51 +0100
dav sem wrote:
Hi Community,
I have a question:
with FOP, Is possible to lock with a password
the PDF Document generated???

No.
Which part of API can permit this? or this
lock have to be performed by XSL:FO meta-language??

?
You will have to do some post-processing with other software.
Tanks
Christian

_
MSN Photos è il metodo più semplice per condividere, modificare e stampare 
le tue foto preferite. http://photos.msn.it/Support/WorldWide.aspx



FOP in server don´t works

2002-02-05 Thread Pedro Barco Bernal



This class works perfectly at local. But when I try 
tu run it at server make a Exception...
 
The Exception is: File out.fo not found 

 
But the same class works perfectly at local 
!!
Can someone tell me why?? The server works 
perfectly with other class...
 

  import 
  javax.xml.transform.TransformerFactory;import 
  javax.xml.transform.Transformer;import 
  javax.xml.transform.stream.StreamSource;import 
  javax.xml.transform.stream.StreamResult;import 
  javax.xml.transform.TransformerException;import 
  javax.xml.transform.TransformerConfigurationException;
   
  import 
  org.apache.fop.apps.Driver;import 
  org.xml.sax.InputSource;
   
  import 
  java.io.FileOutputStream;/** * A Class class. * 
   * @author SADIEL */public class FOP2 extends 
  Object {
   
      
  /** * Render to PDF. OutputStream must be 
  set */    public static final 
  int RENDER_PDF = 1;
   
    /**   * 
  Constructor   */  public FOP2() {  
  try{
   
   TransformerFactory tFactory = 
  TransformerFactory.newInstance(); Transformer transformer = 
  tFactory.newTransformer(new 
  StreamSource("xsl.xsl")); transformer.transform(new 
  StreamSource("xml.xml"), new StreamResult(new 
  FileOutputStream("out.fo")));
   
    InputSource inputsource = new 
  InputSource("out.fo");
   
    FileOutputStream out = new 
  FileOutputStream("out.pdf");  Driver driver = new Driver( 
  inputsource, out);  driver.setRenderer(RENDER_PDF);  
  driver.run();
   
      }catch(Exception 
  e){  System.out.println("Excepcion");  
  System.out.println(e.toString());  }
   
    }
  }


Re: Security on FOP

2002-02-05 Thread Christian Geisert
dav sem wrote:
Hi Community,
I have a question:
with FOP, Is possible to lock with a password
the PDF Document generated???

No.
Which part of API can permit this? or this
lock have to be performed by XSL:FO meta-language??

?
You will have to do some post-processing with other software.
Tanks
Christian


Re: Problems with 0.20.3rc

2002-02-05 Thread Christian Geisert
Carlos wrote:
I'm trying to convert a document to PDF, having successfully done it before
and now get the following error:
[localhost:~/docbook] carlosar% /usr/local/fop/fop.sh  webct-boot-camp.xml
boot.fo

Wrong commandline. You probably want
/usr/local/fop/fop.sh  boot.fo boot.pdf
or
/usr/local/fop/fop.sh -xsl boot.xsl -xml webct-boot-camp.xml -pdf boot.pdf
Christian


Re: Problems with 0.20.3rc

2002-02-05 Thread Magnus Sjöberg
I would say the error is in your stylesheet, not creating a
proper fo-tree with an fo:root element at the top.

///Magnus

Carlos wrote:
> 
> I'm trying to convert a document to PDF, having successfully done it before
> and now get the following error:
> 
> [localhost:~/docbook] carlosar% /usr/local/fop/fop.sh  webct-boot-camp.xml
> boot.fo
> [INFO]: FOP 0.20.3rc
> [INFO]: building formatting object tree
> [ERROR]: Unknown formatting object ^article
> [ERROR]: Root element must be root, not (none):article
> [localhost:~/docbook] carlosar%
> 
> Any help is appreciated
> Carlos
> --
> Carlos E. Araya
> ---+ WebCT Administrator/Trainer
>  P | California Virtual Campus
>  - | C/O De Anza College
>  G | 21250 Stevens Creek Blvd
> ---+ Cupertino, CA 95014
> 
> email   [EMAIL PROTECTED]
> web http://www.cvc1.org/ (work)
> http://www.silverwolf-net.net (personal)
> phone   408 257 0420 (work)
> PGP Fingerprint:E629 5DFD 7EAE 4995 E9D7  3D2F 5A9F 0CE7 DFE7 1756
> 
> We cannot put off living until we are ready. The most salient
> characteristic of life is its  coerciveness: it is always urgent,  'here and
> now' without any possible postponement. Life is  fired at us point blank.
> Jose Ortega Y Gasset

-- 

Secode - Total Internet Security
Magnus Sjöberg
Research And Development

email: [EMAIL PROTECTED]
cell: +46 709 150 710
POTS: +46 8 564 875 05
http://www.secode.com

Internet is to be a safe area for business, transactions and
information exchange


Security on FOP

2002-02-05 Thread dav sem
Hi Community,
I have a question:
with FOP, Is possible to lock with a password
the PDF Document generated???
Which part of API can permit this? or this
lock have to be performed by XSL:FO meta-language??
Tanks
DS.

_
Prova MSN Messenger per conversare in linea con i tuoi amici: 
http://messenger.msn.it/



FOP in server

2002-02-05 Thread Pedro Barco Bernal
¿Someone have used FOP in server?

We are calling FOP from Java Server Pages and the server send a ERROR
message like this:

exception sax : org.xml.sax.SAXParseException: The root element is required
in a well-formed document.
error The root element is required in a well-formed document.
ERROR: The root element is required in a well-formed document.

But when we call FOP from local there aren`t any problem!!! The document is
well-formed sure!!

Please help!!!

- Original Message -
From: "Carlos" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, February 05, 2002 1:20 AM
Subject: Problems with 0.20.3rc


> I'm trying to convert a document to PDF, having successfully done it
before
> and now get the following error:
>
> [localhost:~/docbook] carlosar% /usr/local/fop/fop.sh  webct-boot-camp.xml
> boot.fo
> [INFO]: FOP 0.20.3rc
> [INFO]: building formatting object tree
> [ERROR]: Unknown formatting object ^article
> [ERROR]: Root element must be root, not (none):article
> [localhost:~/docbook] carlosar%
>
> Any help is appreciated
> Carlos
> --
> Carlos E. Araya
> ---+ WebCT Administrator/Trainer
>  P | California Virtual Campus
>  - | C/O De Anza College
>  G | 21250 Stevens Creek Blvd
> ---+ Cupertino, CA 95014
>
> email   [EMAIL PROTECTED]
> web http://www.cvc1.org/ (work)
> http://www.silverwolf-net.net (personal)
> phone   408 257 0420 (work)
> PGP Fingerprint:E629 5DFD 7EAE 4995 E9D7  3D2F 5A9F 0CE7 DFE7 1756
>
> We cannot put off living until we are ready. The most salient
> characteristic of life is its  coerciveness: it is always urgent,  'here
and
> now' without any possible postponement. Life is  fired at us point blank.
> Jose Ortega Y Gasset
>



Problems with 0.20.3rc

2002-02-05 Thread Carlos
I'm trying to convert a document to PDF, having successfully done it before
and now get the following error:

[localhost:~/docbook] carlosar% /usr/local/fop/fop.sh  webct-boot-camp.xml
boot.fo
[INFO]: FOP 0.20.3rc
[INFO]: building formatting object tree
[ERROR]: Unknown formatting object ^article
[ERROR]: Root element must be root, not (none):article
[localhost:~/docbook] carlosar%

Any help is appreciated
Carlos 
-- 
Carlos E. Araya
---+ WebCT Administrator/Trainer
 P | California Virtual Campus
 - | C/O De Anza College
 G | 21250 Stevens Creek Blvd
---+ Cupertino, CA 95014

email   [EMAIL PROTECTED]
web http://www.cvc1.org/ (work)
http://www.silverwolf-net.net (personal)
phone   408 257 0420 (work)
PGP Fingerprint:E629 5DFD 7EAE 4995 E9D7  3D2F 5A9F 0CE7 DFE7 1756

We cannot put off living until we are ready. The most salient
characteristic of life is its  coerciveness: it is always urgent,  'here and
now' without any possible postponement. Life is  fired at us point blank.
Jose Ortega Y Gasset