You are viewing a plain text version of this content. The canonical link for it is here.
Posted to batik-users@xmlgraphics.apache.org by Lars Eirik Rønning <la...@gmail.com> on 2008/11/11 10:34:57 UTC
PDFTranscoder - preserve text
Hi.I have tried to set the following in my svg file :
<text style="fill:#FFFFFF; font-family:'LucidaCalligraphy-Italic';
font-size:24;" space="preserve">
<tspan x="0" dy="34">This is my test</tspan>
<tspan x="0" dy="69">new line
test</tspan>
<tspan x="0" dy="34">
start</tspan>
<tspan x="0" dy="375">Multiple lines test?</tspan>
</text>
When i transcode my pdf the only one space is added.. thus making all right
aligned text here appear as it if was only one space apart from new line for
instance..
How can i make sure that this is correctly rendered through the pdf
transcoder..
Thanks guys, you really do help!
Re: PDFTranscoder - preserve text
Posted by Lars Eirik Rønning <la...@gmail.com>.
once again i need to thank you Thomas.Its amazing how you guys respond and
help!
Thank you!
On Tue, Nov 11, 2008 at 11:30 AM, <th...@kodak.com> wrote:
>
> Hi Lars,
>
> "Lars Eirik Rønning" <la...@gmail.com> wrote on 11/11/2008 04:34:57
> AM:
>
> > I have tried to set the following in my svg file :
>
> >
> > <text style="fill:#FFFFFF; font-family:'LucidaCalligraphy-Italic';
> font-size:24;"
> > space="preserve">
>
> That attribute has to be xml:space="preserve"
> You can add such an attribute through the DOM with the
> following setAttributeNS call.
>
> element.setAttributeNS("http://www.w3.org/XML/1998/namespace"
> "xml:space",
> "preserve");
>
> The XML namespace URI is also available as:
> org.apache.batik.util.XMLConstants.XML_NAMESPACE_URI
>
> > How can i make sure that this is correctly rendered through the pdf
> > transcoder..
>
> I think the above will do it.
>
Re: PDFTranscoder - preserve text
Posted by th...@kodak.com.
Hi Lars,
"Lars Eirik Rønning" <la...@gmail.com> wrote on 11/11/2008 04:34:57
AM:
> I have tried to set the following in my svg file :
>
> <text style="fill:#FFFFFF; font-family:'LucidaCalligraphy-Italic';
font-size:24;"
> space="preserve">
That attribute has to be xml:space="preserve"
You can add such an attribute through the DOM with the
following setAttributeNS call.
element.setAttributeNS("http://www.w3.org/XML/1998/namespace"
"xml:space",
"preserve");
The XML namespace URI is also available as:
org.apache.batik.util.XMLConstants.XML_NAMESPACE_URI
> How can i make sure that this is correctly rendered through the pdf
> transcoder..
I think the above will do it.