Exporting Text as InDesign Tagged Text in CS3

Hello All,
I am facing a problem exporting the Text from InDesign Document as InDesign Tagged Text. It use to work properly in CS2. But in CS3 the IExportProvider interface CanExportThisFormat() always returns false for the format name "Indesign Tagged Text".
InterfacePtr<IPMStream>filetream(StreamUtil::CreateFileStreamWriteLazy(sysfile));
iiExportProvider->ExportToStream(filetream, doc, iselMgr, formatNameOfInterest, kSuppressUI);
If the CanExportThisFormat() function is ignored and directly tried to export with the above ExportToStream() function it still fails to export into stream.
Has the way to export the InDesign Tagged Text been changed in CS3.
Can any one whos tried this please help as its urgent.
Thank you in advance.
Regards
Farzana.

Hi Vikas
I export files from Photoshop as png's at 72 dpi.  
Here is our current holding page.  http://www.iheartmylife.co.uk/ All the text on this page has been loaded in as png's from Photoshop along with the image. As you can see none of it is as sharp as it could be.
Many thanks for your assistance.
James

Similar Messages

  • How do I import an InDesign tagged text file into multiple pages and export as .ps or .pdf using Jav

    I have an InDesign tagged text file I've translated from .xml. I need to automate the following steps:
    1 - access specific InDesign template (eg. ABC_template.ind)
    2 - import tagged text file into InDesign
    3 - autoflow text to END of document (normally around 3-5 pages)
    4 - save document as either .ps or .pdf file
    5 - where the input file stub name matches the output stub name (eg., OrigName.txt outputs as OrigName.pdf).
    I would like to completely automate this whole process using JavaScript (because I don't know anyone that knows AppleScript). I've automated the first part using a perl script. I've been trying to find sample snipits of JavaScript that would do one or more of the items listed above, but am having a hard time finding what I need.
    Please, I'm desperate!! Can any of you InDesign scripting guru's out there help me??
    Thanks in advance!!
    LindaD

    Hi Linda,
    I might be able to help you out. You can contact me by email (click on my user name for the address), or if you post your email here.

  • InDesign Tagged Text for Cross-reference Entries

    I'm transforming XML to InDesign Tagged Text. The XML has index codes. For regular page entry type entries I'm having no problem outputting to the appropriate InDesign Tagged Text markup. However, I cannot figure out how to code cross-reference type entries. The document "Using Adobe InDesign Tagged Text CS5 Tagged Text" is extremely limited in its usefulness as it does not list all possible values for tag type tags, etc. I've tried dozens of tag combos and guesses at values. None have worked. Also, for some reason, even though I can create a "See x" type reference in the InDesign document, when I export to InDesign Tagged Text to look at the code, those tags are not included in the export.
    Does anyone have a more definitive list of possible IDTT index tag values?

    I have been exporting various things to IDTT to see what the result would be, with nothing really helpful as a result. I'll try hyperlinks, but reading of the Adobe guide to InDesign Tagged Text and also just looking at the InDesign scripting object model leads me to believe that there must be specific tags to create index-specific cross-reference tags.

  • Need help with creating text anchors with tagged text.

    Can anyone tell me how to determine the correct value for a "Hyperlink Dest Index" value?
    I have a script which creates a tagged text file that specifies about about 280 pages of tables (thank heavens for autoflow) , and would like to add live links between different parts. I can create a text anchor and a hyperlink to it in InDesign. The tagged text definition for the link source is simple and in-line and exports and imports nicely as tagged text. However, I see that all the link destinations, aka  text anchors, are all exported at the very end of the tagged text files as global definitions, and thier location iin the document is specified by the property HyperlinkDestIndex. However, I can't figure out how to set this value progammatically. I've spent over an hour exporting links, and it sure isn't anything as obvious as character index in the story.
    Any advice appreciated,
      Read Roberts

    Read, I'm not sure the following is going to help you. It works for external hyperlinks, but you want internal links, right? Anyway, it might give you some clues.
    A funny thing: I was reviewing some script where I got links to work, and I spotted a tiny coding error. Links seemed to be defined by two separate identifiers: a "link name", which is what appears in Edit Hyperlink dialog, and a "Dest Key", which seems to be a simple increasing number. However, due to aformentioned coding error, the dest keys between the actual link and its definition were off by '1', so there was no way that ought to have matched. But it still worked! So "Dest Key" is a red herring ...
    As far as I understand, it works like this (for hyperlinks): in your text, you have
    HplName -- this is actually the 'title' that appears in the Hyperlink palette
    HplDest -- this is the 'internal name'
    DestKey. Hm. Perhaps you could omit this, per above obsvn.
    CharStyleRef, the name of the auto-applied style
    Hid -- seems to be always '0'
    HplOff: the "offset" from this entire command to the start of the hyperlink, in InDesign characters.
    HplLen: the "length" from the hyperlinked text, in InDesign characters.
    and in the list of 'proper' definitions, those that appear at the very end of your file:
    HplDestDfn -- the internal name again
    DestKey -- see above
    HplDestUrl -- finally! A real URL! (But you must escape lots of characters, such as the forward slash and colon.)
    Hid -- again, always seems to be '0'.
    Some of these items are perhaps optional, but experimenting with what may be left out only lead to frustration The Tagged Text guide is far from complete, as I'm sure you already knew.
    As noted, some (or all) of the named items need a backslash escape for a few characters, but I can't find a definitive way to determine in advance what is 'good' and what is 'not good'.
    The following script creates a Tagged Text file with a couple of working hyperlinks in it -- I don't know if this is of any help for your internal links.
    var hyperlinkDest = [];
    var text = "This is some text with a link [http://www.jongware.com/idjshelp.html] and another one [http://forums.adobe.com/thread/1014617?tstart=0] in it.";
    var tagtext = text.replace (/\[(.+?)\]/g, function (full, match)
                        return makelink (match, 'title:'+match, match, match);
    // When done processing plain text, add the destinations at the end:
    tagtext += hyperlinkDest.join('');
    tagFile = File(Folder.myDocuments+'/__tmp.txt');
    if (tagFile.open('w') == false)
              alert ("Unable to create temporary file!");
              exit();
    if (File.fs == "Windows")
              tagFile.write ("<ASCII-WIN>\n");
    else
              tagFile.write ("<ASCII-MAC>\n");
    tagFile.write ("<dcs:HYPERLINK=<cu:1>>\n");
              tagFile.write (tagtext);
    tagFile.close();
    // 'text' is the actual text that will be clickable
    // 'title' is what will appear in the Hyperlinks palette
    // 'name' is the internal name in the Edit Hyperlink dialog
    // 'url' is the actual URL that will be linked to
    function makelink (text, title, name, url)
              var destkey = hyperlinkDest.length;
              // In URL you must escape forward slashes and colons
              // .. and some other characters as well, by the way. There seems to be no list
              url = url.replace(/\//g, '\\/').replace(/:/g, '\\:');
              hyperlinkDest.push ('<HplDestDfn:=<HplDestName:'+name+'><DestKey:'+String(destkey)+'><HplDestUrl:'+url+'><Hid:0>>');
              return '<Hpl:=<HplName:'+title+'><HplDest:'+name+'><DestKey:'+String(destkey)+'><CharStyleRef:HYPERLINK><Hid:0><Brdrv:0><HplOff:0><HplLen:'+String(text.length)+'>>'+text;

  • MojikumiElement Tagged Text export junk in InDesign CS6

    Hello,
    Our InDesign Tagged Text exports have suddenly been infested with large amounts of the following code, repeating over and over.  We've managed to munge it out on the other side of the process, but can't figure out how it got there in the first place.  It's making the files take much longer to process, but otherwise seems to have no effect whatsoever.  My understanding is that I shouldn't be seeing anything Mojikumi related unless I'm using the Japanese version of ID/CS, or embedding Japanese characters.
    Any ideas why this is happening and how to make it stop?
    <snip>
    <ASCII-MAC>
    <Version:8><FeatureSet:InDesign-Roman><ColorTable:=<Black:COLOR:CMYK:Process:0,0,0,1>>
    <DefineMojikumiStyle:kMojikumiDefaultName1=<MojikumiElement:0,0,0,0,0><MojikumiElement:0,0 ,0,0,0><MojikumiElement:0,0,0,0,0><MojikumiElement:0,0,0,0,0><MojikumiElement:0,0,0,0,0><M ojikumiElement:0,0,0,0,0><MojikumiElement:0,0,0,0,0><MojikumiElement:0,0,0,0,0><MojikumiEl ement:0,0,0,0,0><MojikumiElement:0,0,0,0,0><MojikumiElement:0,0,0,0,0><MojikumiElement:0,0 ,0,0,0><MojikumiElement:0,0,0,0,0><MojikumiElement:0,0,0,0,0><MojikumiElement:0,0,0,0,0><M ojikumiElement:0,0,0,0,0><MojikumiElement:0,0,0,0,0><MojikumiElement:0,0,0,0,0><MojikumiEl ement:0,0,0,0,0><MojikumiElement:0,0,0,0,0><MojikumiElement:0,0,0,0,0><MojikumiElement:0,0 ,0,0,0><MojikumiElement:0,0,0,0,0><MojikumiElement:0,0,0,0,0><MojikumiElement:0,0,0,0,0><M ojikumiElement:0,0,0,0,0><MojikumiElement:0,0,0,0,0><MojikumiElement:0,0,0,0,0><MojikumiEl ement:0,0,0,0,0><MojikumiElement:0,0,0,0,0><MojikumiElement:0,0,0,0,0><MojikumiElement:0,0 ,0,0,0><MojikumiElement:0,0,0,0,0><MojikumiElement:0,0,0,0,0><MojikumiElement:0,0,0,0,0><M ojikumiElement:0,0,0,0,0><MojikumiElement:0,0,0,0,0><MojikumiElement:0,0,0,0,0><MojikumiEl ement:0,0,0,0,0><MojikumiElement:0,0,0,0,0><MojikumiElement:0,0,0,0,0><MojikumiElement:0,0 ,0,0,0><MojikumiElement:0,0,0,0,0><MojikumiElement:0,0,0,0,0><MojikumiElement:0,0,0,0,0><M ojikumiElement:0,0,0,0,0><MojikumiElement:0,0,0,0,0><MojikumiElement:0,0,0,0,0><MojikumiEl ement:0,0,0,0,0><MojikumiElement:0,0,0,0,0><MojikumiElement:0,0,0,0,0><MojikumiElement:0,0 ,0,0,0><MojikumiElement:0,0,0,0,0><MojikumiElement:0,0,0,0,0><MojikumiElement:0,0,0,0,0><M ojikumiElement:0,0,0,0,0><MojikumiElement:0,0,0,0,0><MojikumiElement:0,0,0,0,0><MojikumiEl ement:0,0,0,0,0><MojikumiElement:0,0,0,0,0><MojikumiElement:0,0,0,0,0><MojikumiElement:0,0 ,0,0,0><MojikumiElement:0,0,0,0,0><MojikumiElement:0,0,0,0,0><MojikumiElement:0,0,0,0,0><M ojikumiElement:0,0,0,0,0><MojikumiElement:0,0,0,0,0><MojikumiElement:0,0,0,0,0><MojikumiEl ement:0,0,0,0,0><MojikumiElement:0,0,0,0,0><MojikumiElement:0,0,0,0,0><MojikumiElement:0,0 ,0,0,0><MojikumiElement:0,0,0,0,0><MojikumiElement:0,0,0,0,0><MojikumiElement:0,0,0,0,0><M ojikumiElement:0,0,0,0,0><MojikumiElement:0,0,0,0,0><MojikumiElement:0,0,0,0,0><MojikumiEl ement:0,0,0,0,0><MojikumiElement:0,0,0,0,0><MojikumiElement:0,0,0,0,0><MojikumiElement:0,0 ,0,0,0><MojikumiElement:0,0,0,0,0><MojikumiElement:0,0,0,0,0><MojikumiElement:0,0,0,0,0><M ojikumiElement:0,0,0,0,0><MojikumiElement:0,0,0,0,0><MojikumiElement:0,0,0,0,0><MojikumiEl ement:0,0,0,0,0><MojikumiElement:0,0,0,0,0><MojikumiElement:0,0,0,0,0><MojikumiElement:0,0 ,0,0,0><MojikumiElement:0,0,0,0,0><MojikumiElement:0,0,0,0,0><MojikumiElement:0,0,0,0,0><M ojikumiElement:0,0,0,0,0><MojikumiElement:0,0,0,0,0><MojikumiElement:0,0,0,0,0><MojikumiEl ement:0,0,0,0,0><MojikumiElement:0,0,0,0,0><MojikumiElement:0,0,0,0,0><MojikumiElement:0,0 ,0,0,0><MojikumiElement:0,0,0,0,0><MojikumiElement:0,0,0,0,0><MojikumiElement:0,0,0,0,0><M ojikumiElement:0,0,0,0,0><MojikumiElement:0,0,0,0,0><MojikumiElement:0,0,0,0,0><MojikumiEl ement:0,0,0,0,0><MojikumiElement:0,0,0,0,0><MojikumiElement:0,0,0,0,0><MojikumiElement:0,0 ,0,0,0><MojikumiElement:0,0,0,0,0><MojikumiElement:0,0,0,0,0><MojikumiElement:0,0,0,0,0><M ojikumiElement:0,0,0,0,0><MojikumiElement:0,0,0,0,0><MojikumiElement:0,0,0,0,0><MojikumiEl ement:0,0,0,0,0><MojikumiElement:0,0,0,0,0><MojikumiElement:0,0,0,0,0><MojikumiElement:0,0 ,0,0,0><MojikumiElement:0,0,0,0,0><MojikumiElement:0,0,0,0,0><MojikumiElement:0,0,0,0,0><M ojikumiElement:0,0,0,0,0><MojikumiElement:0,0,0,0,0><MojikumiElement:0,0,0,0,0><MojikumiEl ement:0,0,0,0,0><MojikumiElement:0,0,0,0,0><MojikumiElement:0,0,0,0,0><MojikumiElement:0,0 ,0,0,0><MojikumiElement:0,0,0,0,0><MojikumiElement:0,0,0,0,0><MojikumiElement:0,0,0,0,0><M ojikumiElement:0,0,0,0,0><MojikumiElement:0,0,0,0,0><MojikumiElement:0,0,0,0,0><MojikumiEl ement:0,0,0,0,0><MojikumiElement:0,0,0,0,0><MojikumiElement:0,0,0,0,0><MojikumiElement:0,0 ,0,0,0><MojikumiElement:0,0,0,0,0><MojikumiElement:0,0,0,0,0>>
    </snip>
    TIA and much appreciated

    Hi Steve,
    I created a book in InDesign for traditional print. Now I need to convert it
    to a epub file for use on a ŒKindle¹.
    So my workflow is just in InDesign CS6, then I create a new document in the
    Œbook¹ format. Then I import the InDesign docs into the Œbook¹ dialogue
    window. You can choose the Œpreflight book¹ option in the Œbook¹ dialogue
    box and choose to see the errors as a PDF, which is what I¹ve been doing. I
    have errors on every page of the proposed Œepub¹ file.
    If I then drag that epub file to my ŒKindle preveiwer, it immediately says
    that it Œfailed to compile the book file¹, and there is nothing shown.
    Thanks,
    Nick.

  • Tagged Text and Hyperlinks

    I am attempting to create a document with two sections that are generated as tagged text via a database. This has worked for years. Now the client wants me to link a name in the first section with the appropriate name/description in the second section. The file will then be saved as a PDF. Seems pretty straight forward.
    Unfortunately, I cannot seem to get the right set of commands to make this work with tagged text. Whenever I want to do something new with tagged text I would just build a sample manually and then export the document to tagged text. From there it is pretty straight forward to reproduce.
    When I try this with my current sample, the exported files do not contain any code for the linking. The destination text appears to have some addition tags that reference them as the destinations, but the source text has no additional tags. I tried Adobe support, but they just said sure it works, but since you are doing scripting we can't help! I haven't even gotten that far yet! I even sent them the sample files and they ignored them.
    Has anyone done this or proven that it can't be done?

    Marc,
    I'm a newbie with InDesign. I'm trying to do something similar as you are. And I'm not having much luck with Hypertext links. Have you made and progress? I've just converted some jobs from FrameMaker to InDesign. (My customer's request). I had much better luck with FrameMaker.
    Thanks,
    Roger

  • Soft Returns in Tagged Text

    Our Pindar AgilityCMS content managment system flows text to an InDesign page using a special PlugIn.
    Some characters are stored natively (store an "a", get an "a" on the page), while other special characters are stored using Tagged Text or Unicode. A return can be either <0x000D> or \u000D. This is especially useful because we can output through one of four "channels".... InDesign, Quark, HTML or as entered in the content manager. The return can now be \p in Quark or <BR> in HTML.  A non-breaking space, for example, can be \u00A0 in the InDesign channel, &nbsp; in HTML or <\!s> in Quark. When we insert the "special character" in the Data Editor of our content system, it might be displayed as [sp], but it will resolve correctly regardless of which channel we publish to.
    The problem is that unlike Quark, Adobe does not provide for a "soft return" or forced line break. Sure, you can type one from the keyboard with shift+return, and purists will argue that you'd never want to store a soft (discretionary) return in any type of tagged text or a content management system. However, all our text is set flush left, ragged right, and we frequently want to force line breaks for readability, and do so consistently.
    Instead of:
    On Sale Now Buy One, Get
    One Free
    we always want
    On Sale Now
    Buy One, Get One Free
    Again, this is a problem whether you store your data in simple tagged text files, or if you bring it in via a complex PlugIn, as we do.
    There are many, many threads on this site and elsewhere that discuss this shortcoming. Does Adobe plan to support Soft Returns in Tagged Text with some kind of special tag?

    Your question is predicated on some false assumptions, and I'm afraid Peter, Peter, and Stix didn't quite pick that up in their replies. (This gives me pause since normally they're all very detail-oriented).
    As I told you when you posted in the thread from 2009, "InDesign Tagged Text supports forced line breaks just fine."
    You write:
    Does Adobe plan to support Soft Returns in Tagged Text with some kind of special tag?
    Adobe's import mechanism does indeed support soft returns. There's no need to speculate on Adobe's plans, which is the direction the other replies went to.
    With that in mind, let's move to your actual question:
    Our Pindar AgilityCMS content managment system flows text to an InDesign page using a special PlugIn. 
    Some characters are stored natively (store an "a", get an "a" on the page), while other special characters are stored using Tagged Text or Unicode. A return can be either <0x000D> or \u000D. This is especially useful because we can output through one of four "channels".... InDesign, Quark, HTML or as entered in the content manager. The return can now be \p in Quark or <BR> in HTML.  A non-breaking space, for example, can be \u00A0 in the InDesign channel, &nbsp; in HTML or <\!s> in Quark. When we insert the "special character" in the Data Editor of our content system, it might be displayed as [sp], but it will resolve correctly regardless of which channel we publish to.
    I think you need to address this question to your support channel for Pindar AgilityCMS. Indeed, in IDTT <000A> represents a shift-return. Here's a screenshot of a test textframe:
    and when exported to InDesign Tagged Text, it produces:
    <ASCII-MAC>
    <Version:7><FeatureSet:InDesign-Roman><ColorTable:=<Black:COLOR:CMYK:Process:0,0,0,1>>
    <DefineParaStyle:NormalParagraphStyle=<Nextstyle:NormalParagraphStyle>>
    <ParaStyle:NormalParagraphStyle>Paragraph one
    <ParaStyle:NormalParagraphStyle>Paragraph two<0x000A>P2/Line two
    I presume you have tried <0x000A> as discussed in the prior thread.
    I suppose it's remotely possible this is a Mac/PC issue, because the two operating systems do you different line break characters.
    Anyhow, once again, your criticism of InDesign and Adobe is false and unfair. And if you have a problem with a 3rd party plugin, those are really the people you need to talk to.
    Still, it might be wise to get it working with plain File > Place. Try testing my above IDTT file. Or exporting your own from a sample textframe like the one I used.

  • Importing Adobe Tagged Text

    Hello,
    So here's what's happening…
    I've installed a Wordpress plugin that exports posts as Adobe Tagged Text.
    When I import, the text still shows up marked up with tags, just as it looks in the .txt file:
    <ANSI-MAC>
    <DefineParaStyle:NormalParagraphStyle=<Nextstyle:NormalParagraphStyle><cColor:Registration ><cSize:10><cLeading:11><pFirstLineIndent:12><cFont:Times New Roman>>
    <ParaStyle:NormalParagraphStyle>This <cTypeface:Italic>is<cTypeface:> a <cTypeface:Bold>test<cTypeface:>
    <ParaStyle:NormalParagraphStyle>Test paragraph
    <ParaStyle:NormalParagraphStyle>Testing this out
    Does it have something to do with the first line of code, <ANSI-MAC>?
    Regards,
    Eric

    You're using a very old InDesign workflow which I've never used. But it's referenced in Olav Kvern's and David Blatner's excellent "Real World InDesign" (I'm looking at the CS4 edition).
    On page 235, it reads, "The first characters in a tagged text file must state the character encoding (ASCII, ANSI, UNICODE, BIG5, or SJIS), followed by the platform (MAC or WIN). So the typical Windows tagged text begins with <ASCII-WIN> , and the Macintosh version begins with <ASCII-MAC> ."
    It looks to me like it should work. Have you tried exporting some tagged text from InDesign to see how it looks? File > Export > Adobe InDesign Tagged Text.

  • Import ID tagged text file results in paragraph style overrides

    I have been working on a project that requires the import of a large amount of information from a database. I have defined all the paragraph styles in InDesign and have a program to apply the paragraph style to the database information creating the InDesign Tagged Text file. When I place it into my document the paragraph styles are recognized but there is an override. If I clear the override, the text looks fine. I have an example document that I have exported and imported some text to rule out the program, but even in this case, an override occurs. Text is there, the paragraph format is there, but font size (for example) is wrong. Where should I be looking to correct this issue?
    Harold

    I don't recognize any of those being wrong, per se. I have the file on another computer, so I mocked up yet another one. Sorry
    Again in this one I did ASCII export, no fancy characters. And this one demonstrates the problem, too. I have two kinds of paragraphs. A big one and a small one. I create those paragraph styles. I select the only two lines in the file. Export and then bring them in underneath themselves to compare.
    The paragraph styles for the newly Placed paragraphs are gone. The font color is the same. But the font size and font have not changed.
    I manually edited the IDTT and removed the <Japanese feature> tag. Placed it again. Font color is the same, but the size and font are wrong.
    In other words, my problem is that ID does not seem to apply the paragraph style to the text when it is imported. Aren't the font size and font defined in the Paragraph Style?
    My end goal is to define some paragraph styles and create the IDTT automatically from a database. My hope was that the paragraphs would be formated properly based on the predefined styles when the IDTT comes in. I cannot get it to do this even for a pared down example. Aren't other users doing this?
    Here is the IDTT on pastebin (with the <Japanese...> tag removed)
    http://pastebin.com/Vdc6NVDV
    And what it looks like after the intial Place with <Japanese...> tag in, edited line from Small to "Deleted Japanese feature...", removed tag from IDTT and then did another Place.

  • Import tagged text without overwriting formatting?

    When processing an INDD file in InDesign Server CS5, we are importing text that contains Tagged Text tags.  The tags are being properly applied, but we are having an issue with the formatting in the INDD file being overwritten.
    For example: We have a selection of text that is formatted using a specific font type in the INDD file.  The tagged text being imported only has tags that defines the size of the font.  When the selection of text is replaced with the tagged text, the font type is replaced with the default font, rather than leaving it as it was even though we never defined the font type in the tagged text. 
    Any ideas on how we can apply tagged text but still retain any text formatting that was not specifically defined in the tagged text?
    Thanks!

    I am using
    InterfacePtr<IK2ServiceProvider> service(registry->QueryServiceProviderByClassID( kImportProviderService, kTaggedTextImportFilterBoss));

  • Problems importing tagged text

    IDD CS5.5, 7.5.2
    what I do
    prepare IDD tagged text file, using DOS/Windows line ends and ANSII encoding
    open IDD CS5.5 file with formatted content
    select all content
    File > Place InDesign tagged text file, using "show list of problem tags" option
    what I get
    no angle brackets imported, no errors in the list of problem tags …
    74 paragraphs, all using the first paragraph style specified in the tagged text
    I wish IDD tagged text were as easy to get on with as FrameMaker's MML … that would also make it easier for me to start with one tagged source file and use the content in different applications with a minimum of effort. Any tips on _exactly_ what has to be done to placate the IDD Import goblins welcome!

    Give this script a try:
    // DESCRIPTION: This InDesign script reads the tags of an imported MML file and applies their corresponding paragraph styles.
    // USAGE: Place the MML file in InDesign. Using the Text tool, select all or part of the imported text. Run this script.
    var myDocument = app.activeDocument;
    if (app.documents.length != 0){
    //If the selection contains more than one item, the selection
    //is not text selected with the Type tool.
    if (app.selection.length == 1){
    //Evaluate the selection based on its type.
      switch (app.selection[0].constructor.name){
       case "Character":
       case "Word":
       case "TextStyleRange":
       case "Line":
       case "Paragraph":
       case "TextColumn":
       case "Text":
        convertMML(app.selection[0]);
       break;
       default:
        alert("Please select all or part of the text using the Text Tool.");
       break;
    } else {
      alert("No valid selection.");
    function convertMML(theSelection) {
    // this sequence collects the names of the paragraph styles in the MML file
    var theContent = theSelection.contents;
      var theParagraphs = theContent.split("\r");
      var theParagraphStyles = [];
      for (var i = 0; i < theParagraphs.length; i++) {
        if (theTag = theSelection.paragraphs[i].contents.match(/<!DefineTag (.+?)>/)) {
          theParagraphStyles.push(theTag[1]);
    // ********* this sequence adds dummy paragraph styles in the document, if necessary
    for (var i = 0; i < theParagraphStyles.length; i++) {
      var currentStyle = theParagraphStyles[i];
            try { myDocument.paragraphStyles.add({ name: currentStyle }) } catch(err){};
    // ********* This sequence set the preferences of the Grep queries
    app.findChangeGrepOptions.includeFootnotes = true;
    app.findChangeGrepOptions.includeHiddenLayers = false;
    app.findChangeGrepOptions.includeLockedLayersForFind = false;
    app.findChangeGrepOptions.includeLockedStoriesForFind = true;
    app.findChangeGrepOptions.includeMasterPages = true;
    app.findGrepPreferences = NothingEnum.nothing;
    app.changeGrepPreferences = NothingEnum.nothing;
    // ********* The action begins here
    // ********* This sequence removes spaces and/or TABs in the beginning of the lines
    app.findGrepPreferences.findWhat = '^\\s+';
    app.changeGrepPreferences.changeTo = '';
    myDocument.changeGrep();
    // ********* This sequence consolidates multiple paragraph returns into one
    app.findGrepPreferences.findWhat = '\\r\\r+';
    app.changeGrepPreferences.changeTo = '\\r';
    myDocument.changeGrep();
    // ********* This sequence removes the header and the paragraph declarations
    app.findGrepPreferences.findWhat = '((^<MML>\\r)|(^<!DefineTag .+?>\\r))';
    app.changeGrepPreferences.changeTo = '';
    myDocument.changeGrep();
    // ********* Now that everything is cleared up and in place, we can make the required changes
    for (var i = 0; i < theParagraphStyles.length; i++) {
      app.findGrepPreferences = NothingEnum.nothing;
      app.changeGrepPreferences = NothingEnum.nothing;
      var currentStyle = theParagraphStyles[i];
      var theGrepString = '^<' + currentStyle + '>';
      app.findGrepPreferences.findWhat = theGrepString;
      app.changeGrepPreferences.appliedParagraphStyle = myDocument.paragraphStyles.itemByName(currentStyle);
      myDocument.changeGrep();
      app.findGrepPreferences = NothingEnum.nothing;
      app.changeGrepPreferences = NothingEnum.nothing;
      app.findGrepPreferences.findWhat = theGrepString;
      app.changeGrepPreferences.changeTo = '';
      myDocument.changeGrep();
    It worked in your sample. To install it, select the text between the multi-hyphens lines, copy it to a text editor, save it with the ".js" or ".jsx" extension and put it on your Scripts Panel folder.
    To run it, place the MML in InDesign as unformatted text, select everything with the Text tool and double click the script in the Scripts panel. All the tags will be eliminated and the paragraphs will be formatted according with the MML tags. Be aware that this script doesn't contemplate character styles and any other formatting; only paragraph tags, like your sample.
    Hope it helps.

  • Auto-loading of figures using Tagged text

    Hi All,
    Is there any possiblity to load the figures automatically while loading the InDesign tagged text files, but it's possible using XTags in Quark.
    Thanks,
    Praveen

    Ok, no problem i found this help articles:
    https://support.mozilla.org/en-US/kb/how-clear-firefox-cache
    http://www.youtube.com/watch?v=OukBlXfOP8Y

  • Copy and paste from InDesign CS2 to Illustrator CS3

    Hi,
    I'm a Mac Illustrator CS3 user and having trouble copying text from InDesign CS2 to Illustrator CS3.
    After copy text from InDesign (allowed), I'll go to Illustrator to paste it, but none of the text appear. I'm not sure if there any other step should I take before paste?
    Any help are much appreciated.
    Tq

    I can't find Clipboard Preferences in either InDesign or Illustrator. Help me.
    I'm using Mac Illustrator CS3.
    TQ

  • Creating Cross-References in an InDesign Tags file

    I am tyring to create cross-refs to images in a tagged text file. Typically this will be used to create references like "See our display ad on Page n". I have studied the tags documentation and I can see how to create the cross-reference tag but I can't see how to link the tag to the appropriate image. If I create a test document, insert a couple of pictures, and add cross-references to those pictures, when I export the text to a tagged text file it refers to the pictures as, for example, "<HyperlinkDest:Anchor>" and "<HyperlinkDest:Anchor 2>". But I can't see how to specify exactly which image "<HyperlinkDest:Anchor>" refers to - there doesn't appear to be an "anchor" tag around the picture tp identify it.
    So how does this work?
    TIA
    Pat

    Hi Pat,
    BEfore exporting the tagged text.
    1. You have to create the Intereactive->New Hyperlink Destination [Figure 1.1].
    2. Create a Intereactive->New Hyperlink [See Figure 1.1] in this select the dest as [Figure 1.1]
    3. Then export as tagged text.
    Regards,
    Ramkumar .P

  • Exporting Table from Indesign to tagged text.

    Hi, all!<br />I need to export table from InDesign to tagged text by the script.<br />I found ExportAllStories.jsx in samples.<br />It's good example but I have some questions<br />1. In my document more then one table and I need to export only some of them. So, how can I export only one of them? May be Tables have some "labels" or something other differential sign?<br />2. How can I ser encoding type of distanation file (by the default InDesing set <ASCII-WIN>, but I'm need to set <Unicode>).

    Edit>InCopy>Export All Strories.
    Open the INDD in InCopy.
    This assumes everyone involved has access to the files.

Maybe you are looking for