RE: Want to know the normal practice

2005-02-08 Thread Manisha Sathe
1) I am just trying with one sample xml and xls (got from web). 
2) Using FopServlet (came with fop- from servlet example)
3) But continuously getting NullPointer Exception at following 

driver.render(input.getParser(), input.getInputSource());

I am attaching the xml and xsl for the info

XML File - data.xml
-
?xml version="1.0" encoding="UTF-8"?CatalogueBook TitleMastering EJB/Title AuthorEd Roman/Author Price$45.00/Price/BookBook TitleDesign Patterns/Title AuthorErich Gamma/Author Price$50.00/Price/BookBook TitleEffective Java/Title AuthorJosch Bloch/Author Price$30.00/Price/Book/Catalogue--


XSL File - format.xsl
---

?xml version="1.0" encoding="UTF-8"?xsl:stylesheet version="1.1" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:fo="http://www.w3.org/1999/XSL/Format" xmlns:java="java" exclude-result-prefixes="fo"xsl:output method="xml" version="1.0" omit-xml-declaration="no" indent="yes"/!-- = --!-- root element: Catalogue --!-- = --xsl:template match="Catalog"fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format"
fo:layout-master-set!-- (1. Define the page margins) --fo:simple-page-master master-name="simpleA4" page-height="29.7cm" page-width="21cm" margin-top="2cm" margin-bottom="2cm" margin-left="2cm" margin-right="2cm"fo:region-body//fo:simple-page-master/fo:layout-master-set!-- (2. For the page layout refer to the master layout)--fo:page-sequence master-reference="simpleA4"fo:flow flow-name="xsl-region-body"fo:block font-size="16pt" font-weight="bold" space-after="5mm"Catalog Information/fo:block!-- (3. Defining the block with table definition to display data --
fo:block font-size="10pt"fo:table table-layout="fixed"fo:table-column column-width="8cm"/fo:table-column column-width="8cm"/fo:table-column column-width="8cm"/fo:table-bodyxsl:apply-templates//fo:table-body/fo:table/fo:block/fo:flow/fo:page-sequence/fo:root/xsl:template!-- = --!-- Book
 Information --!-- = --xsl:template match="Book" fo:table-rowfo:table-cellfo:block xsl:value-of select="Title"//fo:block/fo:table-cellfo:table-cellfo:block  xsl:value-of select="Author"//fo:block/fo:table-cell fo:table-cellfo:block  xsl:value-of
 select="Price"//fo:block/fo:table-cell/fo:table-row/xsl:template/xsl:stylesheet
-

Pls tell mewhat am i missing now ? If possible whether anybody can provide me the sample xml / xsl files so that i can test it out ?

regards
Manisha

Arun Sinha [EMAIL PROTECTED] wrote:
Hi Manisha,Once you have your XML, you can directly use :-fop -xml myxml.xml -xsl myxsl.xsl -pdf mydoc.pdfHope the above helps.Cheers.ArunFrom: Manisha Sathe <[EMAIL PROTECTED]>Reply-To: [EMAIL PROTECTED]To: [EMAIL PROTECTED]Subject: Want to know the normal practiceDate: Sun, 6 Feb 2005 23:14:52 -0800 (PST)I need to pull some data from database and want to show it inside pdf in a tabular form. What is the best way to do it ?1)First create XML and convert it to FO2)Take FO and convert it into PDFIs there any other direct way ? My environment is java / JSP / Struts framework with MSSQL as backend. Is there any example for FOP with Database ?btw, the examples given seems to be using
 deprecated methods, where can i find latest examples ? (using j2sdk 1.4.2_03)regardsManisha-Do you Yahoo!? Yahoo! Search presents - Jib Jab's 'Second Term'_MSN Spaces! Your space, your time. http://www.msn.co.in/spaces Your personal haven online.-To unsubscribe, e-mail: [EMAIL PROTECTED]For additional commands, e-mail: [EMAIL PROTECTED]
		Do you Yahoo!? 
Yahoo! Search presents - Jib Jab's 'Second Term'

RE: Want to know the normal practice

2005-02-08 Thread Manisha Sathe
btw i also tried from command line

fop -xml data.xml -xsl format.xsl -pdf mydoc.pdf

I am getting following

[INFO] using SAX2 Parser
[INFO]FOP 0.20.5

[INFO] using SAX2 Parser[INFO] building formatting object tree
[INFO] setting up fonts
[ERROR] java.lang.NullPointerException

So same thing for both, pls any body has working xml/xsl sample so that at least i start with that ?

regards
Manisha

Manisha Sathe [EMAIL PROTECTED] wrote:

1) I am just trying with one sample xml and xls (got from web). 
2) Using FopServlet (came with fop- from servlet example)
3) But continuously getting NullPointer Exception at following 

driver.render(input.getParser(), input.getInputSource());

I am attaching the xml and xsl for the info

XML File - data.xml
-
?xml version="1.0" encoding="UTF-8"?CatalogueBook TitleMastering EJB/Title AuthorEd Roman/Author Price$45.00/Price/BookBook TitleDesign Patterns/Title AuthorErich Gamma/Author Price$50.00/Price/BookBook TitleEffective Java/Title AuthorJosch Bloch/Author Price$30.00/Price/Book/Catalogue--


XSL File - format.xsl
---

?xml version="1.0" encoding="UTF-8"?xsl:stylesheet version="1.1" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:fo="http://www.w3.org/1999/XSL/Format" xmlns:java="java" exclude-result-prefixes="fo"xsl:output method="xml" version="1.0" omit-xml-declaration="no" indent="yes"/!-- = --!-- root element: Catalogue --!-- = --xsl:template match="Catalog"fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format"
fo:layout-master-set!-- (1. Define the page margins) --fo:simple-page-master master-name="simpleA4" page-height="29.7cm" page-width="21cm" margin-top="2cm" margin-bottom="2cm" margin-left="2cm" margin-right="2cm"fo:region-body//fo:simple-page-master/fo:layout-master-set!-- (2. For the page layout refer to the master layout)--fo:page-sequence master-reference="simpleA4"fo:flow flow-name="xsl-region-body"fo:block font-size="16pt" font-weight="bold" space-after="5mm"Catalog Information/fo:block!-- (3. Defining the block with table definition to display data --
fo:block font-size="10pt"fo:table table-layout="fixed"fo:table-column column-width="8cm"/fo:table-column column-width="8cm"/fo:table-column column-width="8cm"/fo:table-bodyxsl:apply-templates//fo:table-body/fo:table/fo:block/fo:flow/fo:page-sequence/fo:root/xsl:template!-- = --!-- Book
 Information --!-- = --xsl:template match="Book" fo:table-rowfo:table-cellfo:block xsl:value-of select="Title"//fo:block/fo:table-cellfo:table-cellfo:block  xsl:value-of select="Author"//fo:block/fo:table-cell fo:table-cellfo:block  xsl:value-of
 select="Price"//fo:block/fo:table-cell/fo:table-row/xsl:template/xsl:stylesheet
-

Pls tell mewhat am i missing now ? If possible whether anybody can provide me the sample xml / xsl files so that i can test it out ?

regards
Manisha

Arun Sinha [EMAIL PROTECTED] wrote:
Hi Manisha,Once you have your XML, you can directly use :-fop -xml myxml.xml -xsl myxsl.xsl -pdf mydoc.pdfHope the above helps.Cheers.ArunFrom: Manisha Sathe <[EMAIL PROTECTED]>Reply-To: [EMAIL PROTECTED]To: [EMAIL PROTECTED]Subject: Want to know the normal practiceDate: Sun, 6 Feb 2005 23:14:52 -0800 (PST)I need to pull some data from database and want to show it inside pdf in a tabular form. What is the best way to do it ?1)First create XML and convert it to FO2)Take FO and convert it into PDFIs there any other direct way ? My environment is java / JSP / Struts framework with MSSQL as backend. Is there any example for FOP with Database ?btw, the examples given seems to be using
 deprecated methods, where can i find latest examples ? (using j2sdk 1.4.2_03)regardsManisha-Do you Yahoo!? Yahoo! Search presents - Jib Jab's 'Second Term'_MSN Spaces! Your space, your time. http://www.msn.co.in/spaces Your personal haven online.-To unsubscribe, e-mail: [EMAIL PROTECTED]For additional commands, e-mail: [EMAIL PROTECTED]


Do you Yahoo!?Yahoo! Search presents - Jib Jab's 'Second Term'
		Do you Yahoo!? 
Read only the mail you want - Yahoo! Mail SpamGuard.

Want to see paginated report

2005-02-08 Thread Manisha Sathe
Hi all,

Finally today i could run my first fop program and could create PDF from XML/XSL. 
I want to generate some reports in PDF format. Icanpick up the data from database and generatein XML format. But what i need is 

1)Paginated o/p - let's say after every 10 records new page. 
2)Each page will have some standard headers / footers which contains images
3)I also want to print inside header some values givenfor search criterialikefrom date and to date.

First of all is it possible and if yes any tutorial / sample available ?

regards
Manisha

__Do You Yahoo!?Tired of spam?  Yahoo! Mail has the best spam protection around http://mail.yahoo.com 

RE: Want to see paginated report

2005-02-08 Thread Arun Sinha
Hi,
It is possible. :-)
Go thorugh the following link.
http://xml.apache.org/fop/fo.html
Cheers.
Arun

From: Manisha Sathe [EMAIL PROTECTED]
Reply-To: [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Subject: Want to see paginated report
Date: Mon, 7 Feb 2005 20:15:00 -0800 (PST)
Hi all,
Finally today i could run my first fop program and could create PDF from 
XML/XSL.
I want to generate some reports in PDF format. I can pick up the data from 
database and  generate in XML format. But what i need is

1)Paginated o/p - let's say after every 10 records new page.
2)Each page will have some standard headers / footers which contains images
3)I also want to print inside header some values given for search criteria 
like from date and to date.

First of all is it possible and if yes any tutorial / sample available ?
regards
Manisha

__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
_
The MS Office product suite. Make efficiency a habit. 
http://www.microsoft.com/india/office/experience/  Simplify your life.

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


Re: Userconfig.xml for FOP within an applet.

2005-02-08 Thread Manoj_Nair
JeremiasSorry about the cross posting. I was not aware of it...Will not be repeated.I could get Japanese fonts in PDF within the applet without having to jar up any of the userconfig.xml,msgothic.xml and msgothic.ttf files. I used a URL to the userconfig.xml file on server from the applet ( signed ). This URL fed as inputstream to the FOP config class in applet. The font metrics and the ttf file all resides on the server.ThanksManoj ThanksManojJeremias Maerki [EMAIL PROTECTED]02/07/2005 01:33 AMPlease respond to fop-user	To:	[EMAIL PROTECTED]	cc:		Subject:	Re: Userconfig.xml for FOP within an applet.Please don't cross-post to fop-dev. All FOP developers are supposed tolisten into the fop-user mailing list.Your approach should work because you can initialize the Optionsinstance not only from a java.io.File but also from ajava.io.InputStream. Just try it.On 07.02.2005 02:11:31 Manoj_Nair wrote: As you might know I have successfully got the Japanese fonts to be displayed on PDF by using the userconfig.xml file to load the MSGOTHIC.TTF fonts. In this case I was running a servlet which used FOP to convert the XML file on the webserver ( weblogic) to PDF and then open it using acrobat.  I want to do the same thing within an applet. A few months back I could use FOP within an applet to convert XML residing on the server to PDF and then send the resulting PDF to the printqueue on the clients default printer. This works perfectly.   Now my question is I want FOP within the applet to recognize Japanese character sets. My approach is to have the userconfig.xml, msgothic.ttf and msgothic.xml ( font metrics ) files in the same jar file as the Applet itself. Would this work?  Can I just load the userconfig.xml file from the jar file using the classloader and then call FOP ? I will be trying this next week and just wanted to know your opinion.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 Type 1 Polish font - Bayesian Filter detected spam

2005-02-08 Thread Jesiolowski, Dominik

Hello!
Thanks for your answer.

 -Original Message-
 From: J.Pietschmann [mailto:[EMAIL PROTECTED]
 Sent: Monday, February 07, 2005 11:03 PM
 To: [EMAIL PROTECTED]
 Subject: Re: Embedding Type 1 Polish font - Bayesian
 
 
 [...]
 Are you sure you are using the correct codes?

I think I am. Have a look here:
http://www.eki.ee/letter/chardata.cgi?lang=pl+Polishscript=latin

 Other possible causes of problems should have resulted in error
 messages:
 - If the font file doen't have a unicode table, you should have
   gotten a notification. You have to generate the metrics for such
   fonts with the winansiencoding flag.

I do not get anny errors or warnings while running FOP, but I don't think
the font has a unicode table. The file generated by PFMReader contains:
[...]encodingUnknownEncoding/encoding[...]. I tried to change this to
WinAnsiEncoding but the result is the same :(

If you want you can look at the files I am processing
(.fo, .pfb, .pfm, .pdf) here:
http://cygnus.et.put.poznan.pl/~djes/fop/


Regards
Dominik

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



Re: representative example needed

2005-02-08 Thread JBryant
 Thanks!  Success stories ([1] is my favorite)--as well
 as failures (honesty of its limitations also being
 helpful in increasing confidence in FOP)--are always
 welcome on this list.

Oh, you want success stories. That I can do.

I use FOP to produce all the documentation for a small software firm. I am 
a consulting technical writer (though I have been programming at least 
part time since 1987). I am responsible for creating documents both for 
the company itself and for several customers (each of whom naturally wants 
their own logos, legal wording, and so on). I use two primary stylesheets 
with FOP: One to produce most of my conventional documents (user guides, 
API guides, etc.) and another specifically for data dictionaries. The firm 
specializes in data warehouses for the software industry, so each customer 
needs a customized data dictionary. So far, the largest has been over 1600 
pages in size, and FOP produces it in about 2 minutes.

By the way, I use Saxon to write the FO source, since I use a number of 
XSLT 2 features. I also use Saxon to write the HTML versions of our 
documents.

The only thing I really wish FOP had is better control over page breaks. I 
use small tables to keep headings with their trailing paragraphs and 
images with their captions. Other than that, I use an attribute in my five 
levels of heading elements to force a page break (with break-before), so I 
can make things look OK. Still, I wish it did better with keeps and breaks 
in general. I gather that's the big problem that drove the creation of a 
new branch and the current 1.0 effort. I've had to accept some other 
limitations and fiddle with memory settings, but keeps and breaks have 
been the only real limitation to date.

In sum, thanks for FOP! It makes me look good with my client and my 
client's customers. I very much look forward to seeing future versions.

Jay Bryant
Bryant Communication Services
(presently consulting at Synergistic Solution Technologies)

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



RE: representative example needed

2005-02-08 Thread Lawford, Mark : Enable

I'm a relative newcomer to XSLT and FOP but I immediately saw the value it
could offer.

We have a layer of DB access objects which produce XML for reporting
purposes. Rather than plug in an expensive off the shelf reporting tool I
suggested and prototyped an XSLT/FOP reporting architecture. It works. The
largest report so far has been 3000 pages (why anyone would want a report
3000 pages long is beyond me) and it renders quite quickly for a report of
that scale.

I am also using it online to produce on-demand PDF versions of reports
originating in XML form.

I haven't done anything fancy with FOP yet but so far I haven't had to. I
want it to help me produce well-formatted tabular reports reliably and on
schedule. It works perfectly so I can't ask any more than that.

Okay, that is perhaps not entirely true. I wouldn't mind being able to
specify multiple output files for the larger reports, but that, frankly, can
be dealt with higher up the processing chain.


Mark Lawford
Analyst Programmer

Enable ISS - Hastings
Mid Range Services
Cavendish House,
Castle Street,
Hastings, East Sussex
TN34 3DY

* 01424 4533018/ (7) 4274 3018 
*  07957 280 811
* [EMAIL PROTECTED]
* Mail Van E


-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: 08 February 2005 15:03
To: [EMAIL PROTECTED]
Subject: Re: representative example needed


 Thanks!  Success stories ([1] is my favorite)--as well
 as failures (honesty of its limitations also being
 helpful in increasing confidence in FOP)--are always
 welcome on this list.

Oh, you want success stories. That I can do.

I use FOP to produce all the documentation for a small software firm. I am 
a consulting technical writer (though I have been programming at least 
part time since 1987). I am responsible for creating documents both for 
the company itself and for several customers (each of whom naturally wants 
their own logos, legal wording, and so on). I use two primary stylesheets 
with FOP: One to produce most of my conventional documents (user guides, 
API guides, etc.) and another specifically for data dictionaries. The firm 
specializes in data warehouses for the software industry, so each customer 
needs a customized data dictionary. So far, the largest has been over 1600 
pages in size, and FOP produces it in about 2 minutes.

By the way, I use Saxon to write the FO source, since I use a number of 
XSLT 2 features. I also use Saxon to write the HTML versions of our 
documents.

The only thing I really wish FOP had is better control over page breaks. I 
use small tables to keep headings with their trailing paragraphs and 
images with their captions. Other than that, I use an attribute in my five 
levels of heading elements to force a page break (with break-before), so I 
can make things look OK. Still, I wish it did better with keeps and breaks 
in general. I gather that's the big problem that drove the creation of a 
new branch and the current 1.0 effort. I've had to accept some other 
limitations and fiddle with memory settings, but keeps and breaks have 
been the only real limitation to date.

In sum, thanks for FOP! It makes me look good with my client and my 
client's customers. I very much look forward to seeing future versions.

Jay Bryant
Bryant Communication Services
(presently consulting at Synergistic Solution Technologies)

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

Internet communications are not secure and therefore the Barclays Group
does not accept legal responsibility for the contents of this message.
Although the Barclays Group operates anti-virus programmes, it does not
accept responsibility for any damage whatsoever that is caused by
viruses being passed.  Any views or opinions presented are solely those
of the author and do not necessarily represent those of the Barclays
Group.  Replies to this email may be monitored by the Barclays Group
for operational or business reasons.

Barclays Bank PLC.  Authorised and regulated by the Financial Services
Authority.

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



RE: representative example needed

2005-02-08 Thread Dennis Myrén
I should say a few words as well.

I work as a computer programmer for a small software firm.

We first started looking at FOP late 2001, because we had a potential bank as 
customer who liked to have their public yearly funds development reports
produced by us.

By Norwegian law, the development of a bank's funds must be reported to the 
public 2 times a year.
So there is loads of data that has to be processed and visually presented(both 
print and PDF for web), this would be almost impossible to do by hand.
We have two of Norway's biggest banks in our portfolio by now.
This has been a great success for us.

The only problems we have is, since we use PANTONE/CMYK colors for print 
documents, we need to carry out an automated color replace job since FOP only 
handles RGB.
We have had some minor layout problems due to the lack of support for the
space-before.conditionality/space-after.conditionality attributes(or whatever 
it is called),
that would have made it possible to insert spaces between objects in a flowing 
page only where appropriate.

FOP has really helped us here.

We have thought for a long time that it is time to give something back to FOP,
in form of development contribution.
I have been programming PDF components for a long time and know the PDF file 
format, as well as XSL-FO.
Therefore, i think i might be able to help out.
However, we havent really taken the time for that. Now i think we can do that, 
so i hereby also let you know that i am interested in starting to contribute.


3 examples of documents that we have generated(targeting mass printing for 
broschure production) you can find here:
http://dev.oslokb.no:8080/dennis/Sample1.pdf

http://dev.oslokb.no:8080/dennis/Sample2.pdf

http://dev.oslokb.no:8080/dennis/Sample3.pdf


Regards,
Dennis JD Myrén
Developer
Oslo Kodebureau
Tel:  (+47) 98 00 11 92
Mail:   [EMAIL PROTECTED]
Web:   www.oslokb.no

-Original Message-
From: Lawford, Mark : Enable [mailto:[EMAIL PROTECTED] 
Sent: 8. februar 2005 16:18
To: '[EMAIL PROTECTED]'
Subject: RE: representative example needed


I'm a relative newcomer to XSLT and FOP but I immediately saw the value it
could offer.

We have a layer of DB access objects which produce XML for reporting
purposes. Rather than plug in an expensive off the shelf reporting tool I
suggested and prototyped an XSLT/FOP reporting architecture. It works. The
largest report so far has been 3000 pages (why anyone would want a report
3000 pages long is beyond me) and it renders quite quickly for a report of
that scale.

I am also using it online to produce on-demand PDF versions of reports
originating in XML form.

I haven't done anything fancy with FOP yet but so far I haven't had to. I
want it to help me produce well-formatted tabular reports reliably and on
schedule. It works perfectly so I can't ask any more than that.

Okay, that is perhaps not entirely true. I wouldn't mind being able to
specify multiple output files for the larger reports, but that, frankly, can
be dealt with higher up the processing chain.


Mark Lawford
Analyst Programmer

Enable ISS - Hastings
Mid Range Services
Cavendish House,
Castle Street,
Hastings, East Sussex
TN34 3DY

* 01424 4533018/ (7) 4274 3018 
*  07957 280 811
* [EMAIL PROTECTED]
* Mail Van E


-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: 08 February 2005 15:03
To: [EMAIL PROTECTED]
Subject: Re: representative example needed


 Thanks!  Success stories ([1] is my favorite)--as well
 as failures (honesty of its limitations also being
 helpful in increasing confidence in FOP)--are always
 welcome on this list.

Oh, you want success stories. That I can do.

I use FOP to produce all the documentation for a small software firm. I am 
a consulting technical writer (though I have been programming at least 
part time since 1987). I am responsible for creating documents both for 
the company itself and for several customers (each of whom naturally wants 
their own logos, legal wording, and so on). I use two primary stylesheets 
with FOP: One to produce most of my conventional documents (user guides, 
API guides, etc.) and another specifically for data dictionaries. The firm 
specializes in data warehouses for the software industry, so each customer 
needs a customized data dictionary. So far, the largest has been over 1600 
pages in size, and FOP produces it in about 2 minutes.

By the way, I use Saxon to write the FO source, since I use a number of 
XSLT 2 features. I also use Saxon to write the HTML versions of our 
documents.

The only thing I really wish FOP had is better control over page breaks. I 
use small tables to keep headings with their trailing paragraphs and 
images with their captions. Other than that, I use an attribute in my five 
levels of heading elements to force a page break (with break-before), so I 
can make things look OK. Still, I wish it did better with keeps and breaks 
in general. I gather that's the big problem that 

FOA for FOP

2005-02-08 Thread Subbiah
HI,
I am trying to figure this out for a long time.
Has anyone use FOA successfully.I tried but found it to be cumbersone and it
never worked for me. If someone is using it maybe we can give it another
shot.

regards,
Subbiah
[EMAIL PROTECTED]  

 -Original Message-
 From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
 Sent: Tuesday, February 08, 2005 9:03 AM
 To: [EMAIL PROTECTED]
 Subject: Re: representative example needed
 
  Thanks!  Success stories ([1] is my favorite)--as well as failures 
  (honesty of its limitations also being helpful in increasing 
  confidence in FOP)--are always welcome on this list.
 
 Oh, you want success stories. That I can do.
 
 I use FOP to produce all the documentation for a small 
 software firm. I am a consulting technical writer (though I 
 have been programming at least part time since 1987). I am 
 responsible for creating documents both for the company 
 itself and for several customers (each of whom naturally 
 wants their own logos, legal wording, and so on). I use two 
 primary stylesheets with FOP: One to produce most of my 
 conventional documents (user guides, API guides, etc.) and 
 another specifically for data dictionaries. The firm 
 specializes in data warehouses for the software industry, so 
 each customer needs a customized data dictionary. So far, the 
 largest has been over 1600 pages in size, and FOP produces it 
 in about 2 minutes.
 
 By the way, I use Saxon to write the FO source, since I use a 
 number of XSLT 2 features. I also use Saxon to write the HTML 
 versions of our documents.
 
 The only thing I really wish FOP had is better control over 
 page breaks. I use small tables to keep headings with their 
 trailing paragraphs and images with their captions. Other 
 than that, I use an attribute in my five levels of heading 
 elements to force a page break (with break-before), so I can 
 make things look OK. Still, I wish it did better with keeps 
 and breaks in general. I gather that's the big problem that 
 drove the creation of a new branch and the current 1.0 
 effort. I've had to accept some other limitations and fiddle 
 with memory settings, but keeps and breaks have been the only 
 real limitation to date.
 
 In sum, thanks for FOP! It makes me look good with my client 
 and my client's customers. I very much look forward to seeing 
 future versions.
 
 Jay Bryant
 Bryant Communication Services
 (presently consulting at Synergistic Solution Technologies)
 
 -
 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]



Contributing to FOP (Re: representative example needed)

2005-02-08 Thread The Web Maestro
Dennis,

On Feb 8, 2005, at 7:54 AM, Dennis Myrén wrote:
I should say a few words as well.

I work as a computer programmer for a small software firm.

We have thought for a long time that it is time to give something back to FOP,
in form of development contribution.
I have been programming PDF components for a long time and know the PDF file format, as well as XSL-FO.
Therefore, i think i might be able to help out.
However, we havent really taken the time for that. Now i think we can do that, so i hereby also let you know that i am interested in starting to contribute.

Thanks for the kind words, and we look forward to receiving PATCHes from you. Here's a link to help you get started. 

http://xml.apache.org/fop/dev/#patches

3 examples of documents that we have generated(targeting mass printing for broschure production) you can find here:
http://dev.oslokb.no:8080/dennis/Sample1.pdf

http://dev.oslokb.no:8080/dennis/Sample2.pdf

http://dev.oslokb.no:8080/dennis/Sample3.pdf

BTW I have a couple of questions:
- if we like what we see (I get an error--see below), can we post this example PDF?
- if we like what we see (I get an error--see below), can we post the input files (XSL-FO, XML, XSLT, etc.)?

Unfortunately, I get an error when I try to view those links:

x-tad-smallerHTTP Error 403.6 - Forbidden: IP address of the client has been rejected.
Internet Information Services (IIS)/x-tad-smaller

Perhaps after you've participated in the FOP community for some time, and your name becomes familiar to us (and hopefully made some contributions to the code! :-p) you may be invited to become a committer for Apache FOP!

Cheers!

Web Maestro Clay
-- 
[EMAIL PROTECTED]> - http://homepage.mac.com/webmaestro/>
My religion is simple. My religion is kindness.
- HH The 14th Dalai Lama of Tibet


Re: Embedding Type 1 Polish font - Bayesian Filter detected spam

2005-02-08 Thread J.Pietschmann
Jesiolowski, Dominik wrote:
I do not get anny errors or warnings while running FOP, but I don't think
the font has a unicode table. The file generated by PFMReader contains:
[...]encodingUnknownEncoding/encoding[...]. I tried to change this to
WinAnsiEncoding but the result is the same :(
Dealing with PFM fonts is more tricky than with TTF. I defer to the
experts.
J.Pietschmann
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: Want to know the normal practice

2005-02-08 Thread john farrow



You data has "Catalog", but you stylesheet matches 
on "Catalogue" - the spelling is different.

Regards

John Farrow

Visual 
Programming Ltd mail 
PO Box 22-222, 
Khandallah, Wellington, New Zealand site 
Level 2, 2 Ganges 
Road, Khandallah, Wellington, New Zealand phone 
+64 4 479 1738 
fax 
+64 4 479 1294 
web 
http://www.xmlpdf.com 


  - Original Message - 
  From: 
  Manisha Sathe 
  To: [EMAIL PROTECTED] 
  Sent: Tuesday, February 08, 2005 1:36 
  PM
  Subject: RE: Want to know the normal 
  practice
  
  1) I am just trying with one sample xml and xls (got from web). 
  2) Using FopServlet (came with fop- from servlet example)
  3) But continuously getting NullPointer Exception at following 
  
  driver.render(input.getParser(), input.getInputSource());
  
  I am attaching the xml and xsl for the info
  
  XML File - data.xml
  -
  ?xml version="1.0" 
  encoding="UTF-8"?CatalogueBook 
  TitleMastering EJB/Title AuthorEd 
  Roman/Author 
  Price$45.00/Price/BookBook 
  TitleDesign Patterns/Title AuthorErich 
  Gamma/Author 
  Price$50.00/Price/BookBook 
  TitleEffective Java/Title AuthorJosch 
  Bloch/Author 
  Price$30.00/Price/Book/Catalogue--
  
  
  XSL File - format.xsl
  ---
  
  ?xml version="1.0" encoding="UTF-8"?xsl:stylesheet 
  version="1.1" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" 
  xmlns:fo="http://www.w3.org/1999/XSL/Format" 
  xmlns:java="java" 
  exclude-result-prefixes="fo"xsl:output method="xml" 
  version="1.0" omit-xml-declaration="no" indent="yes"/!-- 
  = --!-- root element: Catalogue 
  --!-- = 
  --xsl:template 
  match="Catalog"fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format"
  fo:layout-master-set!-- (1. Define the 
  page margins) --fo:simple-page-master 
  master-name="simpleA4" page-height="29.7cm" page-width="21cm" 
  margin-top="2cm" margin-bottom="2cm" margin-left="2cm" 
  margin-right="2cm"fo:region-body//fo:simple-page-master/fo:layout-master-set!-- 
  (2. For the page layout refer to the master 
  layout)--fo:page-sequence 
  master-reference="simpleA4"fo:flow 
  flow-name="xsl-region-body"fo:block 
  font-size="16pt" font-weight="bold" space-after="5mm"Catalog 
  Information/fo:block!-- 
  (3. Defining the block with table definition to display data --
  fo:block 
  font-size="10pt"fo:table 
  table-layout="fixed"fo:table-column 
  column-width="8cm"/fo:table-column 
  column-width="8cm"/fo:table-column 
  column-width="8cm"/fo:table-bodyxsl:apply-templates//fo:table-body/fo:table/fo:block/fo:flow/fo:page-sequence/fo:root/xsl:template!-- 
  = --!-- Book 
  Information --!-- 
  = --xsl:template 
  match="Book" 
  fo:table-rowfo:table-cellfo:block 
  xsl:value-of 
  select="Title"//fo:block/fo:table-cellfo:table-cellfo:block 
   xsl:value-of 
  select="Author"//fo:block/fo:table-cell 
  fo:table-cellfo:block 
   xsl:value-of 
  select="Price"//fo:block/fo:table-cell/fo:table-row/xsl:template/xsl:stylesheet
  -
  
  Pls tell mewhat am i missing now ? If possible whether 
  anybody can provide me the sample xml / xsl files so that i can test it out 
  ?
  
  regards
  Manisha
  
  Arun Sinha [EMAIL PROTECTED] 
  wrote:
  Hi 
Manisha,Once you have your XML, you can directly use :-fop 
-xml myxml.xml -xsl myxsl.xsl -pdf mydoc.pdfHope the above 
helps.Cheers.ArunFrom: Manisha Sathe 
<[EMAIL PROTECTED]>Reply-To: 
[EMAIL PROTECTED]To: [EMAIL PROTECTED]Subject: 
Want to know the normal practiceDate: Sun, 6 Feb 2005 23:14:52 -0800 
(PST)I need to pull some data from database and want to show 
it inside pdf in a tabular form. What is the best way to do it 
?1)First create XML and convert it to FO2)Take FO 
and convert it into PDFIs there any other direct way ? My 
environment is java / JSP / Struts framework with MSSQL as backend. 
Is there any example for FOP with Database ?btw, the 
examples given seems to be using deprecated methods, where can i 
find latest examples ? (using j2sdk 
1.4.2_03)regardsManisha-Do 
you Yahoo!? Yahoo! Search presents - Jib Jab's 'Second 
Term'_MSN 
Spaces! Your space, your time. http://www.msn.co.in/spaces Your personal 
haven 
online.-To 
unsubscribe, e-mail: [EMAIL PROTECTED]For additional 
commands, e-mail: [EMAIL PROTECTED]
  
  
  Do you Yahoo!?Yahoo! Search presents - Jib 
  Jab's 'Second Term'


RE: Embedding Type 1 Polish font - Bayesian Filter detected spam

2005-02-08 Thread Victor Mote
J.Pietschmann wrote:

  I do not get anny errors or warnings while running FOP, but I don't 
  think the font has a unicode table. The file generated by 
 PFMReader contains:
  [...]encodingUnknownEncoding/encoding[...]. I tried to 
 change this 
  to WinAnsiEncoding but the result is the same :(
 
 Dealing with PFM fonts is more tricky than with TTF. I defer 
 to the experts.

I also will defer to the experts, but my recollection is that FOP 0.20.5
doesn't support any encodings but Adobe Standard and ISO Latin 1, neither of
which AFAICT handles the required Polish characters mentioned. Best way to
tell for sure is to open the output from PFMReader and see what it was able
to do.

The standard Type 1 files don't have anything resembling the Unicode tables
in TrueType fonts. I haven't delved into the multibyte Type 1 formats enough
to know how they are handled there, but FOP doesn't handle those formats
anyway. Best bet for FOP 0.20.5 is probably to use a TrueType font, but then
you have to live with the encoding limitations there (either WinAnsi or
underlying text is scrambled).

Victor Mote


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



Re: Embedding Type 1 Polish font - Bayesian Filter detected spam

2005-02-08 Thread Jeremias Maerki
The problem is that the PFB file defines an encoding that differs from
WinAnsiEncoding in several characters. FOP only supports Type1 fonts
which have an unchanged WinAnsiEncoding or Symbol encoding (if I
remember correctly).

In your PDF you see the oacute character which is in the
WinAnsiEncoding, but you don't see nacute, for example, which the PFB
file maps to code point 241 which is ntilde in WinAnsiEncoding. The
real problem is that FOP currently doesn't contain a parser for PFB or
PFA files that could parse the character map. I don't know if Victor
Mote could use the font with his PFB parser in FOray.

Anyway, you're out of luck with this font in FOP and you will have to
find a TrueType equivalent of your font so you get proper Unicode
support.

On 08.02.2005 09:06:05 Jesiolowski, Dominik wrote:
 
 Hello!
 Thanks for your answer.
 
  -Original Message-
  From: J.Pietschmann [mailto:[EMAIL PROTECTED]
  Sent: Monday, February 07, 2005 11:03 PM
  To: [EMAIL PROTECTED]
  Subject: Re: Embedding Type 1 Polish font - Bayesian
  
  
  [...]
  Are you sure you are using the correct codes?
 
 I think I am. Have a look here:
 http://www.eki.ee/letter/chardata.cgi?lang=pl+Polishscript=latin
 
  Other possible causes of problems should have resulted in error
  messages:
  - If the font file doen't have a unicode table, you should have
gotten a notification. You have to generate the metrics for such
fonts with the winansiencoding flag.
 
 I do not get anny errors or warnings while running FOP, but I don't think
 the font has a unicode table. The file generated by PFMReader contains:
 [...]encodingUnknownEncoding/encoding[...]. I tried to change this to
 WinAnsiEncoding but the result is the same :(
 
 If you want you can look at the files I am processing
 (.fo, .pfb, .pfm, .pdf) here:
 http://cygnus.et.put.poznan.pl/~djes/fop/


Jeremias Maerki


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



RE: Embedding Type 1 Polish font - Bayesian Filter detected spam

2005-02-08 Thread Victor Mote
Jeremias Maerki wrote:

 in WinAnsiEncoding. The real problem is that FOP currently 
 doesn't contain a parser for PFB or PFA files that could 
 parse the character map. I don't know if Victor Mote could 
 use the font with his PFB parser in FOray.

If it is a standard Type 1 font file, FOray should be able to parse it, but
doesn't yet know how to reencode it for the PDF. If it is a CFF file, FOray
would probably say that it doesn't recognize the format.

Victor Mote


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



Servlet Example with inputStream

2005-02-08 Thread Frank Schaare
Hi,
im looking for an Servlet (or struts action) example, the builds the 
pdf DIRECTLY from the response stream.

I studied the servlet example and googled some time, but all examples 
deal with files as input.

Has anyone ever realised this task or knows such an example ?
thx...
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: Servlet Example with inputStream

2005-02-08 Thread Derrick Shoemake
This isn't really exactly what you're looking for, but it should help, 
the XSL file is a URL, you just pass in the XML Document and it returns 
a PDF.  I create the XML in another method, but this is a start.

public void renderPDF(Document xmlDoc, HttpServletResponse response)
throws ServletException
{
try
{
// Lets get the XSL file in stream form
// First get the Serlet Context so a true url can be
// determined
ServletContext sc = this.getServletContext();
URL xslURL = sc.getResource(xslReportDirectory + 
xslFilename);
Source xslSource = new StreamSource(new 
java.net.URL(xslURL.toString()).openStream());

ByteArrayOutputStream out = new ByteArrayOutputStream();
// We're returning a pdf so set it as the content type
response.setContentType(application/pdf);
//String output = null;
// Create a Document by creating the DocumentBuilderFactory
// and the Document Builder
DocumentBuilderFactory dbf = 
DocumentBuilderFactory.newInstance();
DocumentBuilder db = dbf.newDocumentBuilder();
Document docResult = db.newDocument();

// Create a DOMResult object for the result of the
// transformation, and set its node to be the result 
Document
DOMResult drResult = new DOMResult(docResult);
Document foOutDoc = null;

// Create the Transformer that takes the XML DOM and 
converts it
// into XML in memory
TransformerFactory transfact = 
TransformerFactory.newInstance();
Transformer transformer = 
transfact.newTransformer(xslSource);

// We need a DOMSource to pass into the transformer
DOMSource dsSource = new DOMSource(xmlDoc);
// if the transformer failed in it's creation don't create 
the new
// FO Document
if (transformer != null)
{
transformer.transform(dsSource, drResult);
foOutDoc = (Document) drResult.getNode();
//System.err.println(output:  + output);
} else
{
System.err.println(No Transformer);
}

//Serialize DOM So we can print it out if we need to
OutputFormat format = new OutputFormat(foOutDoc);
// Now convert the Serialized DOM to a XMLSerializer object
// which has a toString() method
StringWriter stringOut = new StringWriter();
XMLSerializer serial = new XMLSerializer(stringOut, format);
serial.serialize(foOutDoc);
// debug statement to print out the FOXSL file
//System.err.println(foOutDoc: );
//System.err.println(stringOut.toString());
// if the transformer didn't create fo Document
// throw and exception
if (foOutDoc == null)
{
throw new ServletException(foOutDoc is null);
}
// Create the FOP Driver and set the Logger(required), then
// set the Renderer to the output we want which is a pdf
// then set the Output stream that is the 
ByteArrayOutputStream
// we setup earlier in this method
Driver driver = new Driver();
driver.setLogger(log);
driver.setRenderer(Driver.RENDER_PDF);
driver.setOutputStream(out);

// This is where the FOP creates the PDF
driver.render(foOutDoc);
// Now convert it to a byte array and
// set it as the output stream to the servlet
byte[] content = out.toByteArray();
response.setContentLength(content.length);
response.getOutputStream().write(content);
response.getOutputStream().flush();
} catch (Exception ex)
{
throw new ServletException(ex);
}
}
On Feb 8, 2005, at 5:19 PM, Frank Schaare wrote:
Hi,
i´m looking for an Servlet (or struts action) example, the builds the 
pdf DIRECTLY from the response stream.

I studied the servlet example and googled some time, but all examples 
deal with files as input.

Has anyone ever realised this task or knows such an example ?
thx...
-
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]