Translets and thier use with FOP

2006-02-17 Thread Ian Chris








I have created some styles sheets, and created some
translets, I was wondering if there is some easy way you associate translets
with the command line interface with FOP



I am currently using 2.0.5 of FOP, but can use 0.9x if this
gives the desired result.



It there any benefit in using translets, one I can see is that
we can easily package the translets into a JAR file, then use that with fop on
the apps server, but from a performance point of view is it beneficial?



Thanks Ian..










RE: [fop-0.91beta] RTF errors

2006-01-25 Thread Ian Chris
Thanks for the info,

I would like to assist you with the development of the RTF component to
address this, but I have no Java skills, how hard would this be to change in
the existing code. I think it would be a good exercise for me to get
involved, but I am not sure if I would be a good candidate.

The style sheet has a percentage value on the proportional-column-width()
function in the column-width attribute of fo:table-column as you thought,
This is done to allow for an automated conversion from existing documents.
Once the style sheets require changing, they are updated (manually), the
general rule is to use absolute widths during this update, but that doesn't
help in the short term. The XSL snippet is as follows:

fo:table xsl:use-attribute-sets=table
fo:table-column
column-width=proportional-column-width(40)/
!-- company --
fo:table-column
column-width=proportional-column-width(60)/
!-- spaces --
fo:table-column
column-width=proportional-column-width(5)/
!-- text --
fo:table-column
column-width=proportional-column-width(1)/
!-- spaces --
fo:table-column
column-width=proportional-column-width(8)/
!-- formattted date --
fo:table-column
column-width=proportional-column-width(1)/
!-- spaces --
fo:table-column
column-width=proportional-column-width(5)/
!-- text --
fo:table-column
column-width=proportional-column-width(1)/
!-- spaces --
fo:table-column
column-width=proportional-column-width(8)/
!-- formatted time --
fo:table-column
column-width=proportional-column-width(3)/
!-- spaces --
fo:table-body
fo:table-row
fo:table-cell
fo:block
xsl:value-of
select=CMPNY_/
/fo:block
/fo:table-cell
Etc..

-Original Message-
From: Jeremias Maerki [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, 25 January 2006 6:50 PM
To: fop-users@xmlgraphics.apache.org
Subject: Re: [fop-0.91beta] RTF errors

Thanks for the feedback. As is hinted at on our website, the RTF support
is not as extensive as for PDF. To a certain degree that is due to the
fact that RTF is in many points not as expressive as XSL-FO. But what
you hit here are restrictions on non-absolute values which are not
properly handled in the current code, yet. You didn't post a sample file
but from the error I guess you've used either a percentage value or the
proportional-column-width() function in the column-width attribute of
fo:table-column. The RTF handler doesn't support that, yet. You will
have to rewrite your stylesheet to use absolute widths everywhere to
make it usable for both PDF and RTF output. The alternative is to help
us improve RTF support. I hope that helps.

On 25.01.2006 04:04:56 bakeric wrote:
 
 I am currently looking at the new version of FOP, in particular the RTF
 component, it would be nice to create RTF document from the same
 process that creates the PDF.
 
 The PDF works well in with the new version (very impressed (not just
 sucking up)), but I am now trying to use the same style sheets to
 create RTF, and it doesn't even get past go.
 
 Is it a bug, or do I need to change the format of my XSL code..

snip/

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: FOP Postscript layout portrait, should be landscape

2006-01-25 Thread Ian Chris
Thanks for the help,

What we have done in this instance is by using some other java code and
another product to read the PDF and make that into a PS stream that is sent
to the printer. The reason for doing this is so we don't have to run the FOP
process twice, i.e. once for the PDF (which the user want to keep) and once
for the PS (that the users want to automatically print), also we need the PS
to be identical to the PDF an I am not sure if in some cases this is so (svg
etc...).

The main problem in doing this natively on the AS400 (where I am trying to
do this) is that the OS/400 OS doesn't support AWT natively, another product
called PASE (free on the AS400) needs to be installed to allow the graphics
to work, then another product called PDFbox to render the document as PS.

I cannot dynamically determine if the document will be portrait or landscape
and set the renderer.setAutoRotateLandscape(true) before the document is
rendered so that option is a bit though, also I don't have much Java
experience (close to none), so I am a bit limited in what I can do with FOP
to change the code.

Thanks for you help on this and the A4 A3 explanation, it is much
appreciated.


-Original Message-
From: Jeremias Maerki [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, 24 January 2006 6:51 PM
To: fop-users@xmlgraphics.apache.org
Subject: Re: FOP Postscript layout portrait, should be landscape

XSL-FO does not provide a means to specify that a page is landscape. It
only allows you to specify the paper size. Please note that there are
two ways to print a landscape A4 page on a printer:
- Print the page in normal orientation on a A3 printer with A4 paper
added in landscape orientation.
- Print the page rotated on a A4 printer.

It appears you want to do the latter. This is possible with both FOP
0.20.5 and 0.91beta. The PostScript renderer can produce code that (like
the PCL Renderer) rotates the page like you want it.

0.20.5: Instantiate the PSRenderer instance yourself and set
PSRenderer.setAutoRotateLandscape(true). Example:

Driver driver = new Driver();
PSRenderer renderer = new PSRenderer();
renderer.setLogger(console);
renderer.setAutoRotateLandscape(true);
driver.setRenderer(renderer);

0.91beta: I see that the setAutoRotateLandscape(boolean) method is
missing there. I'll add it back in. However, you can set the same value
through configuration. You can simply set
auto-rotate-landscapetrue/auto-rotate-landscape
in the renderer configuration for the PostScript renderer. Example:

[..]
renderer mime=application/postscript
  auto-rotate-landscapetrue/auto-rotate-landscape
  fonts
font
  /fonts
/renderer
[..]

I realize this is all poorly documented. I'll see to it that this is
fixed. Help and documentation patches would, of course, also be welcome.

On 24.01.2006 07:52:07 Ian  Chris wrote:
 Hello,
  
 I am currently using FOP on the AS400. It is working very will, and
creates
 PDF documents. 
  
 The problem I am having is that I cannot print PDF documents natively on
the
 AS/400, but I can print PostScript (PS), I have proven this can work, and
it
 works OK, until he document needs to be printed in landscape mode. The PS
 will always print in portrait mode, I have tried many things, in PCL it
 works in landscape, but the PCL margin formatting is not as good as the PS
 and not really functional, so I was hoping to use the PS.
  
 I have tried the same process on windows, and the PDF document prints
 landscape, but the PS document prints as portrait. This proves that the
 problem isn't platform specific.
  
 I also tried to use 0.91beta, and the problem is still there in both
 platforms.
  
 Is this an existing bug?
  
 Is there something in the XSL that I can change to direct it to print
either
 landscape or portrait (besides the height  width settings)?
  
 Is there some other method of allowing the PS to come out in portrait?
  
 The only other method I can in visage is to get the PDF document and
change
 that to PS via some tool that will run on the as400, not really the way I
 was hoping to move forward.
  
 Any suggestions or assistance will be of immense help,
  
 Thank you.



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]



FOP Postscript layout portrait, should be landscape

2006-01-23 Thread Ian Chris








Hello,



I am currently using FOP on the AS400. It is working very
will, and creates PDF documents. 



The problem I am having is that I cannot print PDF documents
natively on the AS/400, but I can print PostScript (PS), I have proven this can
work, and it works OK, until he document needs to be printed in landscape mode.
The PS will always print in portrait mode, I have tried many things, in PCL it
works in landscape, but the PCL margin formatting is not as good as the PS and
not really functional, so I was hoping to use the PS.



I have tried the same process on windows, and the PDF
document prints landscape, but the PS document prints as portrait. This proves
that the problem isnt platform specific.



I also tried to use 0.91beta, and the problem is still there
in both platforms.



Is this an existing bug?



Is there something in the XSL that I can change to direct it
to print either landscape or portrait (besides the height  width settings)?



Is there some other method of allowing the PS to come out in
portrait?



The only other method I can in visage is to get the PDF
document and change that to PS via some tool that will run on the as400, not
really the way I was hoping to move forward.



Any suggestions or assistance will be of immense help,



Thank you.