Daniel Farinha <[EMAIL PROTECTED]>
2006-04-06 13:58 |
|
Hi Daniel,
And thanks heaps. Your "longshot" works like a dream :-)
Kind regards
Daniel
>This is a bit of a shot in the dark, but have you tried reading the html
>file into a String (say 'xhtmlSource') and then:
>HtmlParser.parse(document, new java.io.ByteArrayInputStream(xhtmlSource.trim().getBytes("UTF8")));
>>[EMAIL PROTECTED] wrote:
>>
>> Hi,
>>
>> I have been trying to execute the example from Chapter 7, example 7 in
>> the (old?) tutorial which should be able to transform (x)html into a
>> pdf document. The thing compiles well, but when run i get the
>> follwoing exception:
>>
>> ExceptionConverter: java.io.UTFDataFormatException: Invalid byte 2 of
>> 3-byte UTF-8 sequence.
>> at Test.<init>(Test.java:64)
>> at Test.main(Test.java:26)
>> at org.apache.xerces.impl.XMLEntityScanner.load(Unknown Source)
>> at org.apache.xerces.impl.XMLEntityScanner.scanContent(Unknown
>> Source)
>> at Test.main(Test.java:26)
>> Invalid byte 2 of 3-byte UTF-8 sequence.
>>
>> As i understand it, it is necessary to use JAXP for this example to
>> work. I have tried this but get a different exception
>>
>> My question is really, what version of JAXP do i need? I currently use
>> a xalan/xerces dated 2005-03-23.
>>