Bug 11277 - illegal char value nnn in FO PDF driver.run()
Summary: illegal char value nnn in FO PDF driver.run()
Status: CLOSED INVALID
Alias: None
Product: Fop - Now in Jira
Classification: Unclassified
Component: pdf (show other bugs)
Version: 0.20.4
Hardware: PC All
: P3 blocker
Target Milestone: ---
Assignee: fop-dev
URL:
Keywords:
: 13927 14387 (view as bug list)
Depends on:
Blocks:
 
Reported: 2002-07-30 09:26 UTC by David Lau
Modified: 2012-04-01 13:54 UTC (History)
3 users (show)



Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description David Lau 2002-07-30 09:26:35 UTC
I have the following statements in a servlet to create a PDF file from FO file. 
Meanwhile, I also added a chinese font to FOP to generate a PDF file with 
chinese character.

    ByteArrayOutputStream out1 = new ByteArrayOutputStream();
    log = new ConsoleLogger(ConsoleLogger.LEVEL_WARN);  	        
    MessageHandler.setScreenLogger(log);
    FileInputStream file = new FileInputStream(new File
("C:\\eFactoring_Data\\ADVICE\\EditFinancing_AdvC_TX_tx1.xml.fo"));

    InputSource foFile = new InputSource(file);
    foFile.setEncoding("UTF-8");
 
    Driver driver = new Driver(foFile, out1);
    Options options = new Options(new File("./fo/userconfig.xml"));

    driver.setLogger(log);
    driver.setRenderer(Driver.RENDER_PDF);
    driver.run();

***** Font in userconfig.xml *****
<font metrics-file="c:\FONTS\MingLiU.xml" kerning="yes" embed-
file="c:\FONTS\mingliu.ttc">
    <font-triplet name="MingLiU" style="normal" weight="normal"/>
    <font-triplet name="MingLiU" style="normal" weight="bold"/>
 </font>
</fonts>


This servlet is works OK in J2EE server. However , when I deployed in 
websphere, the generated PDF seem to be corrupted and not able to view by 
Acrobat Reader. The Websphere console have about 3000 lines logged like below:
[2002/7/30   16:11:37:625 CST] 447ecfb2 SystemOut     U illegal char value -23
[2002/7/30   16:11:37:625 CST] 447ecfb2 SystemOut     U illegal char value -17
[2002/7/30   16:11:37:625 CST] 447ecfb2 SystemOut     U illegal char value 120
[2002/7/30   16:11:37:625 CST] 447ecfb2 SystemOut     U illegal char value -26
[2002/7/30   16:11:37:625 CST] 447ecfb2 SystemOut     U illegal char value 124
[2002/7/30   16:11:37:625 CST] 447ecfb2 SystemOut     U illegal char value -22
[2002/7/30   16:11:37:641 CST] 447ecfb2 SystemOut     U illegal char value -21
[2002/7/30   16:11:37:641 CST] 447ecfb2 SystemOut     U illegal char value -15
[2002/7/30   16:11:37:641 CST] 447ecfb2 SystemOut     U illegal char value 120
[2002/7/30   16:11:37:641 CST] 447ecfb2 SystemOut     U illegal char value -16
[2002/7/30   16:11:37:656 CST] 447ecfb2 SystemOut     U illegal char value -98


What is the problem ?
Is FOP with additional fonts not support in websphere ?
Comment 1 J.Pietschmann 2002-07-30 10:35:19 UTC
The output seems to come from the ASCII85Filter which encodes the compressend
character stream for PDF text into printable characters. This has nothing to do
with fonts or whatever. Inspection of the code doesn't turn up anything
sispucious, and it is very unlikely that this well tested routine has a bug.
ThHerefore the most likely explanation is a bug in the JVM, check whether your
WebSphere uses a recent conformant JVM version, or at least the same as the
server where your example works. Another possibility is a corrupted fop.jar,
but the JVM should have caught this too.
Comment 2 J.Pietschmann 2002-11-08 15:42:19 UTC
*** Bug 13927 has been marked as a duplicate of this bug. ***
Comment 3 J.Pietschmann 2002-11-08 15:43:34 UTC
*** Bug 14387 has been marked as a duplicate of this bug. ***
Comment 4 Markus 2002-11-12 11:31:54 UTC
Hi,

I had the same problem when using TTF on UNIX. There are two things to 
consider: TTF must be copied in binary mode from Win32 to UNIX, and the 
encoding of the font-metrics file must be correct. The simplest way, which 
worked fine, is to omit the encoding statement.

MM
Comment 5 Glenn Adams 2012-04-01 13:54:04 UTC
batch transition to closed remaining pre-FOP1.0 resolved bugs