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 ...
-
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
-
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
Similar Threads
-
By Application Development in forum Adobe Indesign
Replies: 0
Last Post: 02-01-2007, 12:39 AM
-
By Application Development in forum Adobe Indesign
Replies: 0
Last Post: 08-22-2006, 02:42 AM
-
By Application Development in forum Adobe Indesign
Replies: 0
Last Post: 08-19-2006, 12:58 PM
-
By Application Development in forum Adobe Indesign
Replies: 5
Last Post: 06-10-2006, 02:09 PM
-
By Application Development in forum Adobe Indesign
Replies: 2
Last Post: 08-14-2004, 01:55 PM