Export text from a text frame as Indesign tagged text or RTF - Adobe Indesign

This is a discussion on Export text from a text frame as Indesign tagged text or RTF - Adobe Indesign ; Hi I like to export text from a text frame into the memory (PMString or string) in the Indesign tagged text or RTF format. I like to export not the whole text, only parts of it. - How can I ...

+ Reply to Thread
Results 1 to 2 of 2

Export text from a text frame as Indesign tagged text or RTF

  1. Default Export text from a text frame as Indesign tagged text or RTF

    Hi

    I like to export text from a text frame into the memory (PMString or string) in the Indesign tagged text or RTF format. I like to export not the whole text, only parts of it.

    - How can I do that?
    - IExportProvider?

    A tip or a code snippet would be great.

    Thanks a lot
    Hans

  2. Default Re: Export text from a text frame as Indesign tagged text or RTF

    Export works on a selection so only doing parts is fine. If you want to work without a selection suite you can use:

    InterfacePtr<ITextTarget> mtTarget((ITextTarget*)CreateObject(kTextSuiteBoss, IID_ITEXTTARGET));

    mtTarget->SetTextUnmanaged(textModelRef, RangeData(s, e, RangeData::kLeanForward));

    to do the export in tagged text

    InterfacePtr<IExportProvider> provider((IExportProvider*)CreateObject(kTaggedTextExportFilterBoss, IID_IEXPORTPROVIDER));

    InterfacePtr<IDocument> doc(......);
    IXferBytes xfer; // some class that implements this interface and does what you want.

    InterfacePtr<IPMStream> pmStream(StreamUtil::CreateMemoryStreamWrite(&xfer));

    provider->ExportToStream(pmStream, doc.get(), mtTarget, "InDesign Tagged Text", kSuppressUI);

    Ian

+ Reply to Thread

Similar Threads

  1. InDesign CS Text Frame Fitting or Resizing.and Text in Cells Disappears
    By Application Development in forum Adobe Indesign
    Replies: 0
    Last Post: 02-01-2007, 12:39 AM
  2. Re: AS--InDesign CS2--Text Frame
    By Application Development in forum Adobe Indesign
    Replies: 0
    Last Post: 08-22-2006, 02:42 AM
  3. Re: AS--InDesign CS2--Text Frame
    By Application Development in forum Adobe Indesign
    Replies: 0
    Last Post: 08-19-2006, 12:58 PM
  4. Table export in tagged text format
    By Application Development in forum Adobe Indesign
    Replies: 5
    Last Post: 06-10-2006, 02:09 PM
  5. importing graphics using InDesign tagged text
    By Application Development in forum Adobe Indesign
    Replies: 2
    Last Post: 08-14-2004, 01:55 PM