Re: FOP and AFPDS

2008-12-16 Thread Jeremias Maerki
Hi Davide

On 15.12.2008 15:34:33 Davide Daccico wrote:
 Hi,
  
 I'm new on FOP (but legacy afp expert which could help apache community) and
 would like to know evaluate AFP renderer capabilities.
  
 I really need some info:
 1)  How to setup a simple job to render an AFPDS stream (with embedded
 fonts);

You'll find all AFP-specific information under the following link:
http://xmlgraphics.apache.org/fop/trunk/output.html#afp

It should tell you how to set up the fonts in the configuration file. If
you have trouble setting this up, just come back to this mailing list
and we'll try to help. But frankly, I'm not sure if the AFP renderer
actually supports embedding fonts. I believe they are always referenced
but I could be wrong.

I suggest you start with XSL-FO experiments with PDF output because
that's the most common case.
http://xmlgraphics.apache.org/fop/quickstartguide.html
Once you have that under control, it should be a little step to get AFP
output to work. You can work either off FOP 0.95 but we'd appreciate if
you could run tests with FOP Trunk (containing some new features in the
AFP part). That's a tad more difficult as it involves getting the source
code and building FOP yourself. But that's all explained on the website:
http://xmlgraphics.apache.org/fop/trunk/compiling.html

 2)  Get an AFP roadmap about FOP engine (what/when about improvements);

As Andreas already said, there's not much of a roadmap. We don't have an
abundance of resources in the project which makes giving dates difficult.
Mostly people work on what they need (scratching your own itch). We
have a document on the Wiki that lists things people focus on:
http://wiki.apache.org/xmlgraphics-fop/RoadMap
(but not everyone works with that and many small thing get done
unanounced (like bugfixes))

Anyway, one item that is definitely on the list is the implementation of
the AFP format based on the new intermediate format [1] I'm currently
working on. On the wish list is certainly better color support.

[1] http://wiki.apache.org/xmlgraphics-fop/AreaTreeIntermediateXml/NewDesign

 3)  Get the list of consultant/developers involved on AFP renderer.

Pete Townsend and Joe Schmetzer originally developed an AFP renderer for
FOP (http://afp-renderer.sourceforge.net/). That was donated to FOP and
integrated into FOP by Manuel Mall. After that Adrian Cumiskey took over
(adding GOCA support and improvements on resource groups and image
handling), as Andreas already mentioned. I've just been keeping an eye
on the AFP code but to this day I have no real-life experience with this
format (so I'm probably the opposite of you: I know the code but I'm no
AFP expert). ;-)

 Any help would be very appreciated.

Likewise. We're always glad to have additional people dropping in to
help out in any way possible (documentation, feedback, suggestions, code
etc.).

snip/

Good luck,
Jeremias Maerki


-
To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org



Re: Force page break to skip immediate next page and continue writing on third page

2008-12-16 Thread Jeremias Maerki
Abhishek,

I don't think you're hitting a limitation of FOP. Eric has a point. It
appears that the FO you're generating is not valid and that's why FOP
shows errors. To debug the situation I suggest you take FOP out of the
picture for the moment and just run your XSLT transformation. Then take
a look at the FO file that is generated and fix your stylesheet as
necessary. As a convenience, FOP offers to run just the XSLT
transformation on the command-line:
fop -xml my.xml -xsl my.xml -foout out.fo

It can be difficult to debug problems if you always run both the XSLT
transformation and the FO layout at the same time.

Good luck!

On 15.12.2008 21:10:42 Chakravarty, Abhishek wrote:
 Yes, I am using an xsl and xml to generate my pdf through FOP 0.95
 instead of using only an FO file. 
 
 However I am able to generate an FO from my xsl and xml but unable to
 generate the pdf itself either by a combination of the xsl and xml or
 just through fo alone.
 
 So this may just be a limitation of FOP. If nothing else works, I will
 probably be looking at iText to solve this issue now. 
 
  
 
 
 
 From: Amick, Eric [mailto:eric.am...@mail.house.gov] 
 Sent: Monday, December 15, 2008 3:02 PM
 To: fop-users@xmlgraphics.apache.org
 Subject: RE: Force page break to skip immediate next page and continue
 writing on third page
 
  
 
 It may well be true for FOP. I believe what I have in mind is legal FO;
 maybe someone else knows for certain.
 
  
 
 Eric Amick
 
 Legislative Computer Systems
 
 Office of the Clerk
 
snip/  


Jeremias Maerki


-
To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org



Re: Create a .PCL file instead of a .PDF

2008-12-16 Thread Jeremias Maerki
On 08.12.2008 23:18:08 Roland Neilands wrote:
 Jeff,
 
  From experience:
 Don't use transparency in gif's.

That problem is fixed now. See below.

 Don't use oversized jpeg's  expect scaling down to work in PCL, it doesn't.

Can you give me an example that shows that?

 I convert all images to non-transparent gif  they work in both PCL and 
 PDF. PCL versions of the image are lower quality  slightly shrunken, 
 but workable.

The lower quality is difficult to avoid as we're dealing with a 1-bit
color model in PCL 5. I've made experiments with adding error-diffusion
dithering (using JAI). That improves the quality but has a serious
impact on performance which is why this is disabled in the code. I'm
sure there's room for improvement here. But generally I recommend not to
use PCL output wherever possible since achieving the necessary quality
with reasonable performance proved to be extremely difficult.

The shrinking however should not occur and I've taken great care to test
for that. A short test just now didn't show any anomalies. Again, do you
have an example?

 BMP etc probably work OK, but I use the same images for web stuff too.
 
 Regards,
 *Roland*
 
 
 Steffanina, Jeff wrote:
 
  FOP-0.95
  RedHat Linux
  Java 1.5
  Creating the PDF file is not a problem.  The output is perfect. 
 
  Printing What:   a short doc that includes one logo file (.gif)  and 
  one watermark  (.jpg).
 
  The user has a requirement that the SAME data must also produce a .PCL 
  file.
 
  My Java program (from the Apache web site) has been changed as follows:
  Fop fop = fopFactory.newFop(MimeConstants.MIME*_PCL*, foUserAgent, out);
 
 
  My   fop.xconf has been changed as follows:
  renderer mime=application/vnd.hp-PCL
  renderingquality/rendering
  text-renderingbitmap/text-rendering
  /renderer
 
  The PCL file is produced with two problems:
  1. It chooses Legal Size paper by default

The PCL renderer has to choose a paper size that is closest to the
extents of the page you specify in the page master. If something has
gone wrong here, I'd need an FO to reproduce the problem in your case.

  2. The Logo (a .gif) shows up as a solid black rectangle

I've fixed that in FOP Trunk: http://svn.apache.org/viewvc?rev=726998view=rev

  3. The watermark (a .jpg)  does not print

Can you send me that file so I can try to reproduce? I've got no
problems with JPEG images in my tests.

  Any ideas/suggestions???
 
  Thanks.
 
 
  */Jeff/*
 


Sorry for the late answer.

Jeremias Maerki


-
To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org



Re: FOP and AFPDS

2008-12-16 Thread Adrian Cumiskey
Hi Davide,

2008/12/15 Davide Daccico ddacc...@ebilling.it:
 Hi,



 I'm new on FOP (but legacy afp expert which could help apache community) and
 would like to know evaluate AFP renderer capabilities.



 I really need some info:

 1)  How to setup a simple job to render an AFPDS stream (with embedded
 fonts);

Currently there is no support for embedded fonts, only referenced IBM
raster and outline fonts.  There is no support for embedded true type
fonts which would certainly be a valuable additional feature which I
think many users could benefit from.  This is something I could help
you with.

 2)  Get an AFP roadmap about FOP engine (what/when about improvements);

As far as I am aware I don't believe there is an AFP roadmap as such
and I am unaware of any interested parties at the moment in improving
the AFP support in FOP.

 3)  Get the list of consultant/developers involved on AFP renderer.

I have the most recent knowledge of the AFP renderer code, I know the
code and I know AFP having worked on that area of FOP for a number of
months, rewriting much of it when adding the SVG -- GOCA support,
resource group and image handling.  I would be happy to help you with
any questions that you may have.

Kind regards,

Adrian Cumiskey.

-
To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org



AW: Severe table error

2008-12-16 Thread Georg Datterl
 Says please send fo file to this address so here you go

Thanks a lot, Dan. Can this stuff be used for insider trading? 
 
Regards,
 
Georg Datterl
 
-- Kontakt --
 
Georg Datterl
 
Geneon media solutions gmbh
Gutenstetter Straße 8a
90449 Nürnberg
 
HRB Nürnberg: 17193
Geschäftsführer: Yong-Harry Steiert 

Tel.: 0911/36 78 88 - 26
Fax: 0911/36 78 88 - 20
 
www.geneon.de
 
Weitere Mitglieder der Willmy MediaGroup:
 
IRS Integrated Realization Services GmbH:www.irs-nbg.de 
Willmy PrintMedia GmbH:www.willmy.de
Willmy Consult  Content GmbH: www.willmycc.de 

-
To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org



RE: Force page break to skip immediate next page and continue writing on third page

2008-12-16 Thread Chakravarty, Abhishek
Yes. I had gone through the mailing list as well but was hoping that
this had been fixed since then. Unfortunately that does not seem to be
the case. :-(

 

Thanks Eric, Jeremias and Barry for all those inputs.

 

 



From: Amick, Eric [mailto:eric.am...@mail.house.gov] 
Sent: Tuesday, December 16, 2008 8:37 AM
To: fop-users@xmlgraphics.apache.org
Subject: RE: Force page break to skip immediate next page and continue
writing on third page

 

I found this in the mailing list archives, for what it's worth

 

From: Jeremias Maerki [mailto:d...@jeremias-maerki.ch] 
Sent: Friday, June 15, 2007 1:28 AM
To: fop-users@xmlgraphics.apache.org
Subject: Re: flow does not map to the region-body error
 
Well, as the error message says, FOP doesn't support that, yet. FOP
currently expects that the flow-name of the fo:flow maps to the
region-body in the simple-page-master.
 
If it were:
fo:flow flow-name=xsl-region-body
it would work.
 
I know this is generally possible, but I guess it is too exotic and
nobody cared to implement that possibility, yet.
 
Obviously no one has implemented it since then.

 

Eric Amick

Legislative Computer Systems

Office of the Clerk

 

 



From: Chakravarty, Abhishek [mailto:abhis...@accidentfund.com] 
Sent: Tuesday, December 16, 2008 8:17
To: fop-users@xmlgraphics.apache.org
Subject: RE: Force page break to skip immediate next page and continue
writing on third page

I ran the transform just to generate the FO and subsequently tried to
generate the pdf from that fo and found that as long as the header text
was limited and not overflowing into the next page it was doing
fine(i.e. pdf generated) but as soon as the header overflowed from page
1 ('simple') then I ran into the same error as previous...

 

Error: Flow 'xsl-region-body' does not map to the region-body in
page-master 'blank-page'. FOP presently does not support this.

 

The FO generated from the transform is below. Plz let me know if there
is something that needs to be corrected in this.

 

 

?xml version=1.0 encoding=UTF-8?

fo:root xmlns:fo=http://www.w3.org/1999/XSL/Format;

  fo:layout-master-set

fo:page-sequence-master master-name=document

  fo:single-page-master-reference
master-reference=simple/

  fo:single-page-master-reference
master-reference=blank-page/

  fo:repeatable-page-master-reference
master-reference=simple/

/fo:page-sequence-master

fo:simple-page-master page-width=21.6cm
page-height=18.5cm master-name=simple

  fo:region-body/

  fo:region-after/

/fo:simple-page-master

  

fo:simple-page-master page-width=21.6cm
page-height=18.5cm master-name=blank-page

  fo:region-body region-name=blank/

  fo:region-after/

/fo:simple-page-master

  /fo:layout-master-set

  

  fo:page-sequence master-reference=document

fo:static-content flow-name=blank

  fo:block font-family=Helvetica font-weight=bold
font-size=32pt

FOOTER TEXT

  /fo:block

/fo:static-content



fo:flow flow-name=xsl-region-body

  fo:block font-family=Helvetica font-weight=bold
font-size=32pt

HEADER TEXT..Sample TextSample
TextSample TextSample TextSample TextSample Text

Sample TextSample TextSample
TextSample TextSample TextSample TextSample Text..

..Sample TextSample TextSample
TextSample TextSample TextSample TextSample Text..

..Sample TextSample TextSample
TextSample TextSample TextSample TextSample Text..

..Sample Text

  /fo:block

/fo:flow

  /fo:page-sequence

/fo:root

 

-Original Message-
From: Jeremias Maerki [mailto:d...@jeremias-maerki.ch] 
Sent: Tuesday, December 16, 2008 3:38 AM
To: fop-users@xmlgraphics.apache.org
Subject: Re: Force page break to skip immediate next page and continue
writing on third page

 

Abhishek,

 

I don't think you're hitting a limitation of FOP. Eric has a point. It

appears that the FO you're generating is not valid and that's why FOP

shows errors. To debug the situation I suggest you take FOP out of the

picture for the moment and just run your XSLT transformation. Then take

a look at the FO file that is generated and fix your stylesheet as

necessary. As a convenience, FOP offers to run just the XSLT

transformation on the command-line:

fop -xml my.xml -xsl my.xml -foout out.fo

 

It can be difficult to debug problems if you always run both the XSLT

transformation and the FO layout at the same time.

 

Good luck!

 

On 15.12.2008 

RE: Force page break to skip immediate next page and continue writing on third page

2008-12-16 Thread Chakravarty, Abhishek
I ran the transform just to generate the FO and subsequently tried to
generate the pdf from that fo and found that as long as the header text
was limited and not overflowing into the next page it was doing
fine(i.e. pdf generated) but as soon as the header overflowed from page
1 ('simple') then I ran into the same error as previous...

 

Error: Flow 'xsl-region-body' does not map to the region-body in
page-master 'blank-page'. FOP presently does not support this.

 

The FO generated from the transform is below. Plz let me know if there
is something that needs to be corrected in this.

 

 

?xml version=1.0 encoding=UTF-8?

fo:root xmlns:fo=http://www.w3.org/1999/XSL/Format;

  fo:layout-master-set

fo:page-sequence-master master-name=document

  fo:single-page-master-reference
master-reference=simple/

  fo:single-page-master-reference
master-reference=blank-page/

  fo:repeatable-page-master-reference
master-reference=simple/

/fo:page-sequence-master

fo:simple-page-master page-width=21.6cm
page-height=18.5cm master-name=simple

  fo:region-body/

  fo:region-after/

/fo:simple-page-master

  

fo:simple-page-master page-width=21.6cm
page-height=18.5cm master-name=blank-page

  fo:region-body region-name=blank/

  fo:region-after/

/fo:simple-page-master

  /fo:layout-master-set

  

  fo:page-sequence master-reference=document

fo:static-content flow-name=blank

  fo:block font-family=Helvetica font-weight=bold
font-size=32pt

FOOTER TEXT

  /fo:block

/fo:static-content



fo:flow flow-name=xsl-region-body

  fo:block font-family=Helvetica font-weight=bold
font-size=32pt

HEADER TEXT..Sample TextSample
TextSample TextSample TextSample TextSample Text

Sample TextSample TextSample
TextSample TextSample TextSample TextSample Text..

..Sample TextSample TextSample
TextSample TextSample TextSample TextSample Text..

..Sample TextSample TextSample
TextSample TextSample TextSample TextSample Text..

..Sample Text

  /fo:block

/fo:flow

  /fo:page-sequence

/fo:root

 

-Original Message-
From: Jeremias Maerki [mailto:d...@jeremias-maerki.ch] 
Sent: Tuesday, December 16, 2008 3:38 AM
To: fop-users@xmlgraphics.apache.org
Subject: Re: Force page break to skip immediate next page and continue
writing on third page

 

Abhishek,

 

I don't think you're hitting a limitation of FOP. Eric has a point. It

appears that the FO you're generating is not valid and that's why FOP

shows errors. To debug the situation I suggest you take FOP out of the

picture for the moment and just run your XSLT transformation. Then take

a look at the FO file that is generated and fix your stylesheet as

necessary. As a convenience, FOP offers to run just the XSLT

transformation on the command-line:

fop -xml my.xml -xsl my.xml -foout out.fo

 

It can be difficult to debug problems if you always run both the XSLT

transformation and the FO layout at the same time.

 

Good luck!

 

On 15.12.2008 21:10:42 Chakravarty, Abhishek wrote:

 Yes, I am using an xsl and xml to generate my pdf through FOP 0.95

 instead of using only an FO file. 

 

 However I am able to generate an FO from my xsl and xml but unable to

 generate the pdf itself either by a combination of the xsl and xml or

 just through fo alone.

 

 So this may just be a limitation of FOP. If nothing else works, I will

 probably be looking at iText to solve this issue now. 

 

  

 

 

 

 From: Amick, Eric [mailto:eric.am...@mail.house.gov] 

 Sent: Monday, December 15, 2008 3:02 PM

 To: fop-users@xmlgraphics.apache.org

 Subject: RE: Force page break to skip immediate next page and continue

 writing on third page

 

  

 

 It may well be true for FOP. I believe what I have in mind is legal
FO;

 maybe someone else knows for certain.

 

  

 

 Eric Amick

 

 Legislative Computer Systems

 

 Office of the Clerk

 

snip/  

 

 

Jeremias Maerki

 

 

-

To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org

For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org

 



RE: Force page break to skip immediate next page and continue writing on third page

2008-12-16 Thread Amick, Eric
I found this in the mailing list archives, for what it's worth
 
From: Jeremias Maerki [mailto:d...@jeremias-maerki.ch] 
Sent: Friday, June 15, 2007 1:28 AM
To: fop-users@xmlgraphics.apache.org
Subject: Re: flow does not map to the region-body error

Well, as the error message says, FOP doesn't support that, yet. FOP
currently expects that the flow-name of the fo:flow maps to the
region-body in the simple-page-master.

If it were:
fo:flow flow-name=xsl-region-body
it would work.

I know this is generally possible, but I guess it is too exotic and
nobody cared to implement that possibility, yet.

 
Obviously no one has implemented it since then.
 
Eric Amick
Legislative Computer Systems
Office of the Clerk
 



From: Chakravarty, Abhishek [mailto:abhis...@accidentfund.com] 
Sent: Tuesday, December 16, 2008 8:17
To: fop-users@xmlgraphics.apache.org
Subject: RE: Force page break to skip immediate next page and continue
writing on third page



I ran the transform just to generate the FO and subsequently tried to
generate the pdf from that fo and found that as long as the header text
was limited and not overflowing into the next page it was doing
fine(i.e. pdf generated) but as soon as the header overflowed from page
1 ('simple') then I ran into the same error as previous...

 

Error: Flow 'xsl-region-body' does not map to the region-body in
page-master 'blank-page'. FOP presently does not support this.

 

The FO generated from the transform is below. Plz let me know if there
is something that needs to be corrected in this.

 

 

?xml version=1.0 encoding=UTF-8?

fo:root xmlns:fo=http://www.w3.org/1999/XSL/Format;

  fo:layout-master-set

fo:page-sequence-master master-name=document

  fo:single-page-master-reference
master-reference=simple/

  fo:single-page-master-reference
master-reference=blank-page/

  fo:repeatable-page-master-reference
master-reference=simple/

/fo:page-sequence-master

fo:simple-page-master page-width=21.6cm
page-height=18.5cm master-name=simple

  fo:region-body/

  fo:region-after/

/fo:simple-page-master

  

fo:simple-page-master page-width=21.6cm
page-height=18.5cm master-name=blank-page

  fo:region-body region-name=blank/

  fo:region-after/

/fo:simple-page-master

  /fo:layout-master-set

  

  fo:page-sequence master-reference=document

fo:static-content flow-name=blank

  fo:block font-family=Helvetica font-weight=bold
font-size=32pt

FOOTER TEXT

  /fo:block

/fo:static-content



fo:flow flow-name=xsl-region-body

  fo:block font-family=Helvetica font-weight=bold
font-size=32pt

HEADER TEXT..Sample TextSample
TextSample TextSample TextSample TextSample Text

Sample TextSample TextSample
TextSample TextSample TextSample TextSample Text..

..Sample TextSample TextSample
TextSample TextSample TextSample TextSample Text..

..Sample TextSample TextSample
TextSample TextSample TextSample TextSample Text..

..Sample Text

  /fo:block

/fo:flow

  /fo:page-sequence

/fo:root

 

-Original Message-
From: Jeremias Maerki [mailto:d...@jeremias-maerki.ch] 
Sent: Tuesday, December 16, 2008 3:38 AM
To: fop-users@xmlgraphics.apache.org
Subject: Re: Force page break to skip immediate next page and continue
writing on third page

 

Abhishek,

 

I don't think you're hitting a limitation of FOP. Eric has a point. It

appears that the FO you're generating is not valid and that's why FOP

shows errors. To debug the situation I suggest you take FOP out of the

picture for the moment and just run your XSLT transformation. Then take

a look at the FO file that is generated and fix your stylesheet as

necessary. As a convenience, FOP offers to run just the XSLT

transformation on the command-line:

fop -xml my.xml -xsl my.xml -foout out.fo

 

It can be difficult to debug problems if you always run both the XSLT

transformation and the FO layout at the same time.

 

Good luck!

 

On 15.12.2008 21:10:42 Chakravarty, Abhishek wrote:

 Yes, I am using an xsl and xml to generate my pdf through FOP 0.95

 instead of using only an FO file. 

 

 However I am able to generate an FO from my xsl and xml but unable to

 generate the pdf itself either by a combination of the xsl and xml or

 just through fo alone.

 

 So this may just be a limitation of FOP. If nothing else works, I will

 probably be looking at iText to solve this issue now. 

 

  

 

 

 


AFPDS: the best format

2008-12-16 Thread Davide Daccico
Hi everyone!

I would like to share some info.

I'm working in eBilling company (www.ebilling.it), a service provider who
produce about 230 Million AFP documents (= 230 x 6 Million pages!) per year.

Our spoolfile are ripped/printed by IBM/Ocè/Scitex high-speed laser/inkjet
printers.

The best format for the industry (standard the facto) is AFPDS file (all
resources are embedded: Formdef, pagedef, pagesegment, codepages, fonts,
...), called also MODCA.

Usually is better to use raster (PSEG) instead of complexc vector objects
(e.g. BCOCA) to maximize ripping speed and compatibility.
In the last years major commercial formatters don't create OVERLAY anymore,
but only PSEG again.
The best font format is raster (X0+C0) to maximize ripping speed and
compatibility.

We have all afp low level debugging tools, viewers and printers so I will be
glad to work for the community if you like.

We can plan to build a dedicated AFP team to maximize features for the
industry. Our company is interested to use FOP for the business too.

I will be available to arrange a meeting in our labs here in Modena (ITALY)
;-)

Also I can send you a sample AFP spoolfile which really represents the
state of the art about speed and compatibility. We print it with all
printers in Europe.

Thanks
Davide




-
To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org



Re: collapse whites space fop .20.5

2008-12-16 Thread Philip V

Thanks Andrea.. I'll give it a try

-- 
View this message in context: 
http://www.nabble.com/collapse-whites-space-fop-.20.5-tp21016442p21038612.html
Sent from the FOP - Users mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org



FOP XML-XSLT-FOP PDF Issues

2008-12-16 Thread Patterson, Gregory Michael
Hello,
I'm having some trouble getting the FOP to properly use an xslt stylesheet.
I am getting a ValidationException saying I need to put fo:root at the top.
My first element is an xsl element, but the first fo: element is
fo:root.  This is exactly the same format as the examples in the fop
examples packages.

In my case, I need to pull the appropriate xsl from a database, and
below is what I'm getting back:
?xml version=1.0 encoding=UTF-8?xsl:stylesheet 
xmlns:fo=http://www.w3.org/1999/XSL/Format; 
xmlns:xsl=http://www.w3.org/1999/XSL/Transform; exclude-result-prefixes=fo 
version=1.1
  xsl:output indent=yes method=xml omit-xml-declaration=no 
version=1.0/
  xsl:param name=versionParam select='1.0'/
  !-- = --
  !-- root element: projectteam --
  !-- = --
  xsl:template match=projectteam
fo:root xmlns:fo=http://www.w3.org/1999/XSL/Format;
  fo:layout-master-set
.
.
.



Here is the error:
(Location of error unknown)org.apache.fop.fo.ValidationException: Error: First 
element must be the fo:root formatting object. Found (Namespace URI: , Local 
Name: stylesheet) instead. Please make sure you're producing a valid XSL-FO 
document
Finished.

If you'll notice, the first fo element is fo:root, but I do have other things 
(required afaik) before it.
Thanks in advance for any help.
-Greg


RE: FOP XML-XSLT-FOP PDF Issues

2008-12-16 Thread Griffin,Sean
Greg,

Can you show how you are calling into FOP?  Through the command-line or 
embedded in your Java app?  FOP can take either an XSL-FO document or an 
XML/XSLT document pair that generates the XSL-FO and then turns around and 
processes that FO.  While I'm guessing a bit here, this error seems like 
something that would happen if you were using the XSL-FO input example but 
passing in an XSLT stylesheet instead of an XSL-FO doc.

 

For example, to pass XML/XSLT into FOP do something like this (taken from the 
FOP examples):

 

TransformerFactory factory = TransformerFactory.newInstance();

Transformer transformer = factory.newTransformer(new 
StreamSource(xsltfile));

Source src = new StreamSource(xmlfile);

Result res = new SAXResult(fop.getDefaultHandler());

transformer.transform(src, res);

 

But to just pass in an FO doc:

 

TransformerFactory factory = TransformerFactory.newInstance();

Transformer transformer = factory.newTransformer();

Source src = new StreamSource(fo);

Result res = new SAXResult(fop.getDefaultHandler());

transformer.transform(src, res);

 

Something else to try is to just take FOP out of the equation and do a simple 
XSLT transformation.  You would expect an XSL-FO document as the result of the 
transformation, and if that doesn't happen then that would point you to why FOP 
is choking.

 

Sean

 

From: Patterson, Gregory Michael [mailto:grpat...@indiana.edu] 
Sent: Tuesday, December 16, 2008 3:16 PM
To: fop-users@xmlgraphics.apache.org
Subject: FOP XML-XSLT-FOP PDF Issues

 

Hello,

I'm having some trouble getting the FOP to properly use an xslt stylesheet.

I am getting a ValidationException saying I need to put fo:root at the top.

My first element is an xsl element, but the first fo: element is

fo:root.  This is exactly the same format as the examples in the fop

examples packages.

 

In my case, I need to pull the appropriate xsl from a database, and 

below is what I'm getting back:

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

  xsl:output indent=yes method=xml omit-xml-declaration=no 
version=1.0/

  xsl:param name=versionParam select='1.0'/ 

  !-- = --

  !-- root element: projectteam --

  !-- = --

  xsl:template match=projectteam

fo:root xmlns:fo=http://www.w3.org/1999/XSL/Format;

  fo:layout-master-set

.

.

.

 

 

 

Here is the error: 

(Location of error unknown)org.apache.fop.fo.ValidationException: Error: First 
element must be the fo:root formatting object. Found (Namespace URI: , Local 
Name: stylesheet) instead. Please make sure you're producing a valid XSL-FO 
document

Finished.

 

If you'll notice, the first fo element is fo:root, but I do have other things 
(required afaik) before it.

Thanks in advance for any help.

-Greg

--
CONFIDENTIALITY NOTICE This message and any included attachments are from 
Cerner Corporation and are intended only for the addressee. The information 
contained in this message is confidential and may constitute inside or 
non-public information under international, federal, or state securities laws. 
Unauthorized forwarding, printing, copying, distribution, or use of such 
information is strictly prohibited and may be unlawful. If you are not the 
addressee, please promptly delete this message and notify the sender of the 
delivery error by e-mail or you may call Cerner's corporate offices in Kansas 
City, Missouri, U.S.A at (+1) (816)221-1024.


RE: FOP XML-XSLT-FOP PDF Issues

2008-12-16 Thread Pete Allison
Are you handing this off directly to FOP or running it through another XSL
processor to produce the FO output?
 
I use the same structure in the stylesheet used to generate the FO output.
The XSL processor I have for my database doesn't speak FOP, so I use it to
generate an FO stylesheet that is handed off to FOP. Yes, it is a two-step
process.
 
The first element in my FO stylesheet (after the XML declaration) is
fo:root xmlns:fo=http://www.w3.org/1999/XSL/Format; xmlns:edit=edit.uri

My technique may not be the canonical method, but it works for me.
 
Pete Allison
Marshall Space Flight Center

The universal aptitude for ineptitude makes any human accomplishment an
incredible miracle. - Air Force Col. John P Stapp, first person to sustain
a 40g deceleration.

 
  _  

From: Patterson, Gregory Michael [mailto:grpat...@indiana.edu] 
Sent: Tuesday, December 16, 2008 3:16 PM
To: fop-users@xmlgraphics.apache.org
Subject: FOP XML-XSLT-FOP PDF Issues



Hello,

I'm having some trouble getting the FOP to properly use an xslt stylesheet.

I am getting a ValidationException saying I need to put fo:root at the top.

My first element is an xsl element, but the first fo: element is

fo:root.  This is exactly the same format as the examples in the fop

examples packages.

 

In my case, I need to pull the appropriate xsl from a database, and 

below is what I'm getting back:

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

  xsl:output indent=yes method=xml omit-xml-declaration=no
version=1.0/

  xsl:param name=versionParam select='1.0'/ 

  !-- = --

  !-- root element: projectteam --

  !-- = --

  xsl:template match=projectteam

fo:root xmlns:fo=http://www.w3.org/1999/XSL/Format;

  fo:layout-master-set

.

.

.

 

 

 

Here is the error: 

(Location of error unknown)org.apache.fop.fo.ValidationException: Error:
First element must be the fo:root formatting object. Found (Namespace URI:
, Local Name: stylesheet) instead. Please make sure you're producing a
valid XSL-FO document

Finished.

 

If you'll notice, the first fo element is fo:root, but I do have other
things (required afaik) before it.

Thanks in advance for any help.

-Greg



Re: FOP XML-XSLT-FOP PDF Issues

2008-12-16 Thread Jeremias Maerki
You need to remove exclude-result-prefixes=fo. I believe that causes
the problem.

On 16.12.2008 22:16:18 Patterson, Gregory Michael wrote:
 Hello,
 I'm having some trouble getting the FOP to properly use an xslt stylesheet.
 I am getting a ValidationException saying I need to put fo:root at the top.
 My first element is an xsl element, but the first fo: element is
 fo:root.  This is exactly the same format as the examples in the fop
 examples packages.
 
 In my case, I need to pull the appropriate xsl from a database, and
 below is what I'm getting back:
 ?xml version=1.0 encoding=UTF-8?xsl:stylesheet 
 xmlns:fo=http://www.w3.org/1999/XSL/Format; 
 xmlns:xsl=http://www.w3.org/1999/XSL/Transform; exclude-result-prefixes=fo 
 version=1.1
   xsl:output indent=yes method=xml omit-xml-declaration=no 
 version=1.0/
   xsl:param name=versionParam select='1.0'/
   !-- = --
   !-- root element: projectteam --
   !-- = --
   xsl:template match=projectteam
 fo:root xmlns:fo=http://www.w3.org/1999/XSL/Format;
   fo:layout-master-set
 .
 .
 .
 
 
 
 Here is the error:
 (Location of error unknown)org.apache.fop.fo.ValidationException: Error: 
 First element must be the fo:root formatting object. Found (Namespace URI: 
 , Local Name: stylesheet) instead. Please make sure you're producing a 
 valid XSL-FO document
 Finished.
 
 If you'll notice, the first fo element is fo:root, but I do have other things 
 (required afaik) before it.
 Thanks in advance for any help.
 -Greg




Jeremias Maerki


-
To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org



RE: FOP XML-XSLT-FOP PDF Issues

2008-12-16 Thread Patterson, Gregory Michael
Here's how I'm calling the FOP process. Prior to this, I have a db call to grab 
the stylesheet, and then I pass something like this: 
FOPConverter.createPDF(dom, styles, response) and the code below executes. I'm 
running the stylesheet from a db call right now, but still pulling the actual 
xml file from my local machine (trying to take it 1 step at a time =] ). If you 
need more, let me know.

public static void createPDF(Document dom, String xsltStyle, 
HttpServletResponse response) {
try {
// Setup directories
File baseDir = new 
File(C:/java/projects/rice/kew/src/main/java/edu/iu/uis/eden/edl/);

// Setup input and output files
File xmlfile = new File(baseDir, projectteam.xml);
//File xsltfile = new File(baseDir, projectteam2fo.xsl);

// configure fopFactory as desired
FopFactory fopFactory = FopFactory.newInstance();
FOUserAgent foUserAgent = fopFactory.newFOUserAgent();
// configure foUserAgent as desired

// Setup output
OutputStream out =  response.getOutputStream();
  response.setContentType(application/pdf);

try {
// Construct fop with desired output format
Fop fop = fopFactory.newFop(MimeConstants.MIME_PDF, 
foUserAgent, out);

// Setup XSLT
TransformerFactory factory = 
TransformerFactory.newInstance();
Transformer transformer = factory.newTransformer(new 
DOMSource(getDocumentFromXMLString(xsltStyle)));
//Transformer transformer = factory.newTransformer(new 
StreamSource(xsltStyle));

// Set the value of a param in the stylesheet
transformer.setParameter(versionParam, 0.9.1.3);

// Setup input for XSLT transformation
Source src = new StreamSource(xmlfile);
//Source src = new DOMSource(dom);

// Resulting SAX events (the generated FO) must be piped 
through to FOP
Result res = new SAXResult(fop.getDefaultHandler());

// Start XSLT transformation and FOP processing
transformer.transform(src, res);

where the 'getDocumentFromXMLString' method simply converts a string to a 
document object, if there's a better/easier way let me know.
Heres that method:
public static Document getDocumentFromXMLString(String xmlString) {
   try {
   DocumentBuilderFactory factory = 
DocumentBuilderFactory.newInstance();
   DocumentBuilder builder;
   builder = factory.newDocumentBuilder();
   Document document = builder.parse(new InputSource(new 
StringReader(xmlString)));
   return document;
   } catch (ParserConfigurationException e) {
   e.printStackTrace();
   return null;
   } catch (SAXException e) {
   e.printStackTrace();
   return null;
   } catch (IOException e) {
   e.printStackTrace();
   return null;
   }
}
From: Griffin,Sean [mailto:sgrif...@cerner.com]
Sent: Tuesday, December 16, 2008 4:26 PM
To: fop-users@xmlgraphics.apache.org
Subject: RE: FOP XML-XSLT-FOP PDF Issues

Greg,
Can you show how you are calling into FOP?  Through the command-line or 
embedded in your Java app?  FOP can take either an XSL-FO document or an 
XML/XSLT document pair that generates the XSL-FO and then turns around and 
processes that FO.  While I'm guessing a bit here, this error seems like 
something that would happen if you were using the XSL-FO input example but 
passing in an XSLT stylesheet instead of an XSL-FO doc.

For example, to pass XML/XSLT into FOP do something like this (taken from the 
FOP examples):

TransformerFactory factory = TransformerFactory.newInstance();
Transformer transformer = factory.newTransformer(new 
StreamSource(xsltfile));
Source src = new StreamSource(xmlfile);
Result res = new SAXResult(fop.getDefaultHandler());
transformer.transform(src, res);

But to just pass in an FO doc:

TransformerFactory factory = TransformerFactory.newInstance();
Transformer transformer = factory.newTransformer();
Source src = new StreamSource(fo);
Result res = new SAXResult(fop.getDefaultHandler());
transformer.transform(src, res);

Something else to try is to just take FOP out of the equation and do a simple 
XSLT transformation.  You would expect an XSL-FO document as the result of the 
transformation, and if that doesn't happen then that would point you to why FOP 
is choking.

Sean

From: Patterson, Gregory Michael [mailto:grpat...@indiana.edu]
Sent: Tuesday, December 16, 2008 3:16 PM
To: fop-users@xmlgraphics.apache.org
Subject: FOP XML-XSLT-FOP PDF 

Re: FOP XML-XSLT-FOP PDF Issues

2008-12-16 Thread Andreas Delmelle

On 16 Dec 2008, at 22:35, Patterson, Gregory Michael wrote:

Hi

Here’s how I’m calling the FOP process. Prior to this, I have a db  
call to grab the stylesheet, and then I pass something like this:  
FOPConverter.createPDF(dom, styles, response) and the code below  
executes. I’m running the stylesheet from a db call right now, but  
still pulling the actual xml file from my local machine (trying to  
take it 1 step at a time =] ). If you need more, let me know.


snip /

Judging from the code, I can't see how that could lead to the earlier  
message:



Here is the error:
(Location of error unknown)org.apache.fop.fo.ValidationException:  
Error: First element must be the fo:root formatting object. Found  
(Namespace URI: , Local Name: stylesheet) instead.


This seems indicative of FOP being fed the stylesheet as its input,  
instead of the result of the transformation. Strange thing is that the  
XSLT namespace does not seem to be properly processed, which I'm  
assuming is somehow caused by the fact that you build up the  
stylesheet as a DOM (?)
Can you find out which XML parser and XSLT processor are used at  
runtime?


You could also try eliminating the DOM-approach from the picture. It  
seems slightly redundant, since you can easily set it up like:


transformerFactory.newTransformer(new StreamSource(new  
StringReader(xsltStyle)));


No need to construct a Document, if you don't absolutely need it for  
other purposes.





HTH!

Cheers

Andreas


-
To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org



Re: collapse whites space fop .20.5

2008-12-16 Thread Andreas Delmelle


On 16 Dec 2008, at 19:16, Philip V wrote:



Thanks Andrea.. I'll give it a try


No problem.

Just thought of another possibility, if you still keep getting  
undesired white-space:
Consider also looking at text in the stylesheet. Note that in the  
stylesheet itself, white-space only nodes are stripped by default, but  
the tricky bits are things like:


xsl:template match=...
  fo:inlineSee (
xsl:apply-templates select=... /

The linefeed and the spaces are not stripped, since they belong to the  
same text-node as See (. Using xsl:textSee (/xsl:text could  
solve that one.


Cheers

Andreas

-
To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org



AW: AFPDS: the best format

2008-12-16 Thread Georg Datterl
Hi Davide,

 I will be available to arrange a meeting in our labs here in Modena (ITALY) 

Did you just invite the whole fop-user list to Italy?

Regards,
 
Georg Datterl
 
-- Kontakt --
 
Georg Datterl
 
Geneon media solutions gmbh
Gutenstetter Straße 8a
90449 Nürnberg
 
HRB Nürnberg: 17193
Geschäftsführer: Yong-Harry Steiert 

Tel.: 0911/36 78 88 - 26
Fax: 0911/36 78 88 - 20
 
www.geneon.de
 
Weitere Mitglieder der Willmy MediaGroup:
 
IRS Integrated Realization Services GmbH:www.irs-nbg.de 
Willmy PrintMedia GmbH:www.willmy.de
Willmy Consult  Content GmbH: www.willmycc.de 

-
To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org



RE: AFPDS: the best format

2008-12-16 Thread Martin Edge
Do you mind paying for flights?
 
I'd love a holiday.

 

-Original Message-
From: Georg Datterl [mailto:georg.datt...@geneon.de] 
Sent: Wednesday, December 17, 2008 4:56 PM
To: fop-users@xmlgraphics.apache.org
Subject: AW: AFPDS: the best format

Hi Davide,

 I will be available to arrange a meeting in our labs here in Modena 
 (ITALY)

Did you just invite the whole fop-user list to Italy?

Regards,
 
Georg Datterl
 
-- Kontakt --
 
Georg Datterl
 
Geneon media solutions gmbh
Gutenstetter Straße 8a
90449 Nürnberg
 
HRB Nürnberg: 17193
Geschäftsführer: Yong-Harry Steiert 

Tel.: 0911/36 78 88 - 26
Fax: 0911/36 78 88 - 20
 
www.geneon.de
 
Weitere Mitglieder der Willmy MediaGroup:
 
IRS Integrated Realization Services GmbH:www.irs-nbg.de 
Willmy PrintMedia GmbH:www.willmy.de
Willmy Consult  Content GmbH: www.willmycc.de 

-
To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org



-
To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org