You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-users@xmlgraphics.apache.org by "Cai, Jenny (US - Dallas)" <jc...@deloitte.com> on 2002/04/05 00:31:59 UTC

Question for FOP

Hi,

I just successfully run the examples (simple.fo) provided in
'fop-0.20.3-bin.tar.gz' file under fop-0.20.3\docs\examples\fo subdirectory
in the command prompt and I got a pdf file successfully . I still have the
following question:

1. How can I view the source code for this example?

2. I also looked over all the rest of the folders included in 'fop-0.20.3'
and there are a lot other folders like design, html-docs(some .html files in
it), xml-docs(some xml files in it), etc.  What are all those files used
for?  

3. Actually what I want to do is:  convert a XML file to PDF file and
display this PDF file on the web page. How to do this?

I am new to this and really like to have your advices and help.  So if you
could provide further information, I would appreciate it very much.

Jenny

This message (including any attachments) contains confidential information
intended for a specific individual and purpose, and is protected by law.  If
you are not the intended recipient, you should delete this message.  Any
disclosure, copying, or distribution of this message, or the taking of any
action based on it, is strictly prohibited.

Re: Question for FOP

Posted by Rick Tessner <ri...@canada.com>.
On Thu, 2002-04-04 at 14:31, Cai, Jenny (US - Dallas) wrote:
> Hi,

Hi Jenny,
 
> I just successfully run the examples (simple.fo) provided in
> 'fop-0.20.3-bin.tar.gz' file under fop-0.20.3\docs\examples\fo subdirectory
> in the command prompt and I got a pdf file successfully . I still have the
> following question:
> 
> 1. How can I view the source code for this example?

I think, based on your third question below, that you're looking for an
XML file that is then converted to PDF.  The "simple.fo" is the source,
written in XSL:FO, which is XML.  But, probably not what you were
expecting.

I personally don't write my documentation directly in XSL:FO but instead
write them in some other XML format (such as DocBook,
http://docbook.org/ ) and then write stylesheets (or using existing
stylesheets) to convert the XML format to XSL:FO.  I then use FOP to
render the XSL:FO as PDF.

I think that's the kind of thing that you would be looking for as well.

> 2. I also looked over all the rest of the folders included in 'fop-0.20.3'
> and there are a lot other folders like design, html-docs(some .html files in
> it), xml-docs(some xml files in it), etc.  What are all those files used
> for?  

These would just be the documentation for  FOP.  The html-docs folder
contains the FOP documentation in HTML format, generated from the
xml-docs/fop folder.  I noticed that under the xml-docs folder, there is
the skins folder which contains stylesheets (used in converting the XML
documents to HTML, PDF, etc).

Think of the xml-docs folder as the source and the the html-docs folder
as the output (programatically speaking).
 
> 3. Actually what I want to do is:  convert a XML file to PDF file and
> display this PDF file on the web page. How to do this?

There would be a couple of ways of doing this.  The first would be to
generate the PDF in a batch mode and create a static web site containing
web pages that reference the static PDF documents.

The second would be to dynamically create the PDF documents.  This would
be done with a servlet using a servlet engine such as Apache Tomcat. 
There is an example of doing this on the Apache FOP website (
http://xml.apache.org/fop/embedding.html ).  Another method would be to
use Apache Cocoon (which can also be found on http://xml.apache.org/ )

> I am new to this and really like to have your advices and help.  So if you
> could provide further information, I would appreciate it very much.

Hope this helps.

-- 
Rick Tessner
ricktessner@canada.com

"There are no bad days.  Only good days and great days."

---------------------------------------------------------------------
To unsubscribe, e-mail: fop-dev-unsubscribe@xml.apache.org
For additional commands, email: fop-dev-help@xml.apache.org


Re: Question for FOP

Posted by "J.Pietschmann" <j3...@yahoo.de>.
Cai, Jenny (US - Dallas) wrote:
> I just successfully run the examples (simple.fo) provided in 
> 'fop-0.20.3-bin.tar.gz' file under fop-0.20.3\docs\examples\fo 
> subdirectory in the command prompt and I got a pdf file successfully . I 
> still have the following question:
> 
> 1. How can I view the source code for this example?
> 
> 2. I also looked over all the rest of the folders included in 
> 'fop-0.20.3' and there are a lot other folders like design, 
> html-docs(some .html files in it), xml-docs(some xml files in it), etc.  
> What are all those files used for? 
> 
> 3. Actually what I want to do is:  convert a XML file to PDF file and 
> display this PDF file on the web page. How to do this?
> 
What you are asking for is somewhat akin to
  "I attended a guided tour at a military airbase. What I
   want to do is: attack some real life hostile jet fighters
   and have them shot down. How to do this?"
Your best bet is probably to hire a professional who does
the job for you.
Of course, you can go all the way yourself. Others did it,
though they didn't start with the questions above.
Good luck.

J.Pietschmann



---------------------------------------------------------------------
To unsubscribe, e-mail: fop-dev-unsubscribe@xml.apache.org
For additional commands, email: fop-dev-help@xml.apache.org


RE: Question for FOP

Posted by Roland Neilands <rn...@pulsemining.com.au>.
Yes, I had fop-0.20.3rc2.
It worked fine with xslfoRef.xml and xml2pdf.xsl btw.

Thanks for the help,
Roland.

-----Original Message-----
From: J.Pietschmann [mailto:j3322ptm@yahoo.de]
Sent: Wednesday, 10 April 2002 6:09 AM
To: fop-user@xml.apache.org
Subject: Re: Question for FOP


J.Pietschmann wrote:
> Roland Neilands wrote:
> 
>> C:\fop\fop-0.20.3\docs\examples\markers>fop -xsl glossary.xsl -xml
>> glossary.xml -pdf glossary.pdf
> This example triggers a bug in FOP 0.20.3 It uses
> fo:marker, which is broken. Don't use it.
> 
Follow-up: It works in the final distribution of
FOP 0.20.3. Download and install the final distribution.
You have probably a fop-0.20.3rc or fop-0.20.3rc2
installed.

J.Pietschmann

Re: Question for FOP

Posted by "J.Pietschmann" <j3...@yahoo.de>.
J.Pietschmann wrote:
> Roland Neilands wrote:
> 
>> C:\fop\fop-0.20.3\docs\examples\markers>fop -xsl glossary.xsl -xml
>> glossary.xml -pdf glossary.pdf
> This example triggers a bug in FOP 0.20.3 It uses
> fo:marker, which is broken. Don't use it.
> 
Follow-up: It works in the final distribution of
FOP 0.20.3. Download and install the final distribution.
You have probably a fop-0.20.3rc or fop-0.20.3rc2
installed.

J.Pietschmann


Re: Question for FOP

Posted by "J.Pietschmann" <j3...@yahoo.de>.
Roland Neilands wrote:
> C:\fop\fop-0.20.3\docs\examples\markers>fop -xsl glossary.xsl -xml
> glossary.xml -pdf glossary.pdf

This example triggers a bug in FOP 0.20.3 It uses
fo:marker, which is broken. Don't use it.

J.Pietschmann




RE: Question for FOP

Posted by Roland Neilands <rn...@pulsemining.com.au>.
I am at a similar stage & followed this thread with interest. When I ran the
command line below it produced :

C:\fop\fop-0.20.3\docs\examples\markers>fop -xsl glossary.xsl -xml
glossary.xml
-pdf glossary.pdf
Running FOP
----------------
[INFO]: FOP 0.20.3
[INFO]: building formatting object tree
[INFO]: [1]
[ERROR]: java.lang.NullPointerException
C:\fop\fop-0.20.3\docs\examples\markers>


or excerpt of debug mode:

java.lang.RuntimeException: java.lang.NullPointerException
        at org.apache.xalan.transformer.TransformerImpl.run(Unknown Source)
        at
org.apache.xalan.transformer.TransformerHandlerImpl.endDocument(Unkno
wn Source)
        at
org.apache.xerces.parsers.SAXParser.endDocument(SAXParser.java:1225)
        at
org.apache.xerces.validators.common.XMLValidator.callEndDocument(XMLV
alidator.java:760)
        at
org.apache.xerces.framework.XMLDocumentScanner$EndOfInputDispatcher.d
ispatch(XMLDocumentScanner.java:1546)
        at
org.apache.xerces.framework.XMLDocumentScanner.parseSome(XMLDocumentS
canner.java:381)
        at org.apache.xerces.framework.XMLParser.parse(XMLParser.java:948)
        at org.apache.xalan.transformer.TrAXFilter.parse(Unknown Source)
        at org.apache.fop.apps.Driver.render(Driver.java:481)
        at
org.apache.fop.apps.CommandLineStarter.run(CommandLineStarter.java:72
)
        at org.apache.fop.apps.Fop.main(Fop.java:19)
C:\fop\fop-0.20.3\docs\examples\markers>

This is a pain as I will need to use XML/XSL input. The runtests.bat &
fop.bat worked fine on .fo but fail on XML/XSL.

I know little about Java/DOS batch files but have tried defining all FOP
.jar files in the CLASSPATH, & also the batch file command line, but all
produced the same message. I also modified the fop.bat to be runnable from
any directory & used absolute pathnames to the .jars, with the same result.
This was using JRE 1.4.0.

The DOS prompt did display more debug info, but it cannot scroll back.
Outputting to a text file using '> output.txt' on the command line instead
doesn't show the exception details.

If anyone can point out the problem or even better the solution here I would
very much appreciate it.

Regards,
Roland Neilands
Analyst/Programmer
Pulse Mining Systems Pty Ltd
(w) +612 4933 3300
(f) +612 4933 6732
(e) rneilands@pulsemining.com.au

This e-mail is solely for the use of the intended recipient and may contain
information which is confidential or privileged. Unauthorised use of its
contents is prohibited. If you have received this e-mail in error, please
notify the sender immediately via return e-mail and then delete the original
e-mail.


-----Original Message-----
From: Chuck Paussa [mailto:Chuck.Paussa@systems.dhl.com]
Sent: Friday, 5 April 2002 9:33 AM
To: fop-user@xml.apache.org
Subject: Re: Question for FOP


Jenny,

1. To convert an XML to PDF, you'll need a properly coded  XSL document.
(For instance, see if you can run the glossary example in
../examples/markers

command line = " fop -xsl glossary.xsl -xml glossary.xml -pdf glossary.pdf "

2. Display the results in a web page. Look at the instructions in
http://xml.apache.org/fop/embedding.html

3. Actually pulling it off. You'll need to study some

XSL tutorials like the one at http://www.arbortext.com/xsl/
FO tutorial like the one at http://www.renderx.com/tutorial.html

Chuck

Cai, Jenny (US - Dallas) wrote:

> Hi,
>
> I just successfully run the examples (simple.fo) provided in
> 'fop-0.20.3-bin.tar.gz' file under fop-0.20.3\docs\examples\fo
> subdirectory in the command prompt and I got a pdf file successfully .
> I still have the following question:
>
> 1. How can I view the source code for this example?
>
> 2. I also looked over all the rest of the folders included in
> 'fop-0.20.3' and there are a lot other folders like design,
> html-docs(some .html files in it), xml-docs(some xml files in it),
> etc.  What are all those files used for?
>
> 3. Actually what I want to do is:  convert a XML file to PDF file and
> display this PDF file on the web page. How to do this?
>
> I am new to this and really like to have your advices and help.  So if
> you could provide further information, I would appreciate it very much.
>
> Jenny
>
> This message (including any attachments) contains confidential
> information intended for a specific individual and purpose, and is
> protected by law.  If you are not the intended recipient, you should
> delete this message.  Any disclosure, copying, or distribution of this
> message, or the taking of any action based on it, is strictly prohibited.
>



Re: Question for FOP

Posted by Chuck Paussa <Ch...@systems.dhl.com>.
Jenny,

1. To convert an XML to PDF, you'll need a properly coded  XSL document. 
(For instance, see if you can run the glossary example in 
../examples/markers

command line = " fop -xsl glossary.xsl -xml glossary.xml -pdf glossary.pdf "

2. Display the results in a web page. Look at the instructions in 
http://xml.apache.org/fop/embedding.html

3. Actually pulling it off. You'll need to study some

XSL tutorials like the one at http://www.arbortext.com/xsl/
FO tutorial like the one at http://www.renderx.com/tutorial.html

Chuck

Cai, Jenny (US - Dallas) wrote:

> Hi,
>
> I just successfully run the examples (simple.fo) provided in 
> 'fop-0.20.3-bin.tar.gz' file under fop-0.20.3\docs\examples\fo 
> subdirectory in the command prompt and I got a pdf file successfully . 
> I still have the following question:
>
> 1. How can I view the source code for this example?
>
> 2. I also looked over all the rest of the folders included in 
> 'fop-0.20.3' and there are a lot other folders like design, 
> html-docs(some .html files in it), xml-docs(some xml files in it), 
> etc.  What are all those files used for? 
>
> 3. Actually what I want to do is:  convert a XML file to PDF file and 
> display this PDF file on the web page. How to do this?
>
> I am new to this and really like to have your advices and help.  So if 
> you could provide further information, I would appreciate it very much.
>
> Jenny
>
> This message (including any attachments) contains confidential 
> information intended for a specific individual and purpose, and is 
> protected by law.  If you are not the intended recipient, you should 
> delete this message.  Any disclosure, copying, or distribution of this 
> message, or the taking of any action based on it, is strictly prohibited.
>