You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-users@xmlgraphics.apache.org by Tobias Mueller <tm...@a-i-c.de> on 2002/05/13 13:38:36 UTC

Newbie Problem: FOP over SOAP -> org.apache.fop.apps.FOPException

Hi!

I'm trying to get FOP over SOAP (invoking a bean) up and running, but I
always receive the "org.apache.fop.apps.FOPException" error message. Though
I'm a beginner in this matter, hopefully someone can give me a hint.

My code:

import java.io.*;
import java.util.*;

import org.xml.sax.InputSource;
import org.xml.sax.XMLReader;

import org.apache.fop.apps.Driver;
import org.apache.fop.apps.Version;
import org.apache.fop.apps.InputHandler;
import org.apache.fop.apps.XSLTInputHandler;

import org.apache.log.*;

public class generatePDF {

	public String Publish(String XMLfile, String XSLfile, String outFile)
throws Exception {

		File MyXMLfile = new File(XMLfile);
		File MyXSLfile = new File(XSLfile);
		FileOutputStream MyOutputFile = new FileOutputStream(outFile);

		Logger log = null;

		if(log == null) {
	            Hierarchy hierarchy = Hierarchy.getDefaultHierarchy();
        	    log = hierarchy.getLoggerFor("fop");
	            log.setPriority(Priority.WARN);
        	}

		try {

			Driver driver = new Driver();
			driver.setLogger(log);
  			driver.setRenderer(Driver.RENDER_PDF);
  			InputHandler inputHandler = new XSLTInputHandler(MyXMLfile, MyXSLfile);
  			XMLReader parser = inputHandler.getParser();
  			driver.setOutputStream(MyOutputFile);
  			driver.render(parser, inputHandler.getInputSource());
  			MyOutputFile.close();

		} catch (Exception ex) {

			System.out.println(ex);

		}

  		return "built " + outFile;
	}

}

Thanks in advance and sorry for my english,

Tobi


Re: Newbie Problem: FOP over SOAP -> org.apache.fop.apps.FOPException

Posted by "J.Pietschmann" <j3...@yahoo.de>.
Tobias Mueller wrote:
> I'm trying to get FOP over SOAP (invoking a bean) up and running, but I
> always receive the "org.apache.fop.apps.FOPException" error message. Though

Do your XML/XSL files work with the command line
FOP application? They may contain errors. It is
alos possible that the files can't be found because
of another cwd, try absolute pathnames.

J.Pietschmann


Re: Re: Acrobat pictograms and document summary

Posted by je...@posingies.com.
Thanks a lot! We'll try it.

"J.Pietschmann" <j3...@yahoo.de> schrieb am 14.05.2002, 21:06:02:
> jens@posingies.com wrote:
> > Another problem is the document summary of the Acrobat Reader. How can I
> > fill in these fields?
> 
> You can postprocess the PDF generated by FOP with another
> tool, like iText http://www.lowagie.com/iText/
> 
> 
> J.Pietschmann

Re: Acrobat pictograms and document summary

Posted by "J.Pietschmann" <j3...@yahoo.de>.
jens@posingies.com wrote:
> Another problem is the document summary of the Acrobat Reader. How can I
> fill in these fields?

You can postprocess the PDF generated by FOP with another
tool, like iText http://www.lowagie.com/iText/


J.Pietschmann




Acrobat pictograms and document summary

Posted by je...@posingies.com.
Hello folks,

I am working currently on transforming XML-documents into pdf documents.

When I open the rendered document with the Acrobat Reader 5.0 the small
pictograms look fine, showing a little picture of the page itself.
However, when
I open the same pdf document with Internet Explorer 6.0 the pictogramms
just
show grey pictures. Navigation works, just the small picture doesn´t.

Another problem is the document summary of the Acrobat Reader. How can I
fill in these fields?

Comments? Solutions?