Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Problem-creating .fo file to PDF

 
umasankar puranam
Ranch Hand
Posts: 31
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.

 
Manuel Moons
Ranch Hand
Posts: 229
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 31
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 229
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 13058
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
[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
Posts: 14112
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Moving to our XML forum...
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic