| Author |
Problem-creating .fo file to PDF
|
umasankar puranam
Ranch Hand
Joined: Sep 24, 2004
Posts: 31
|
|
hi, When I am trying to create a PDF from .fo file issuing the command java org.apache.fop.apps.Fop everything.fo everything.pdf I am getting the following error in the console. If anybody can solve my problem, please.... [INFO] Using org.apache.xerces.parsers.SAXParser as SAX2 Parser [INFO] FOP 0.20.5 [INFO] Using org.apache.xerces.parsers.SAXParser as SAX2 Parser [INFO] building formatting object tree [INFO] setting up fonts [ERROR] Invalid byte 2 of 4-byte UTF-8 sequence.
|
umasankar<br />Software Engineer
|
 |
Manuel Moons
Ranch Hand
Joined: Mar 05, 2002
Posts: 229
|
|
|
Maybe you should play with your encoding in you .fo file. Try to change it to UTF-16 or ISO 8859-1. You have a problem with some character in that file.
|
 |
umasankar puranam
Ranch Hand
Joined: Sep 24, 2004
Posts: 31
|
|
hi Manuel Moons, Still i am getting the error. When i tried with UTF-16 the errors are as follows:- [INFO] Using org.apache.xerces.parsers.SAXParser as SAX2 Parser [INFO] FOP 0.20.5 [INFO] Using org.apache.xerces.parsers.SAXParser as SAX2 Parser [INFO] building formatting object tree [INFO] setting up fonts [Fatal Error] Example.fo:1:40: Content is not allowed in prolog. [ERROR] Content is not allowed in prolog. and when using ISO 8859-1 I am getting the error:- [INFO] Using org.apache.xerces.parsers.SAXParser as SAX2 Parser [INFO] FOP 0.20.5 [INFO] Using org.apache.xerces.parsers.SAXParser as SAX2 Parser [INFO] building formatting object tree [INFO] setting up fonts [Fatal Error] Example.fo:1:44: Invalid encoding name "ISO 8859-1". [ERROR] Invalid encoding name "ISO 8859-1".
|
 |
Manuel Moons
Ranch Hand
Joined: Mar 05, 2002
Posts: 229
|
|
Oh the last error I can explain, it should be : ISO-8859-1 Maybe you can try that. If that does not work. Show us a small xml (fo) example where you get that error.
|
 |
William Brogden
Author and all-around good cowpoke
Rancher
Joined: Mar 22, 2000
Posts: 12271
|
|
[Fatal Error] Example.fo:1:40: Content is not allowed in prolog.
I would look very carefully at that first line - preferably with a programmers editor that can display hex values. How is the .fo file being created? Bill
|
 |
Ilja Preuss
author
Sheriff
Joined: Jul 11, 2001
Posts: 14112
|
|
|
Moving to our XML forum...
|
The soul is dyed the color of its thoughts. Think only on those things that are in line with your principles and can bear the light of day. The content of your character is your choice. Day by day, what you do is who you become. Your integrity is your destiny - it is the light that guides your way. - Heraclitus
|
 |
 |
|
|
subject: Problem-creating .fo file to PDF
|
|
|