RE: Postscript Error when RIPing document created with FOP

2003-02-11 Thread Victor Mote
Patrick Branley wrote:

 The RIP can accept a PDF file, which then im assuming converts it to
 postscript before output.

 If you open a PDF in Acrobat with distiller set up as a printer device you
 can print a PDF to another PDF file. Using this process the new PDF file
 will pass through the RIP with no problems.

OK, that helps a bit. Here is how I would like to proceed:

1. Upgrade to 0.20.5rc (you said you were on 0.20.4rc in a previous posting)
 see whether you get the same results. Even if so, at least we can compare
results with current code. This is generally a good rule to follow, as I
doubt that any of the developers want to take the time to debug  fix
something that has already been debugged  fixed. If this does not solve the
problem, continue to step 2.

2. Open the original PDF file in Acrobat, and Save As PostScript. Send
this PostScript file to your printer, and see whether they can handle it
properly. If so, then there is probably a problem on their end, with
whatever process their machine uses to convert PDF to PostScript. Otherwise,
continue to step 3.

3. Distill the PostScript created in step 2 using Acrobat Distiller. Between
steps 2  3, we have done (I think) the same thing that the PDF to PDF
conversion does, but have broken it down. I therefore expect the Distill to
finish successfully (please let me know if not)  to create a new PDF. Send
this PDF to the printer. Again, I would expect this to succeed (again, let
me know if not). The question now becomes why their PostScript interpreter
chokes on code that Distiller successfully distills. I would pose that
question to your printer for them to take up with the device manufacturer.
There are a bunch of interesting things we could do to troubleshoot the
whole thing, which you can try (diffing the two PDF files, diffing the two
PostScript files), but the likely result (absent other information or
similar stories with other devices  interpreters) is that their PostScript
interpreter has a bug in it (or uses an incompatible version of PostScript)
 it would be difficult to justify the expense of proving this.

In your previous posting you said:
--- Start ---
The printer has a workaround by first distilling the file in Acrobat and
then resending it to the RIP, but this affects their workflow and we plan to
send a large number of files to them per year so this isn't a viable option.
--- End ---

This suggests another possible workaround, which is that /you/ could do the
PDF to PDF conversion before sending it to the printer. That would at least
be a short-term fix that wouldn't affect their workflow. Another workaround
to explore is to output PostScript from PDF  see if it works better.

If anybody else recognizes this problem, please feel free to jump in.

Victor Mote


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



RE: Postscript Error when RIPing document created with FOP

2003-02-11 Thread Victor Mote
Victor Mote wrote:

 be a short-term fix that wouldn't affect their workflow. Another 
 workaround
 to explore is to output PostScript from PDF  see if it works better.

Sorry, this should say output PostScript from FOP.

Victor Mote

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



svg looks great on screen, horrible in print

2003-02-11 Thread David Bridgeland
All,
I am using fop (0.20.5rc) with an fo:external-graphic reference to an SVG file. The SVG file looks fine by itself, and the resulting PDF looks fine on the screen, but when I print it, the rectangles look like they are drawn with fat crayons. 
Here is a short excerpt from the SVG:
?xml version="1.0" encoding="UTF-8" standalone="no"?svg width="6in" height="1.95in" viewBox="2 1 37 12"rect style="fill: #ff" x="2.143" y="2.15" width="6" height="6.4"/rect style="fill: none; stroke-width: 0.1; stroke: #00" x="2.143" y="2.15" width="6" height="6.4"/polygon style="fill: #ff" points="2.143,2.15 2.643,1.65 8.643,1.65 8.143,2.15 "/ 
..
and here is a short except from the FO:
.
fo:blockfo:external-graphic src="" width="auto" height="auto" content-width="6in" content-height="auto"//fo:block
..
Any ideas about why this is happening, or how it could be fixed?
Dave Bridgeland
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now

Re: Antwort: Fop and multithreading.

2003-02-11 Thread Peter B. West
Jeremias Maerki wrote:
Frédéric and Reto,
having read the 24.1.2 Programming restrictions of the EJB 2.0
specification, I'd recommend you guys don't call FOP from an EJB. The
programming restrictions forbid among other things the following:
- Reading or writing of static variables (FOP still does this too often)
There you go giving me heart failure again, Jeremias.
'An enterprise Bean must not use read/write static fields.  Using 
read-only static fields is allowed.  Therefore, it is recommended that 
all static fields in the enterprise bean class be declared *final*.'

Note the recommended.  I have been very good.  Everything that is 
logically WORM, but which cannot be declared static final because of 
complex initialization requirements, has been removed into singletons 
(which have their own difficulties with EJBs, I gather) where advantage 
can be taken of the final modifier for delayed initialization.

- Use of thread synchronization primitives (FOP does that mostly because
  of the static variables)
'An enterprise Bean must not use thread synchronization primitives to 
synchronize execution of multiple instances.'

Note the qualifying clause (phrase?).  This presumably allows their use 
to synchronize the operation of multiple thread within the same 
instance, e.g., the parser and FO tree builder threads.  I certainly 
hope so.

Peter
--
Peter B. West  [EMAIL PROTECTED]  http://www.powerup.com.au/~pbwest/
Lord, to whom shall we go?
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: Antwort: Fop and multithreading.

2003-02-11 Thread Jeremias Maerki

On 11.02.2003 06:37:26 Peter B. West wrote:
 There you go giving me heart failure again, Jeremias.

Stop it, Peter! I'm not writing a scientific paper here. I'm trying to
help. It was my attempt to convey the problems I had in the past dealing
with static constructs within EJBs. Be careful not to kill my motivation
for helping out here. I can also do different things in my fun time.


Jeremias Maerki


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



RE: Antwort: Re: Antwort: Fop and multithreading.

2003-02-11 Thread frederic . kieffer
Like Reto, EJBs have been chosen to be strategic technology in my company.
Having tested Fop in Servlets I designed (generating pdf an opening it in
the client's browser) causes no problem ; 
in this case, the renderer I use is the PDF one.
But when I want to print directly (using the printer configured on the unix
box), I render the output through a class which extends AWTRenderer
which, and as Reto said, is not thread safe, because of the classe it uses.
So I was able to reproduce the issues outside EJBs.
I will try to write a testCase that reproduces the problems too.

Thanks.
Frédéric

-Message d'origine-
De: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Date: lundi 10 février 2003 16:16
À: [EMAIL PROTECTED]
Objet: Antwort: Re: Antwort: Fop and multithreading.



Hi Jeremias,

I do agree very much with you about the concerns on EJB usage, though
unfortunately drop the EJB idea is not an option.
EJB is the chosen environment in this company (my client). Since XSL:FO has
also been chosen as strategic technology, we are bound to find a way for
the two to coexist.  Having a special service for the rendering may be an
option, but in the end this comes down to the same issues than doing it
inside the EJB using seperate ThreadPools, JMS and the like, this is a
long-discussed topic in EJB lists...

It seems obvious that you have not noticed the problems we see, because the
issue is most probably in AWTRenderer and its use of AWT classes
(java.awt.Font, java.awt.FontMetrics, java.awt.graphics).

Your suggestion is a good way forward: I will try write a TestCase that
reproduces the problems outside EJB and we see how we can go on from there.

Is the testcase you used in november available as a starter?

merci,
Reto


___

CSS Versicherung
Reto Blunschi EXTERNE
Rösslimattstrasse 40
CH-6002 Luzern
Telefon  ++41 (0)41 369 1236
Telefax  ++41 (0)41 369 1212
[EMAIL PROTECTED]
www.css.ch




Jeremias Maerki [EMAIL PROTECTED] on 10.02.2003 14:08:11

Bitte antworten an [EMAIL PROTECTED]

An:  [EMAIL PROTECTED]
Kopie:

Thema:   Re: Antwort: Fop and multithreading.

Frédéric and Reto,

having read the 24.1.2 Programming restrictions of the EJB 2.0
specification, I'd recommend you guys don't call FOP from an EJB. The
programming restrictions forbid among other things the following:
- Reading or writing of static variables (FOP still does this too often)
- Use of thread synchronization primitives (FOP does that mostly because
  of the static variables)
- Use of AWT functionality
- Use of java.io package to access files (which obviously happens as
  well)

So the singleton may also be a bad idea. I recommend you don't use FOP
within EJBs. Use a Servlet, a WebService or a custom-built server
service instead.

I've done some serious debugging of multithreading issues last November
by writing a test application that uses FOP in a multi-threaded fashion
(PDF only, no AWT). I haven't had the symptoms you describe so I can
only imagine it has to do with the enviroment (EJBs). Of course, it
could be that my test application was suboptimal, so maybe you two can
come up with a test application that triggers your symptoms outside an
EJB server. That would help track the error down. If you can't reproduce
the bug outside the EJB server I recommend you drop the EJB idea.

You can find the spec mentioned above here:
http://java.sun.com/products/ejb/docs.html#specs

Good luck!


On 10.02.2003 13:00:56 frederic.kieffer wrote:
 Thanks for your help.
 In addition, I'm in the same kind of situation as you are (multiprocessor
 Unix box, executing FOP in a Message Driven EJB on JBoss).
 I designed a singleton class which is used by this ejb each time a
message
 is being consumed.
 I'm going to try to synchronize its methods. Maybe this will help.


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]

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



Re: SVG

2003-02-11 Thread H. krishna
Dear Jeremias Maerki,

my fop bat file is :

java -Xmx250m -cp %LOCALCLASSPATH%
org.apache.fop.apps.Fop %1 %2 %3 %4 %5 %6 %7 %8 -d -c
conf\userconfig.xml 

my svg is:

fo:external-graphic alignment-baseline=baseline 
src=m001.svg/

Immediate replay is highly appreciated.

Regards,

H. Balakrishnan



--- Jeremias Maerki [EMAIL PROTECTED] wrote:
 Could you provide a little snippet of your FO file
 where you reference
 the SVG file? And can you please run the
 transformation using the -d
 option when callong fop.bat/fop.sh? That way you
 will get a stacktrace
 which lets us help tracking down what's going wrong.
 
 On 09.02.2003 11:08:24 H. krishna wrote:
  i am convert mathml to svg format using custard.
  then linked the svg files in the fo file. the
  following error is display on the compilation
 stage
  (FOP-0.20.5):
  
  [ERROR] : Could not load external SVG: null
  [ERROR] : Error while creating area : No
 ImageReader
  for this type of image (file: m002.svg)
  
  But in the FOP-0.20.4 the same fo file is work
 fine.
 
 
 
 Jeremias Maerki
 
 

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


__
Do you Yahoo!?
Yahoo! Shopping - Send Flowers for Valentine's Day
http://shopping.yahoo.com

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



Re: Antwort: Re: Antwort: Fop and multithreading.

2003-02-11 Thread Jeremias Maerki
Ok, I've put together a ZIP and put it under the URL below:
http://cvs.apache.org/~jeremias/FOPMTTestbed.zip

I hope you don't mind that it's heavily relying on Avalon (especially
Fortress). I've put all the necessary JARs in the lib directory. I
didn't include fop.jar and batik.jar which you can take from your local
FOP. I've also done a little Ant build.xml to make it easy to have some
fast results. You just have to adjust the FOP location in build.xml to
your local environment so it compiles.

To configure the whole thing look at FOPTestbed.xconf. There you can
specify the number of concurrent threads, which files to transform etc.

And finally, to test multithreading with the AWT Renderer just change
FOProcessorImpl.java accordingly. It currently generates PDF.

If you have questions, fire away. Happy debugging!

On 10.02.2003 16:50:18 Jeremias Maerki wrote:
  Is the testcase you used in november available as a starter?
 
 I have it here. Just give me a little time to get it running again (I've
 got to check if it's still compatible with the latest Avalon Fortress
 version. I'll post a URL when I'm finished.



Jeremias Maerki


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



Re: SVG

2003-02-11 Thread Jeremias Maerki
I've downloaded Custard and tried two of their generated SVG files. No
problems with the way you specified the SVG. There must be something
else. Please send in that stacktrace I was talking about in my last mail.
It would help me track down the problem. Your last mail didn't contain
any helpful information.

Are you sure you're using the Batik version that comes with FOP? Another
version may be incompatible.

On 11.02.2003 10:58:46 H. krishna wrote:
 my fop bat file is :
 
 java -Xmx250m -cp %LOCALCLASSPATH%
 org.apache.fop.apps.Fop %1 %2 %3 %4 %5 %6 %7 %8 -d -c
 conf\userconfig.xml 
 
 my svg is:
 
 fo:external-graphic alignment-baseline=baseline 
 src=m001.svg/


Jeremias Maerki


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



Re: Fop and multithreading.

2003-02-11 Thread reto . blunschi

Thanks for the testcase, Jeremias.

I got it running and can reliably reproduce the MT problems in AWTRenderer
with it, even on my single-processor NT 4.0 box.
I will have a closer look into the sources of AWTRenderer now...

___

CSS Versicherung
Reto Blunschi EXTERNE
Rösslimattstrasse 40
CH-6002 Luzern
Telefon  ++41 (0)41 369 1236
Telefax  ++41 (0)41 369 1212
[EMAIL PROTECTED]
www.css.ch




Jeremias Maerki [EMAIL PROTECTED] on 11.02.2003 11:19:55

Bitte antworten an [EMAIL PROTECTED]

An:  [EMAIL PROTECTED]
Kopie:

Thema:   Re: Antwort: Re: Antwort: Fop and multithreading.

Ok, I've put together a ZIP and put it under the URL below:
http://cvs.apache.org/~jeremias/FOPMTTestbed.zip

I hope you don't mind that it's heavily relying on Avalon (especially
Fortress). I've put all the necessary JARs in the lib directory. I
didn't include fop.jar and batik.jar which you can take from your local
FOP. I've also done a little Ant build.xml to make it easy to have some
fast results. You just have to adjust the FOP location in build.xml to
your local environment so it compiles.

To configure the whole thing look at FOPTestbed.xconf. There you can
specify the number of concurrent threads, which files to transform etc.

And finally, to test multithreading with the AWT Renderer just change
FOProcessorImpl.java accordingly. It currently generates PDF.

If you have questions, fire away. Happy debugging!

On 10.02.2003 16:50:18 Jeremias Maerki wrote:
  Is the testcase you used in november available as a starter?

 I have it here. Just give me a little time to get it running again (I've
 got to check if it's still compatible with the latest Avalon Fortress
 version. I'll post a URL when I'm finished.



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: Antwort: Fop and multithreading.

2003-02-11 Thread Peter B. West
Jeremias,
Humble apologies.  I'm worried myself about having taken the wrong 
approach wrt EJBs, in this case especially regarding the threads, so my 
heart was in my mouth when I first read this.  Heaven help us if your 
motivation is undermined.

Peter
Jeremias Maerki wrote:
On 11.02.2003 06:37:26 Peter B. West wrote:
There you go giving me heart failure again, Jeremias.

Stop it, Peter! I'm not writing a scientific paper here. I'm trying to
help. It was my attempt to convey the problems I had in the past dealing
with static constructs within EJBs. Be careful not to kill my motivation
for helping out here. I can also do different things in my fun time.
--
Peter B. West  [EMAIL PROTECTED]  http://www.powerup.com.au/~pbwest/
Lord, to whom shall we go?
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: NPE in AbstractRenderer and bug with fo:inlines (was: SVG)

2003-02-11 Thread Jeremias Maerki
Ok, the stacktrace is still missing, but I've still been able to
reproduce the problem. But it's not related to SVG as you suspected. FOP
wants to write a warning message and encounters a null pointer. I've
just committed a change to CVS that fixes the NullPointerException, but
not the bug (see below). If you download the CVS version of FOP you
should be able to generate a PDF from your FO file. The problem is that
on my machine FOP swallowed a character (().

Does anybody have an idea about the following message generated in
AbstractRenderer.java? I've found a reference to this problem in the
mailing list archives: http://marc.theaimsgroup.com/?t=10190325361r=1w=2

[ERROR] Areas pending, text probably lost. Check Page unknown and following 
page.

Sounds like you tripped over an old bug. I suggest you try working
around it for the moment by chaning the fo:inline near In Europe there
I was able to get rid of the error by removing the ( before the fo:inline.

Anybody out there who wants to fix that one?

On 11.02.2003 14:30:07 H. krishna wrote:
 Yes, i am using batik version with fop. 
 
 i attached my fo file. please look into this.


Jeremias Maerki


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



Re: NPE in AbstractRenderer and bug with fo:inlines (was: SVG)

2003-02-11 Thread Jeremias Maerki
Looks like it's already in Bugzilla:
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=13464


Jeremias Maerki


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



Cyrillic Characters not showing on PDF with Cyrillic Font

2003-02-11 Thread Daniel, Gillian
Hi there,
I am sorry to bother you all again about my Cyrillic Font problem, but I have 
gotten further now and think that perhaps someone might have a better idea of 
what I can do now.

I have checked the various stages, from creating an XML file with castor with 
all the information from the database to be included in the PDF, to 
transforming this XML file and my XSL file to the input required to create the 
PDF with javax.xml.transform.Transformer.  In the files, you can see the 
Russian Characters which are supposedly viewable on my PDF.

I have downloaded various TTF fonts, which are meant to be able to handle 
Cyrillic characters.  I followed the instructions on how to create an 
metrics.xml file for each one and have declared them in my userconfig.xml file. 
 The only problem is, I still get  instead of the words, or nothing at all.

I have no idea what to do now, and was hoping perhaps someone could point me to 
a font that will work, or tell me exactly what I am doing wrong.
I can provide any other information you might require.  I am a novice at this, 
as this is my first job since graduating from university, so any help would be 
so very gratefully appreciated.

Your hopefully
Gillian Daniel


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



Re: Cyrillic Characters not showing on PDF with Cyrillic Font

2003-02-11 Thread Louis . Masters

I just went through implementing a doc in Chinese and the first place I
always looked for font issues was the system.out.  Most of the time when I
was getting #  instead of the characters I wanted, there was an error
pointing me in the right direction in my system.out log.

-Lou




Daniel, Gillian [EMAIL PROTECTED] on 02/11/2003 09:54:37

Please respond to [EMAIL PROTECTED]

To:   [EMAIL PROTECTED]
cc:

Subject:  Cyrillic Characters not showing on PDF with Cyrillic Font

Hi there,
I am sorry to bother you all again about my Cyrillic Font problem, but I
have gotten further now and think that perhaps someone might have a better
idea of what I can do now.

I have checked the various stages, from creating an XML file with castor
with all the information from the database to be included in the PDF, to
transforming this XML file and my XSL file to the input required to create
the PDF with javax.xml.transform.Transformer.  In the files, you can see
the Russian Characters which are supposedly viewable on my PDF.

I have downloaded various TTF fonts, which are meant to be able to handle
Cyrillic characters.  I followed the instructions on how to create an
metrics.xml file for each one and have declared them in my userconfig.xml
file.  The only problem is, I still get  instead of the words, or
nothing at all.

I have no idea what to do now, and was hoping perhaps someone could point
me to a font that will work, or tell me exactly what I am doing wrong.
I can provide any other information you might require.  I am a novice at
this, as this is my first job since graduating from university, so any help
would be so very gratefully appreciated.

Your hopefully
Gillian Daniel


-
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: NPE in AbstractRenderer and bug with fo:inlines (was: SVG)

2003-02-11 Thread J.Pietschmann
Jeremias Maerki wrote:
[ERROR] Areas pending, text probably lost. Check Page unknown and following page.
...
Anybody out there who wants to fix that one?
The problem is: how? A table can have a bunch of pending areas
in each of the last lines in each cell. What's missing is a link
between the block areas generated by a fo:block across a page
break, but I'm sure this would really screw page gc.
Wait: the block FO could transfer the pending areas from one line
to the next. I'll look into this this week.
J.Pietschmann
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: Cyrillic Characters not showing on PDF with Cyrillic Font

2003-02-11 Thread Oleg Tkachenko
Daniel, Gillian wrote:
I have downloaded various TTF fonts, which are meant to be able to handle
Cyrillic characters.  I followed the instructions on how to create an
metrics.xml file for each one and have declared them in my userconfig.xml
file.  The only problem is, I still get  instead of the words, or
nothing at all.
Most likely there is still some error somewhere, check out FOP debug messages. 
Are you sure FOP uses your userconfig.xml for starters?
--
Oleg Tkachenko
Multiconn Technologies, Israel

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


Re: provisional-label-separation

2003-02-11 Thread J.Pietschmann
Karen Mergner wrote:
here are a short xml file and a small xsl file to generate a list. There
are spaces into the label but it dosn't work fine.
It's a bug, label-end() is broken (prematurely evaluated while
the enclosing block was still not laid out and had not been
assigned a width).
This is fixed now.
J.Pietschmann
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]