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 ma...@net.hr on 2003/07/16 14:08:51 UTC
WriteBeyondContentLengthException
Hi all,
i tried to include croatian letters into pdf. i made it.
i call fop servlet.
in servlet i write:
OutputStream op = response.getOutputStream();
also, i made document object and i transformed it in String
String output = serializer.outputString();
and now i wrote
response.setContentLength(output.length());
result of transformation is
WriteBeyondContentLengthException
i persume that croatian letters are in unicode and because of that they need
more bytes. how to solve it?
thanks
--
Besplatni e-mail - http://webmail.iskon.hr/
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-user-unsubscribe@xml.apache.org
For additional commands, e-mail: fop-user-help@xml.apache.org
Re: WriteBeyondContentLengthException
Posted by "J.Pietschmann" <j3...@yahoo.de>.
mali_djuro@net.hr wrote:
> also, i made document object and i transformed it in String
>
> String output = serializer.outputString();
>
> and now i wrote
>
> response.setContentLength(output.length());
> result of transformation is
>
> WriteBeyondContentLengthException
>
> i persume that croatian letters are in unicode and because of that they need
> more bytes. how to solve it?
Perhaps
byte output[]=serializer.toString().getBytes()
response.setContentLength(output.length);
although I don't understand where the serializer comes from
and why you think you'll have to stringify it. PDF is binary,
and you should use a ByteArrayOutputStream as shown in the
sample servlet.
J.Pietschmann
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-user-unsubscribe@xml.apache.org
For additional commands, e-mail: fop-user-help@xml.apache.org