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));

Similar Messages

  • Selectively ignore Problem Tags Dialog  while importing Tagged Text in CS5.5

    Hi
    My script imports tagged text and places it in selected frames. Due to the tag creation process used, I occasionally get a "Ignoring character level attribute termination tag "<cTracking:>" found without the corresponding character level attribute application tag "<cTracking:value>"
    Since it's not a problem I can ignore this specific error -- but I don't want to turn off ALL problem tag error checking because occasionally there are serious errors that I DO want to see.
    Is there a way to tell ID to ignore this specific error?
    Thanks
    Akiva

    UNfortunately the original ascii files uses a <D> code to return to the default settings -- and since that occasionally includes resetting the tracking to 0 I need to include the "<cTracking:>" tag.
    I could obviously fix it by adding a "<cTracking:0>" to all the codes -- but that seems like it could cause more problems.
    I can preprocess the ascii code to eliminate the excess codes -- but that increases processing time for something which happens only occasionally and is non-problematis in practice.
    Akiva

  • 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.

  • [IDCS3 WIN] Assert while importing tagged text

    Hi,<br /><br />I use the following code to import a tagged text from a buffer into a text frame:<br /><br />IDataBase* database = frameUIDRef.GetDataBase();<br /><br />InterfacePtr<IHierarchy> frameHierarhy(frameUIDRef, UseDefaultIID());<br />int32 count = frameHierarhy->GetChildCount();<br /><br />InterfacePtr<IMultiColumnTextFrame> textFrame(frameHierarhy->QueryChild(0), UseDefaultIID());<br /><br />if( !textFrame )<br />return UIDRef::gNull;<br /><br />UID storyUID = textFrame->GetTextModelUID();<br /><br />InterfacePtr<ITextModel> textModel(database, storyUID, UseDefaultIID());<br /><br />if( !textModel )<br />return UIDRef::gNull;<br /><br />UIDRef result = UIDRef::gNull;<br />InterfacePtr<IK2ServiceRegistry> services(gSession, UseDefaultIID());<br />InterfacePtr<IK2ServiceProvider> service(services->QueryServiceProviderByClassID(kImportProviderService, kTaggedTextImportFilterBoss));<br />InterfacePtr<IImportProvider> prov(service, IID_IIMPORTPROVIDER);<br /><br />InterfacePtr<IPMStream> stream(StreamUtil::CreatePointerStreamRead(taggedtext, strlen(taggedtext)));<br /><br />if (prov->CanImportThisStream(stream) == IImportProvider::kFullImport)<br />{<br />database->BeginTransaction();<br /><br />prov->ImportThis(database, stream, K2::kSuppressUI, &result);  //This line generates the Assert<br /><br />if (result != nil )<br />{<br />Utils<ITextUtils> textUtils;<br />InterfacePtr<ICommand> moveAllStoryCommand(textUtils->QueryMoveStoryFromAllToAllCommand(result, ::GetUIDRef(textModel)));<br />CmdUtils::ProcessCommand(moveAllStoryCommand);<br />}<br />     <br />database->EndTransaction();<br />}<br /><br />It works fine, but when "ImportThis" is called i get this:<br /><br />ASSERT 'fCmdProcessorState == kDoing || fCmdProcessorState != kNotProcessing || cmdMgrRef.GetDataBase()->GetUndoSupport() == IDataBase::kNoUndoSupport' in ..\..\..\source\components\appframework\commandmgmt\CommandProcessor.cpp at line 2889 failed.<br /><br />Any help would be appreciated.<br />Thanks in advance, David

    I would say the problem here is in using database->BeginTransaction()/EndTransaction(). Basically you should never call these methods - you need to find/create a command to do the processing instead, then perhaps wrap the two commands in a command sequence.
    I know there was a post saying ' don't use those methods' a long time ago by Ken Sadahiro (then of Adobe) - you might find it with a search, though will have been archived by now.
    Ian

  • Suppressing progress dialog when importing Tagged Text?

    Howdy:
    I'm using the Adobe Tagged Text import provider to place text in a document. I'm making the call to iImportProvider->ImportThis() with the kSuppressUI flag set. Even though the flag is set, InDesign is still displaying the progress dialog. Does anybody know how to keep that from happening? I don't see anything in the documentation about this.
    Thanks,
    Noel Williams

    Hello:
    I have the same problem that Noel.
    I'm using:
    * prov->ImportThis(database, stream, kSuppressUI, &contentUIDRef);
    * prov->ImportThis(database, stream, K2::kSuppressUI, &contentUIDRef);
    * prov->ImportThis(database, stream, (K2::UIFlags)0, &contentUIDRef);
    But the progress Dialog appears.
    This problem is critical for me.

  • Trouble when importing tagged text (CS6)

    I'm trying to import a tagged .txt file into InDesign however when I do, the paragraph styles are not recognized and I end up with unformatted text. Is there a certain format the .txt file needs to be in (unicode 8, 16 etc.)? Any help would be appreciated, thank you!

    Tagged with InDesign Paragraph Style tags. I think I sorted it out, I needed to append the .txt file with "-mac.txt"

  • Importing WORD text files with formatting and Text Flow issues IDCS3

    I am a designer who has used ID since it first came out, but have not been utilizing the larger document capabilities lately as I've been working in large format graphics (like really large, so if you have questions on that I can answer!). I am working on a new magazine and the copy is in WORD. I want to know the best way to bring in the text and keep the italic and bold formatting. The WORD docs have no style format done by the writers, so therefore changing the styles to my styles in the custom import section doesn't work. I tried making a character style sheet with no font chosen just "italics", but didn't work. I still was unable to make a paragraph style on top of it.
    If anyone has a good methodology for bringing in WORD text and keeping it's attributes while applying ID style sheets please help!
    Also with text flow, I have always had an issue with ID with not creating more pages to keep the flow going. In a test I just did I placed the text, but it did not create any new pages. I know there's a way to make that work, but spell it out for me like I'm a person losing their mind which seems to be the case!
    Thank you in advance to the person who can give me advice!

    What for settings do you have on the importoptions when bringing in Word? Keep formatting or loose formatting? And if loose formatting: is Keep local formatting on or off?

  • Importing Tagged Text Files

    Working in MAC ID CS5 and pulling in text from a Windows based database that places tags automatically with the information it pulls.  Using <

    Shoot! Yes, I had typed in my code and it stopped at that.
    "Working in MAC ID CS5 and pulling in text from a Windows based database  that places tags automatically with the information it pulls.  Using Unicode tagging direct to TextEdit and saving as Unicode (UTF-16).  When placed in ID it either gives Boxes with x's in them, text only or response in below pic.  Is there a specific way to save, code or place that I am not seeing.  Where are the "rules" from ID on this.  We used Quark before and it was so simple.

  • 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.

  • Importing URLs using tagged text

    I'm trying to import tagged text with URLs into InDesign. InDesign sees the links, but does not seem to know that the links are URLs (rather than text anchors or page links). I have nearly 1500 hyperlinked pieces of text I want to import, so I can't manually create Destination Definitions for all of them. When I try to send definitions in using tagged text, InDesign (CS2) crashes. Any help very much appreciated.

    There are many ways of "tagging" information in an InDesign document. For what you're doing, I'd suggest a unique paragraph style used only for this purpose, then you can search for text in it and use the contents.
    Dave

  • Tagged text import issues

    I have had some issues with importing tagged text. In my workflow i get some data converted to tagged text, no problems, special characters are also converted to ASCII entities.
    Everything works on my machine, but as soon as it is imported on another machine, the special characters are gone.
    I have located the issue, that my entities are lowercase (e.g. ë = <0x00eb>), and by making it uppercase (<0x00EB>) it works.
    What can be the difference on the machines? Is it an InDesign thing, or is it a CPU thing? The only difference on the machines are that mine is a Mac with intel processor, and the other is a G5.

    Oops -- the smiley face in the code should be changed to semicolon close angle (greater than sign). Jim

  • Accented characters in tagged text

    I normally write copy in a text editor (TextPad), paste into InDesign, and format in the Story Editor. Now I want to format in TextPad and import tagged text. But I am finding that accented characters from the numeric keypad as well as other more frequently used characters - €, £ - are being misinterpreted. For instance R$8·25 million (about €3 million) comes in as R$8·25 million (about €3 million) and  Fundação de Amparo à Pesquisa do Estado de São Paulo is rendered as Fundação de Amparo à Pesquisa do Estado de São Paulo.
    I have the options to format the text file as ANSI or DOS, and I have used the headers <ASCII-WIN> and <ANSI-WIN>, but there seems to be no combination that brings the text in cleanly.
    Substituting Unicode values for these characters gives me what I want and I can build a library of them to add in TextPad, but this is counter to my aim of more productivity.
    Can anyone give me a the formatting options to enable me to use the numeric keypad to generate the extended character set in a form that will import as tagged text?
    k

    Yes, sorry, it had to be somewhere from InDesign to InDesign. What I actually meant was that your tagged text started life in InDesign. My tagged text is starting life in TextPad.
    TextPad can save text in DOS (I guess that means ASCII), ANSI and UTF-8. It's possible that the text in the file I was importing wasn't actually in ANSI. I've restructured it now and it is importing accented characters correctly except, bizarrely, for the Euro symbol (yes, there is a € in the font - Myriad Pro). If I use Alt0128 to create the symbol - or the keyboard AltGr4 - import stops at the last complete line before the € would be encountered, and nothing more is imported. If I use <0x20AC> the symbol imports properly and the whole file is placed.
    I also worked with two identical (except for the substitution of some Unicode characters) versions of the same file. Both were ANSI, and both were headed with <ANSI-WIN> and no other definition information. One file picked up the definitions from the InDesign decument and rendered correctly, the other ignored all the paragraph styles and simply imported text at the default paragraph style.
    So please accept some points for your collection Ken for leading me to re-check the actual code set in the document.
    If you have any ideas about the € problem or why one version of the file would not pick up style definitions I would be intrigued to hear.
    k
    As an afterthought, I've attached a chunk of each file to show one that picks up definitions and one that doesn't. My initial thought was that the one that does pick up definitions would bleat about them being missing, while the other wouldn't. But if I place them in a blank file, both complain that the definitions are missing. However, If I make an appropriately named definition to match one in the file, the version that picks up definitions will match it and only bleat about the other missing definitions. The file that isn't picking up definitions will fail to honour the paragraph style, and will complain that the remainder are missing.

  • Why does InDesign CS 5.5. crash when importing MS Word with styles/formatting?

    Hello,
    I am trying to import MS Word files from a colleague that include cross references (i.e. "see page X for more detail").
    Each time I try to import the text with the formatting, InDesign crashes.
    Help. Trying to avoid manually adjust page number references for 500+ pages of text.
    Thank you in advance.

    Can you make a copy of your file available (or email it to me?)?
    Please try saving as RTF or DOCX (or DOC if you were already trying DOCX) and see if you get different behaviors.

  • Linked Adobe Tagged Text files importing without styles

    I have several data-heavy weekly publications where suddenly, the link to all Adobe Tagged Text format files have the proper paragraph styles and character styles stripped on being placed.  I'm aware of the default settings issue, where you deselect all and make sure the character styles is none, and that does not seem to be the issue. Specifics are
    Working in CS 5 (Version 7.0.4)
    The Adobe Tagged Text format files are exported from Excel spreadsheets
    The InDesign documents have links to the Adobe Tagged Text format files, and Update Link is used inside InDesign to update the text when the file is exported from the spreadsheet.
    When the publications are opened on my workstation, ALL files linked to Adobe Tagged Text files are not imported correctly, they revert to the Basic Paragraph style.
    These are not new documents I'm designing or new Adobe Tagged Text files, this is part of a production process that has worked without issue for years.
    When the same documents are opened on another workstation, and Update Links used, they come in perfectly, so it doesn't seem to be a document or file corruption problem, but a problem with my environment or ID settings.
    It's not one specific document or file, it is every single document that has a link to an Adobe Tagged Text file (and we have lots, I tried several!)
    I've opened the text files in the text editor to check them, but as I mentioned: same document, same files, I'm the only one who can't update without stripping out the styles.
    Thanks! Nancy

    Hi, Peter! Thanks for the response. Yes, it's really Tagged Text. See below. After exporting from the spreadsheet and database, opening the document in InDesign, and selecting update link, we do no editing in InDesign after the fact because everything is already setup exactly as we want it with the Tagged Text format.
    I have literally hundreds of these among several different documents, updated weekly, mainly dealing with prices and numbers. Every one of the links to Tagged Text format files in every publication now strips out the Tagged Text paragraph style and character style formatting on Update Link on my workstation only. On my other two workstations, the links update without issue, and everything is correct in the final document.
    So I'm beginning to think I need to look at rebuilding something, maybe as Joel said, replacing preferences. I keep looking for a workstation or ID option that might effect this.
    <ANSI-WIN>
    <vsn:6><fset:InDesign-Roman><ctable:=<Black:COLOR:CMYK:Process:0,0,0,1>>
    <dps:Pnl Comp\:Pnl Comp \$Numbers=<Nextstyle:Pnl Comp\:Pnl Comp \$Numbers>>
    <dps:Pnl Comp\:Pnl Comp Bold \$Numbers=<BasedOn:Pnl Comp\:Pnl Comp \$Numbers><Nextstyle:Pnl Comp\:Pnl Comp Bold \$Numbers>>
    <dps:Pnl Comp\:Pnl Group \$Numbers=<BasedOn:Pnl Comp\:Pnl Comp \$Numbers><Nextstyle:Pnl Comp\:Pnl Group \$Numbers>>
    <pstyle:Pnl Comp\:Pnl Comp Bold \$Numbers> $302 $302 $278
    <pstyle:Pnl Comp\:Pnl Group \$Numbers> 203 202 211
    <pstyle:Pnl Comp\:Pnl Group \$Numbers> 456 458 393

  • Confused by the behavior on importing simple tagged text

    I have a tagged text file with the following content beween the dashed lines. (the lines are not part of the file). Both IText and BText are predefined paragraph sytles.
    <ASCII-WIN>
    Price <ParaStyle:IText>AA<cPosition:Superscript>aa<cPosition:> - <ParaStyle:BText>BB<cPosition:Superscript>bb<cPosition:>
    Once imported,  the result is not what I expected. Specifically,
    1. All text are imported with the BText paragraph style.
    2. It shows the "bb" as superscripted, but not the "aa".
    Why is that? And how can I have different styles for the AAaa part versus the BBbb part?
    This can be reproduced on CS5 and CS5.5. Didn't try any older versions.
    Thanks.

    When I think of it, the first behavior makes sense, because the text were specified as a continuous line without line break, they are treated as a single paragraph. And for a paragraph, only one paragraph can be used, and the one that is specified later, BText in this example, wiins.
    But still, why does the import routine ignores the superscript character style on "aa"  before the second  paragraph style tag?

Maybe you are looking for

  • Need help on resolving the issue with adobe output server - error MSG256 & MSG 210 not in .ini file

    Hi, I am using adobe output designer 5.5 for designing the label template and using the Adobe output server for printing process. In the Jfmerge.ini we given the condition "DiscardUnknownFields=Yes" for ignoring the unwanted fields in the .dat file.

  • Find keyword used in Web Dynpro Application?

    Hi folks, I have a simple question with regards to Web Dynpro for ABAP: Is it possible to search in my application for a keyword that I have used? For e.g., I wish to search for the keyword "loop" to find out which parts of my program have this match

  • Help: lost our content area portlet (site)

    On the "Oracle Portal Navigator" page under the "Content Area" tab someone deleted the "Site" portlet. How do I add the "Site" portlet back to the page? I clicked on the customize page and tried to find the portlet to add but it is not listed. I then

  • Found a bug in Automator

    First off I would like to say hello, This is my first time posting on this forum. Anyway, I've discovered a bug in Automator. I've wrote a simple script that I use to back up my work documents from a folder on my master HDD (WDC WD2500JS-41SGB0) to a

  • How to clone generic instance variables?

    Hi guys, If I have private class Item<T>         private T value;         private int priority;         public Item(T value, int priority)             this.value = value;             this.priority = priority;         @Override         public Object c