Skip to main content
Known Participant
September 17, 2010
Question

Exported XML size

  • September 17, 2010
  • 1 reply
  • 724 views

Hi

My problem is with the size of the xml that is exported from my text flow.

I am just writting the two words bold and italic, make the first bold and second italic in my text flow and the XML exported is following....

<TextFlow  color="0x0" direction="ltr" fontFamily="Arial" fontSize="18"  lineBreak="explicit" paddingBottom="10" paddingLeft="10" paddingRight="10"  paddingTop="10" whiteSpaceCollapse="preserve" xmlns="http://ns.adobe.com/textLayout/2008"><p><span  fontWeight="bold">B</span><span  alignmentBaseline="useDominantBaseline" backgroundAlpha="1"  backgroundColor="transparent" baselineShift="0" blockProgression="tb"  breakOpportunity="auto" cffHinting="horizontalStem" color="0x0"  columnCount="auto" columnGap="20" columnWidth="auto" digitCase="default"  digitWidth="default" direction="ltr" dominantBaseline="auto"  firstBaselineOffset="auto" fontFamily="Arial" fontLookup="device" fontSize="18"  fontStyle="normal" fontWeight="bold" justificationRule="auto"  justificationStyle="auto" kerning="auto" leadingModel="auto"  ligatureLevel="common" lineBreak="toFit" lineHeight="120%" lineThrough="false"  locale="en" paddingBottom="0" paddingLeft="0" paddingRight="0" paddingTop="0"  paragraphEndIndent="0" paragraphSpaceAfter="0" paragraphSpaceBefore="0"  paragraphStartIndent="0" renderingMode="cff" tabStops="" textAlign="start"  textAlignLast="start" textAlpha="1" textDecoration="none" textIndent="0"  textJustify="interWord" textRotation="auto" trackingLeft="0" trackingRight="0"  typographicCase="default" verticalAlign="top">old</span><span  alignmentBaseline="useDominantBaseline" backgroundAlpha="1"  backgroundColor="transparent" baselineShift="0" blockProgression="tb"  breakOpportunity="auto" cffHinting="horizontalStem" color="0x0"  columnCount="auto" columnGap="20" columnWidth="auto" digitCase="default"  digitWidth="default" direction="ltr" dominantBaseline="auto"  firstBaselineOffset="auto" fontFamily="Arial" fontLookup="device" fontSize="18"  fontStyle="normal" fontWeight="normal" justificationRule="auto"  justificationStyle="auto" kerning="auto" leadingModel="auto"  ligatureLevel="common" lineBreak="toFit" lineHeight="120%" lineThrough="false"  locale="en" paddingBottom="0" paddingLeft="0" paddingRight="0" paddingTop="0"  paragraphEndIndent="0" paragraphSpaceAfter="0" paragraphSpaceBefore="0"  paragraphStartIndent="0" renderingMode="cff" tabStops="" textAlign="start"  textAlignLast="start" textAlpha="1" textDecoration="none" textIndent="0"  textJustify="interWord" textRotation="auto" trackingLeft="0" trackingRight="0"  typographicCase="default" verticalAlign="top"> </span><span  alignmentBaseline="useDominantBaseline" backgroundAlpha="1"  backgroundColor="transparent" baselineShift="0" blockProgression="tb"  breakOpportunity="auto" cffHinting="horizontalStem" color="0x0"  columnCount="auto" columnGap="20" columnWidth="auto" digitCase="default"  digitWidth="default" direction="ltr" dominantBaseline="auto"  firstBaselineOffset="auto" fontFamily="Arial" fontLookup="device" fontSize="18"  fontStyle="italic" fontWeight="normal" justificationRule="auto"  justificationStyle="auto" kerning="auto" leadingModel="auto"  ligatureLevel="common" lineBreak="toFit" lineHeight="120%" lineThrough="false"  locale="en" paddingBottom="0" paddingLeft="0" paddingRight="0" paddingTop="0"  paragraphEndIndent="0" paragraphSpaceAfter="0" paragraphSpaceBefore="0"  paragraphStartIndent="0" renderingMode="cff" tabStops="" textAlign="start"  textAlignLast="start" textAlpha="1" textDecoration="none" textIndent="0"  textJustify="interWord" textRotation="auto" trackingLeft="0" trackingRight="0"  typographicCase="default"  verticalAlign="top">italic.</span><span></span></p></TextFlow>

I have to send this XML to server to plot on client machine but sometimes the size of XML become so large that it crashes my sessions.

Any Solution?

This topic has been closed for replies.

1 reply

Participating Frequently
September 17, 2010

I don't know if it solve your problem but try this :

TextConverter.export(myTextArea.textFlow, TextConverter.TEXT_LAYOUT_FORMAT, ConversionType.STRING_TYPE).toString()

Known Participant
September 20, 2010

No ,it doesn't solve my problem.

Adobe Employee
September 20, 2010

What are you doing to apply the bold and italic? If you are using getFormatOfRange, and take the result and do setFormatOfRange, it will unfortunately have this result. getFormatOfRange returns all properties including defaults, and when you call setFormatOfRange they get set into the element as user choice. If that's the problem, best solution is to apply the attributes using TLF directly. The right way to do this likely depends on what sort of text component you are using, but one possibility is to get the textFlow and call:

format.fontWeight = FontWeight.BOLD;

IEditManager(textFlow.interactionManager).applyLeafFormat(format);

- robin