SystemId Unknown; java.lang.NullPointerException

2008-04-06 Thread Daniel Putra
Hi 

I get a very strange error

SystemId Unknown; Line #1; Column #1020; java.lang.NullPointerException

in FOP 0.94 embedded mode and found out that the issue is fixed in FOP 
0.95beta1. Unfortunately beta1 is not really usable yet as all my fonts are 
enlarged and the pages are shrunken, etc.

The error above must be related to AWTRenderer or MIME_FOP_AWT_PREVIEW related 
methods. The error appears if I use AWTRenderer and then afterwards try to save 
any xsl-fo based PDF file to disk via Fop fop = 
GlobalObjects.obtainFopFactory().newFop(MimeConstants.MIME_PDF, userAgent, 
outputStream)... After using AWTRenderer I have to exit the JVM to get the file 
creation working again. As soon as I preview MIME_PDF does not work any longer.

I wonder if there is any chance that I could get a patch, or a hint where to 
fix the code. I could then do to build on my own. If this is not possible, 
could you let me know when 0.95 is scheduled to be released? It took me 5 days 
to change all our xsl-foo and related Java code to version 0.94 compatibility. 
Therefore I cannot go back to version 0.20.5.

Your help in this is greatly appreciated.

Best regards
Daniel Putra
South Africa

Re: Need immediate help.. FOP on Solaris Box

2008-04-06 Thread J.Pietschmann

Newkid wrote:

Can any one let me know whether one can create an PDF file with the
following options:

a. Reading XML file from the stream, passing XSL which is stored in the
webdirectory and storing it in some other directory?

b. Reading XML from the database, passing XSL which is stored in the
webdirectory and output the pdf as a stream?


Technically: yes for both questions.  However, this is based
on a woefully broad set of assumptions on what you probably
mean. Which is, based on experience with this kind of questions,
slightly different from what you actually mean.
Ok, the assumptions are:
- You develop a web application based on Java servlets
- For question a, you want to read an XML document from a
  servlet input stream, transform it using an XSL style sheet
  read from a file belonging to the web application, render
  the result to PDF and store it as a file somewhere else.
- For question b, you read a complete XML document from the
  database, transform/render it and send to the servlet's
  output stream.

Usually, follow-up questions include
- How do I get the XSL transformation? Possible answers:
  Either put in a jar in the lib directory (i.e. on the
  classpath) and load it as a resource, or put it into the
  content area and try to use getRealPath to resolve the
  file system path. Both methods have drawbacks.
- How do I get the XML from the database into the transformation?
  Answer: ask someone how the get it as a string, then use a
  StringSource.
- Why doesn't FOP like the XML read from the database? Answer:
  It's the XML parser which barfs for a variety of possible reasons:
   - you didn't store a proper XML document in the database field
   - the database mangled the character encoding
   - the XML was double escaped by an automatism which tried to
 be helpful, but wasn't
   - your server runs an old Java version and your XML triggered a
 known bug in the parser included in the JRE.
- Why doesn't the browser show the PDF? Actually, the question should
  be: How do I debug this? Answer: develop and test each step
  separately. Develop the transformation outside of the web
  application. Make sure you get the same XML out of the database
  which you put in. Put only everything together and in the web
  application once you are sure every step works. Don't do small
  fixes for the XSL transformation in the web application
  environment, develop it in the external environment, run the
  automated regression tests (you write automated regression
  tests, do you?), then deploy it.

I still wonder where the solaris box factlet fits in.

J.Pietschmann

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



Re: Apache FOP: Trimbox, Bleedbox, Crop marks

2008-04-06 Thread Oliver Hirschi

Thanks for your answer at first

What do you think, how much effort (in man-day) is used for initial 
skill adaptation training in fop-code and writing the expansion for 
supporting trim-, bleed-box and crop-marks?


by-the-way: Ech glaub eigentlech chönntemer üs im lozärner dialäkt 
onderhalte...http://www.FamilyHirschi.ch :-)


Gruss, Oliver Hirschi

Jeremias Maerki [EMAIL PROTECTED] schrieb im Newsbeitrag  
news:[EMAIL PROTECTED]
It's not available in FOP, yet. I have once started support for the 
bleed

box (as an experiment) but since this is very low priority for me I
haven't finished, yet. If you have some Java knowledge it would be an
ideal opportunity to contribute something back to FOP. I can give
hints and pointers into the code to get you started.

On 02.04.2008 10:34:36 Oliver Hirschi wrote:
 Hi there

 Is there a way to define the trimbox, the bleedbox and maybe also 
 corp

 marks by generating a pdf over xsl:fo using apache fop 0.94?

 I saw there is a way to do it with e.g. AntennaHouse, isn't it?
 So, do I have to change to AntennaHouse, or is there also a way to 
 do

 it with apache fop?

 Great thanks  Kind regards,
 Oliver Hirschi


Jeremias Maerki 




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