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 "Dale P. Smith" <da...@gmail.com> on 2008/09/09 21:39:55 UTC

docbook bookmarks and xpdf

Howdy fop people.

Using dockbook and the dockbook-xsl stylesheets, along with setting the
fop1.extensions parameter to '1', I'm seeing some ugliness in xpdf.  It has been
a long long adventure figuring out what is causing this and where the bug is.

It happens when xpdf sees the 0xFF and 0xFE chars as chars and not as a byte
order mark.  It would be happy if the bytes were swapped.

Now, my reading of the spec seems to indicate that only UTF-16BE is allowed.

So.  I'm thinking it's a bug in fop.  Not sure where.  There seems to be code
that writes out Big Endian UTF-16 properly.

Thanks,
  -Dale



---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org


Re: docbook bookmarks and xpdf

Posted by "Dale P. Smith" <da...@gmail.com>.
Vincent Hennebert <vhennebert <at> gmail.com> writes:

> Dale P. Smith wrote:
> > Ok.  I'm running on a Debian Lenny system.  I installed the sun-java6-jre
> > package and am using fop 0.95 installed from the binary tarball.
> 
> Careful, just because you installed the sun-java6-jre package doesn’t
> mean that you’re actually using it.

Oh how right you are!  It was pointing to gcj.  I totally forgot that java might
have alternatives.

Thanks muchly.  The pdf files now look good and xpdf is happy.

Thanks Again,
  -Dale




---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org


Re: docbook bookmarks and xpdf

Posted by Vincent Hennebert <vh...@gmail.com>.
Hi,

Dale P. Smith wrote:
> Jeremias Maerki <dev <at> jeremias-maerki.ch> writes:
> 
>> If this is the result you get, you're using a non-conforming JVM. For
>> encoding the title, FOP uses "UTF-16" encoding for which you can find in
>> the spec:
>> "When decoding, the UTF-16 charset interprets a byte-order mark to
>> indicate the byte order of the stream but defaults to big-endian if
>> there is no byte-order mark; when encoding, it uses big-endian byte
>> order and writes a big-endian byte-order mark."
>>
>> See:
>> http://java.sun.com/j2se/1.4.2/docs/api/java/nio/charset/Charset.html
>>
>> So if you get little endian, that means the class library you're using
>> misbehaves. I'd make sure you're really using the right JVM.
> 
> Ok.  I'm running on a Debian Lenny system.  I installed the sun-java6-jre
> package and am using fop 0.95 installed from the binary tarball.

Careful, just because you installed the sun-java6-jre package doesn’t
mean that you’re actually using it. On Debian systems there is a notion
of ‘alternatives’ that allows you to set a preference between several
packages providing the same piece of software. By default more free
versions will be privileged over less free ones.
To see which version is currently in use:
    update-alternatives --display java
to set up another version:
    update-java-alternatives -l
    <list of alternatives>
    update-java-alternatives -s java-6-sun

If you already did all of that, then... I don’t know :-\

> Same thing.  I'll see about installing a sun built java and see if that makes
> any difference.
> 
> Thanks!
>   -Dale

HTH,
Vincent

---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org


Re: docbook bookmarks and xpdf

Posted by "Dale P. Smith" <da...@gmail.com>.
Jeremias Maerki <dev <at> jeremias-maerki.ch> writes:

> 
> If this is the result you get, you're using a non-conforming JVM. For
> encoding the title, FOP uses "UTF-16" encoding for which you can find in
> the spec:
> "When decoding, the UTF-16 charset interprets a byte-order mark to
> indicate the byte order of the stream but defaults to big-endian if
> there is no byte-order mark; when encoding, it uses big-endian byte
> order and writes a big-endian byte-order mark."
> 
> See:
> http://java.sun.com/j2se/1.4.2/docs/api/java/nio/charset/Charset.html
> 
> So if you get little endian, that means the class library you're using
> misbehaves. I'd make sure you're really using the right JVM.

Ok.  I'm running on a Debian Lenny system.  I installed the sun-java6-jre
package and am using fop 0.95 installed from the binary tarball.

Same thing.  I'll see about installing a sun built java and see if that makes
any difference.

Thanks!
  -Dale



---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org


Re: docbook bookmarks and xpdf

Posted by Jeremias Maerki <de...@jeremias-maerki.ch>.
If this is the result you get, you're using a non-conforming JVM. For
encoding the title, FOP uses "UTF-16" encoding for which you can find in
the spec:
"When decoding, the UTF-16 charset interprets a byte-order mark to
indicate the byte order of the stream but defaults to big-endian if
there is no byte-order mark; when encoding, it uses big-endian byte
order and writes a big-endian byte-order mark."

See:
http://java.sun.com/j2se/1.4.2/docs/api/java/nio/charset/Charset.html

So if you get little endian, that means the class library you're using
misbehaves. I'd make sure you're really using the right JVM.

On 09.09.2008 22:32:08 Dale P. Smith wrote:
> Dale P. Smith <dalepsmith <at> gmail.com> writes:
> 
> > Using dockbook and the dockbook-xsl stylesheets, along with setting the
> > fop1.extensions parameter to '1', I'm seeing some ugliness in xpdf.
> 
> I should have mentioned: fop 0.95, xpdf 3.02, docbook-xsl 1.74.0, java is from a
> Debian package (Lenny).  I'm pretty sure it was jre-6.  Unfortunately, that
> machine died over the weekend.
> 
> Here is (hopefully) a little more clear explanation of what is going on.
> 
> Basically, I'm getting bookmark /Title's that are like this:
> 
>  /Title
> <FFFE5000610072007400A00049002E00A0005000610072007400>
> 
> I'm pretty sure that's a little endian encoding, and I believe the pdf spec says
> it needs to be big endian.
> 
> Thanks,
>   -Dale
> 



Jeremias Maerki


---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org


Re: docbook bookmarks and xpdf

Posted by "Dale P. Smith" <da...@gmail.com>.
Dale P. Smith <dalepsmith <at> gmail.com> writes:

> Using dockbook and the dockbook-xsl stylesheets, along with setting the
> fop1.extensions parameter to '1', I'm seeing some ugliness in xpdf.

I should have mentioned: fop 0.95, xpdf 3.02, docbook-xsl 1.74.0, java is from a
Debian package (Lenny).  I'm pretty sure it was jre-6.  Unfortunately, that
machine died over the weekend.

Here is (hopefully) a little more clear explanation of what is going on.

Basically, I'm getting bookmark /Title's that are like this:

 /Title
<FFFE5000610072007400A00049002E00A0005000610072007400>

I'm pretty sure that's a little endian encoding, and I believe the pdf spec says
it needs to be big endian.

Thanks,
  -Dale



---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org