RE: support for PS printer-specific options using PPDs

2002-04-26 Thread Mark Jiang
Jeremias,

This topic is very interesting me. I am also stuck with the tray selection.
Can I have the code for tray selection and OMR marks for patching
PostScript file please?

Thanks
Mark


-Original Message-
From: Jeremias Maerki [mailto:[EMAIL PROTECTED]
Sent: Thursday, 25 April 2002 22:32
To: [EMAIL PROTECTED]
Subject: Re: support for PS printer-specific options using PPDs


Being the one who wrote the PS renderer in the first place, I can
comment on a few things:

- The PS renderer, as it is now, is more of a proof of concept, than
  anything else. Some people are using it productively, though.
- As you gathered, there are a few things that still need to be done.
  Here's the todo list from the PSRenderer's javadocs: Character
  size/spacing, configuration, move to PrintRenderer, maybe improve
  filters (I'm not very proud of them), add a RunLengthEncode filter
  (useful for Level 2 Postscript), Improve DocumentProcessColors stuff
  (probably needs to be configurable, then maybe add a color to
  grayscale conversion for bitmaps to make output smaller (See
  PCLRenderer), font embedding, support different character encodings,
  try to implement image transparency, positioning of images is wrong
  etc. And of course, there's the missing PPD functionality.
- There's also another problem: XSL:FO does not provide any means to
  specify things like tray selection. These will have to be proprietary
  solutions. And that means some work as well. What's important here is
  to have mechanisms that can be reused for PCL later.
- Conclusion: Any help is welcome! (Because I haven't got the time yet,
  to do it. At least, it's on my todo list, because we're currently
  working with the PDF renderer, then using Acrobat Reader to produce
  PostScript, which is finally patched with code for tray selection and
  OMR marks. And this is a suboptimal solution especially since the
  Acrobat Reader takes between 20 to 50 percent of processing time for a
  job.)

On 25.04.2002 09:03:41 Nathan Carter wrote:
 I currently use PJ for PDF output from a homegrown customer/member 
 management system, built on JBoss/Postgresql/etc. There are two basic 
 uses for the PDF output:
 1) letters that use standard fonts to produce a mail merged PDF 
 form letter - starting with a blank PDF document and text grabbed from 
 client database
 2) forms that fill in PDF form template with fields from client 
 database - this was accomplished using jakarta-ORO and string 
 substitution - we use several fonts, including a barcode font, on the 
 writable areas of these forms.
 
 I'm thinking of moving to iText or FOP for #1, but there's one 
 particular problem that I can't seem to solve.  When the client prints 
 letters, they always want the first page to print on letterhead paper 
 and the second and following pages to print on plain paper.  With PS, 
 you have the ability to set printer-specific options like 
 paper-tray/type, but PDF doesn't have this capability as far as I know 
 (I've read both specs pretty carefully).  Unfortunately, it's not a 
 clean switch trays every page situation, because some letters end up 3 
 pages rather than 2 (longer address, extra paragraph, etc.).  So there's 
 no way to render PDF ---ghostscript-PS, adding change trays every 
 page to the PS at the end.  In other words, I have to add the use tray 
 x flag at the time of rendering, which means I must render to PS rather 
 than PDF.
 
 Ideally, I would be able to use FOP and grab the proper use tray x 
 flag from the PPD for the HP printer I'm using - I've even looked at a 
 Canon machine called the imageRunner 5000 that allows you to set flags 
 for switching trays, stapling, and folding (which would be nice for 
 1000+ person mailings).  From checking the main fop page and the fop-dev 
 archive, it seems that PS output in general, and any PPD capability 
 specifically, is pretty far off.
 
  From what I can tell, renderX doesn't have PPD features either.
 
 Does anyone have any other ideas?
 
 Nathan
 


Cheers,
Jeremias Maerki


RE: block question in multi columns area

2002-04-26 Thread Arved Sandstrom
Hi, Xavier

Part of this I can speak about...when I put in an algorithm for column
rebalancing (the equilibration you refer to, on other words) it was very
crude, really nothing more than a placeholder. I meant to go back to it but
never did, and as far as I know no one else has ever put in a better one.

Your blocks have very little content, so it may not look like they break
across columns. But that they already do. It's just that the break is not
quite in the right place.

I'll take a quick look and see if we can't do somewhat better than what we
have at the moment.

Regards,
Arved Sandstrom

 -Original Message-
 From: Xavier DAMAY [mailto:[EMAIL PROTECTED]
 Sent: April 25, 2002 11:05 AM
 To: [EMAIL PROTECTED]
 Subject: block question in multi columns area

 Hello,

 I've got a presentation problem, when i use the block below in a two
 column body region.
 * I would like to equilibrate the two columns : Is it possible to force
 fop to cut a block to do that ?

 * I use blocks to simulate carriage return : Is there another solution ?

 * In the first sub-block (Le temps), I would like to place this piece of
 text lower than it does. It's placed  in the top of the blue box, and I
 would like to place it in the middle.

 *I would like to have an italic and bold piece of text : what's the
 corresponding font-style ?
fo:block font-size=10pt font-family=Times Roman
 line-height=14pt space-after.optimum=3pt text-align=justify
 background-color=white span=none
fo:block background-color=darkblue text-align=center
 color=white font-size=20
LE TEMPS
/fo:block
fo:block font-style=italic text-align=left
   Bla bla bla bla
/fo:block
fo:block
   Bla bla bla bla
/fo:block
fo:block
   Bla bla bla bla
/fo:block
fo:block
   Bla bla bla bla
/fo:block
/fo:block

 I thank you for your help !


 Xavier DAMAY





Possible thread-safe issue with fonts

2002-04-26 Thread Chris Warr

Hi, I'm running cocoon 2.1dev under tomcat 4.04b2 with JDK 1.3 and FOP
0.20.3.  My cocoon app is generating a PDF using FOP.  I use and embed a
font in my generated PDF file with the following in my userconfig file:

font metrics-file=d:/fonts/font_dynamo.xml kerning=yes
embed-file=d:/fonts/dynamo.pfb
font-triplet name=dynamo style=normal
weight=normal/
font-triplet name=dynamo style=normal
weight=bold/
/font

This all works fine and dandy under normal usage, I get the dynamo font
embedded in my PDF and all is well.  However if I run a load test (20
concurrent processes) on the same app. I get the following error appear in
my tomcat log files:

2002-04-26 15:25:20 ERROR   (2002-04-26) 15:25.20:375   [fop ]
(/cocoon/invoice.pdf) HttpProcessor[80][11]/MessageHandler: unknown font
dynamo,normal,normal so defaulted font to any

Not for every hit, but for some.  So I'm guessing that there is some sort of
problem with resource sharing.  That is, could FOP not be thread safe as far
as accessing this file?  Or if the file is loaded into memory once, could
there be multi-threading issues with reading from wherever it is stored in
memory?

Anyone got any ideas?

Chris.


external image scales to large

2002-04-26 Thread Henrik Holle
hi,


i simply embedd larger jpg images using the external-image, but all my
images scale wrong.
It neiter works with the awt-viewer, nor in pdf.


fo:external-graphic src=/






Re: Possible thread-safe issue with fonts

2002-04-26 Thread Keiron Liddle
It sounds like it is a threading problem.
Do you get any messages like:
Failed to read font metrics file ... 
It would appear that two threads could be reading the font metrics file at 
the same time.
Accessing the file is done through the parser so we don't know what it is 
actually doing and it depends on the parser.
I think each time it is a new data set in memory so it probably is not 
that.


On 2002.04.26 08:17 Chris Warr wrote:
Hi, I'm running cocoon 2.1dev under tomcat 4.04b2 with JDK 1.3 and FOP
0.20.3.  My cocoon app is generating a PDF using FOP.  I use and embed a
font in my generated PDF file with the following in my userconfig file:
font metrics-file=d:/fonts/font_dynamo.xml
kerning=yes
embed-file=d:/fonts/dynamo.pfb
font-triplet name=dynamo style=normal
weight=normal/
font-triplet name=dynamo style=normal
weight=bold/
/font
This all works fine and dandy under normal usage, I get the dynamo font
embedded in my PDF and all is well.  However if I run a load test (20
concurrent processes) on the same app. I get the following error appear
in
my tomcat log files:
2002-04-26 15:25:20 ERROR   (2002-04-26) 15:25.20:375   [fop ]
(/cocoon/invoice.pdf) HttpProcessor[80][11]/MessageHandler: unknown font
dynamo,normal,normal so defaulted font to any
Not for every hit, but for some.  So I'm guessing that there is some sort
of
problem with resource sharing.  That is, could FOP not be thread safe as
far
as accessing this file?  Or if the file is loaded into memory once, could
there be multi-threading issues with reading from wherever it is stored
in
memory?
Anyone got any ideas?
Chris.


Re: Re: page count

2002-04-26 Thread Henrik Holle

can you please explain me how to count the page in a fo with an xslt? 






-Ursprungliche Nachricht-
Von: Chuck Paussa [mailto:[EMAIL PROTECTED]
Gesendet: Donnerstag, 25. April 2002 17:03
An: [EMAIL PROTECTED]
Betreff: Re: AW: page count


Henrik,

There is no way to do what you want in FO in one pass. What you'll need 
to do is generate the fo: document with some marked up place holders in 
it. Something like fo:block placeholder=PutTotalPagesHere/. Then run 
that document through an XSLT transformation that adds up the total 
number of pages and replaces those special blocks with the information 
you want. (You'll see this technique referred to in the archives as 
Making a second pass over the document.) You can then use FOP to 
generate the output you want.

Chuck

  Henrik Holle wrote:
 
  I have various page-sequences in my document:
 
  fo:page-sequence master-reference=NameOfMasterReference 
initial-page-number=1
 
  but at the end of the document i need to count the whole pages of all 
page-sequences.
 
  !fo:page-number-citation ref-id = lastBlock/! does not work!
  -Ursprungliche Nachricht-
  Von: Ian Taylor [mailto:[EMAIL PROTECTED]
  Betreff: Re: page count
 
  I put this in my xsl:region-after
 
  fo:block font-size=9pt line-height=11pt text-align=end Page 
no: fo:page-number/ of fo:page-number-citation ref-id = lastBlock/ 
/fo:block where the last block in the document looks like this 
fo:block id = lastBlock/
 
  Ian
  At 12:54 PM 4/24/2002 +0200, you wrote:
 
  Hello,
 
  I want to write something like page x of y where y is the number of 
pages in my document. x is generated by fo:page-number/ but how do 
I get y??
 
  Harald






Re: block question in multi columns area

2002-04-26 Thread Xavier DAMAY
Thank you Arved :)
In the case of arbitrary contents on a cocoon plateform, it would be 
very very interesting to equilibrate the bloks, mine are small because 
of the carriage return : it's not confortable to make blocks just to 
simulate carriage return.

I'm not enough confortable with this project, to help you, but I would 
like to help the french community, by translating a part of the 
documentation.

Sincerly Xavier DAMAY


Arved Sandstrom wrote:
Hi, Xavier
Part of this I can speak about...when I put in an algorithm for column
rebalancing (the equilibration you refer to, on other words) it was very
crude, really nothing more than a placeholder. I meant to go back to it but
never did, and as far as I know no one else has ever put in a better one.
Your blocks have very little content, so it may not look like they break
across columns. But that they already do. It's just that the break is not
quite in the right place.
I'll take a quick look and see if we can't do somewhat better than what we
have at the moment.
Regards,
Arved Sandstrom

-Original Message-
From: Xavier DAMAY [mailto:[EMAIL PROTECTED]
Sent: April 25, 2002 11:05 AM
To: [EMAIL PROTECTED]
Subject: block question in multi columns area
Hello,
I've got a presentation problem, when i use the block below in a two
column body region.
* I would like to equilibrate the two columns : Is it possible to force
fop to cut a block to do that ?
* I use blocks to simulate carriage return : Is there another solution ?
* In the first sub-block (Le temps), I would like to place this piece of
text lower than it does. It's placed  in the top of the blue box, and I
would like to place it in the middle.
*I would like to have an italic and bold piece of text : what's the
corresponding font-style ?
  fo:block font-size=10pt font-family=Times Roman
line-height=14pt space-after.optimum=3pt text-align=justify
background-color=white span=none
  fo:block background-color=darkblue text-align=center
color=white font-size=20
  LE TEMPS
  /fo:block
  fo:block font-style=italic text-align=left
 Bla bla bla bla
  /fo:block
  fo:block
 Bla bla bla bla
  /fo:block
  fo:block
 Bla bla bla bla
  /fo:block
  fo:block
 Bla bla bla bla
  /fo:block
  /fo:block
I thank you for your help !
Xavier DAMAY





Re: Is FOP Actively Being Developed?

2002-04-26 Thread Keiron Liddle
Hi L Rutker,
Of course this is happening. Anyone who has read the XSL-FO specification 
would know about half of the problems we are facing.
I suspect what you are really asking is for noticeable signs of progress 
for the user. All I can say is that this will happen when it is possible.

As a rough guess for the development release I think it will take about 
320 hours of work involving core knowledge plus another roughly 320 hours 
of non-core functionality. How this relates to people and dates is 
unknown. (these estimates could be way off, I would need to break it down 
further and monitor progress to get a better idea)

Regards,
Keiron Liddle.
On 2002.04.25 22:32 L Rutker wrote:
I know there is a supposed refactoring/rewriting going on for FOP.
Is this really happening?
Does anyone know of target dates?
Thanks


Re: Spaces and precedence

2002-04-26 Thread Ralf Steppacher
Hi.
Here is the (pruned) FO I get as an result of my xsl transformation.
What I wanted to do was suppress additional space between two headlines 
that directly follow each other.

fo:flow flow-name=xsl-region-body
!-- preceeding blocks --
!-- block one --
fo:block break-before=page id=h1_6 space-before=50pt
 space-after=20pt space-after.precedence=1
7.Leistungsspektrum
/fo:block
!-- block two --
fo:block space-before.minimum=0pt space-before.precedence=2
 id=h2_1 space-after=20pt space-before=50pt
7.1 Einzelplatzscanner
/fo:block
!-- succeeding blocks --
/fo:flow
Block one := A
Block two := B
My understanding of the spec:
A and B are stackable areas, have no borders or padding and are not 
reference-areas (block-progression-direction inherited from parent, no 
indents specified).

A and B have a block stacking constraint S according to rule 3a. in 
chapter 4.2.5

Space Resolution:
S1 := space-after=20pt precedence=1
S2 := space-before=50pt precedence=2
S'' := S1 and S2
In this case: S' == S'' because S'' does not contain line-area traits.
The resolved space-specifier S would suppress S1 because it has a lower 
precedence than S2 (point 3 in 4.3.1).

Do I get that right? FOP would not suppress anything and just add all 
spaces.

TIA!
Ralf



Fop in UNIX or Linux

2002-04-26 Thread Carlos Daniel Schafer
Hi, all

I have generated a file XML with descritpions by the fonts specials
(barcode, arial, etc.), but I have put into S.O. UNIX or Linux.
In a the file xml, I have declarated into a file  the next sentences.

 font metrics-file=./webapps/site/fop/xml/i2of5NT.xml kerning=yes
embed-file=c:\winnt\fonts\I2OF5NT.ttf
font-triplet name=Interleaved2of5NT style=normal weight=normal /
 /font


But, I have the problem with embed-file=c:\winnt\fonts\I2OF5NT.ttf,  
I don't understand with the sentences embed-file when I used in S.O. Unix. 
Where I put this file (.ttf) into Unix or Linux.




Re: Fop in UNIX or Linux

2002-04-26 Thread Markus Wiese
Hi,
don't know about S.O Unix (are you talking about SCO?), but if you have
problems
with pathnames, try putting your true-type font, your userconfig.xml and
everything,
where your xml/xsl/fo resides and drop the pathnames at all.

markus
-Ursprüngliche Nachricht-
Von: Carlos Daniel Schafer [EMAIL PROTECTED]
An: Fop-Dev (Correo electrónico) fop-dev@xml.apache.org; Fop-User (Correo
electrónico) [EMAIL PROTECTED]
Datum: Freitag, 26. April 2002 14:56
Betreff: Fop in UNIX or Linux


Hi, all

I have generated a file XML with descritpions by the fonts specials
(barcode, arial, etc.), but I have put into S.O. UNIX or Linux.
In a the file xml, I have declarated into a file  the next sentences.

 font metrics-file=./webapps/site/fop/xml/i2of5NT.xml kerning=yes
embed-file=c:\winnt\fonts\I2OF5NT.ttf
font-triplet name=Interleaved2of5NT style=normal weight=normal
/
 /font


But, I have the problem with embed-file=c:\winnt\fonts\I2OF5NT.ttf,
I don't understand with the sentences embed-file when I used in S.O. Unix.
Where I put this file (.ttf) into Unix or Linux.





Re: page count

2002-04-26 Thread Chuck Paussa
Henrik,
Your .fo file is an XML document. So, you need to write an XSL that can 
rewrite the .fo document with some minor changes. Lets say you follow my 
suggestion and your first XSL generates an .fo with fo:inline 
placeholder=PutTotalPagesHere1234/fo:inline in those spots where 
you want the page total. (. . . hm that is a tough problem isn't it?)

OK. You have to then render the document using FOP because FOP is the 
only thing that's going to know how many pages are rendered. You'll have 
to capture the total number of pages from FOP using that Java variable 
which I saw referred to in a post about 3 weeks ago (anyone?) and then 
rewrite the .fo using an XSL like this. Passing in the value for the 
number of pages as a parameter to your stylesheet. I use saxon and the 
command line is something like

saxon -o output.fo input.fo rewrite.xsl TotalPages=24
There's a Java interface on most XSL processors that allow you to do the 
same thing. (Or, you could dynamically generate this XSL with the number 
of pages embedded)

?xml version=1.0?
xsl:stylesheet
   version=1.0
   xmlns:xsl=http://www.w3.org/1999/XSL/Transform;
   xmlns:fo=http://www.w3.org/1999/XSL/Format;
   exclude-result-prefixes=fo
xsl:output method=xml version=4.0 omit-xml-declaration=yes 
indent=yes/

xsl:param name=TotalPages/
xsl:template match=/
   xsl:apply-templates mode=output/
/xsl:template
xsl:template match=* mode=output
   !-- This template outputs the XML document as text --
   xsl:element name={name()}
   xsl:for-each select=@*
   xsl:attribute name={name(.)}
   xsl:value-of select=./
   /xsl:attribute
   /xsl:for-each
   xsl:if test=count(./*) gt; 0
   xsl:for-each select=.
   xsl:apply-templates mode=output/
   /xsl:for-each
   /xsl:if
   xsl:if test=string-length(.) gt; 0
   xsl:if test=count(./*) = 0
   xsl:value-of select=./
   /xsl:if
   /xsl:if
   /xsl:element
/xsl:template
xsl:template match=fo:[EMAIL PROTECTED] mode=output
   xsl:value-of select=$TotalPages/
/xsl:template
/xsl:stylesheet
Chuck Paussa
Henrik Holle wrote:
can you please explain me how to count the page in a fo with an xslt?
-Ursprungliche Nachricht-
Von: Chuck Paussa [mailto:[EMAIL PROTECTED]
Henrik,

There is no way to do what you want in FO in one pass. What you'll 
need to do is generate the fo: document with some marked up place 
holders in  it. Something like fo:inline 
placeholder=PutTotalPagesHere/. Then run  that document through an 
XSLT transformation that adds up the total  number of pages and replaces 
those special blocks with the information  you want. (You'll see this 
technique referred to in the archives as  Making a second pass over 
the document.) You can then use FOP to  generate the output you want.

Chuck

  Henrik Holle wrote:
 
  I have various page-sequences in my document:
 
  fo:page-sequence master-reference=NameOfMasterReference 
initial-page-number=1
 
  but at the end of the document i need to count the whole pages of 
all page-sequences.
 
  !fo:page-number-citation ref-id = lastBlock/! does not work!
  -Ursprungliche Nachricht-
  Von: Ian Taylor [mailto:[EMAIL PROTECTED]
 
  I put this in my xsl:region-after
 
  fo:block font-size=9pt line-height=11pt text-align=end Page 
no: fo:page-number/ of fo:page-number-citation ref-id = 
lastBlock/  /fo:block where the last block in the document looks 
like this  fo:block id = lastBlock/
 
  Ian
  At 12:54 PM 4/24/2002 +0200, you wrote:
 
  Hello,
 
  I want to write something like page x of y where y is the number 
of pages in my document. x is generated by fo:page-number/ but how 
do  I get y??
 
  Harald




What is log-1.0b4.jar

2002-04-26 Thread Shaikh, Mehmood
Hi,
Where can i download source and documentation for whats in log-1.0b4.jar? Is
it same as log4j??

Thanks

Mehmood


What happened to ZapfDingbats?

2002-04-26 Thread Scott Moore
I've been using the following construct to create a bullet in PDF:

fo:block font-family=ZapfDingbats font-size=7ptl/fo:block

It's worked in 0.20.1, 0.20.2, 0.20.3rc but it doesn't work in FOP 0.20.3.
Instead I get a pair of scissors.  As a matter of fact, it looks like the
whole font (or at least every character I tested) is a pair of scissors.

What's the fix for this?

Thanks,
Scott


RE: What is log-1.0b4.jar

2002-04-26 Thread Shaikh, Mehmood
Thats ok, i found it.
Thanks

-Original Message-
From: Shaikh, Mehmood [mailto:[EMAIL PROTECTED]
Sent: April 26, 2002 1:07 PM
To: '[EMAIL PROTECTED]'
Subject: What is log-1.0b4.jar


Hi,
Where can i download source and documentation for whats in log-1.0b4.jar? Is
it same as log4j??

Thanks

Mehmood