[C++] Events to detect changes to text in the document

Hi all

I use C++ to develop a plugin for InDesign. During development, I want to catch the events of changing text in the document open in InDesign. The events are something like adding or deleting certain characters or words or phrases in the document. Those can be understand that the events occurred when the user change or remove the text in the document.

When the events are detected, they should provide what characters, words or phrases are added or removed from the document. In addition, they should provide the index of the text changes if they are able to do.

Please help me with this problem by providing methods, functions or libraries can detect changes to text in InDesign.

Sincerely,

Tri Dung

Hi Tri Dung,

Check the API TextPreProcessService and TextPostProcessService. You can write your own services and implement the interfaces ITextCommandPreProcess and ITextCommandPostProcess.

Markus

Tags: InDesign

Similar Questions

  • I use Adobe Acrobat Pro and when I click on save as PDF... PDF reader enable adding text in the Documents does not appear. Why?

    Can you please tell me why?

    With my Adobe Acrobat Pro, when I click on save as PDF... PDF reader enable adding text in the Documents does not appear.

    Thank you

    Elina Mackay

    Adobe change Acrobat a lot between releases. Make sure you follow instructions to the same version you have.

    If this looks OK, let us know the exact version you have (help > about Acrobat Pro).

  • HP envy 4502: Document headers, footers and all printing of logos, but the body of the text of the documents is missing

    Any ideas why my documents will print the headers, footers and logos of a document but do not print the main text of the document

    Hi @buddiecat , welcome to the forums!

    Personally, I would say a pilot error or a problem with the program you are printing from, as the cause of printing problems you encounter.

    I suggest that you run the print and Scan of the doctor. This diagnostic tool will check for all conflicts that may be causing the problem. The tool will show you a report at the end. Send me the results.

    Also, try printing from another program and let me know if print jobs will print correctly also.

    Have a nice day

  • How to edit text in the document to PDF in Acrobat Pro 11 Mac?

    How to edit text in the document to PDF in Acrobat Pro 11 Mac? I know that I can do in the Windows version, but can not find the same tool on Mac.

    On a Mac, click the Customize (above the Tools menu button) button and select default tools.

  • Detecting changes in pixel as the Magnum script?

    Im trying to make a script which detects changes in pixels. I have a sequences of images that was animated on 4S. Some images are therefore the same for 4 separate frames, and then it changes. I want detect changes automatically. A bit like the 'Magnum - The Edit Detector", but just because of the very high sensitivity changes must be registered as a new image.

    It's for a text plugin... whenever there was a new 'framework' should put a new number.

    Could not find anything in the language of script on how to proceed.

    Jesper

    I thought sampleImage is not specific enough and that there could be a need to loop over the image with the small size of the samples, but he seems to be very accurate.

    In this environment, the particle small dirt appears at 02:00, size of the model is 1920 x 1080 and the change is detected by sampling of the entire image with large RADIUS immediately.

    However, app.project.bitsPerChannel is set to 32 bpc, and 8 or 16 it does not detect.

  • Change a text on the timeline of a class field

    Hello

    I need help to change the content of the text fields that are on the stage of the main timeline within an outer class. I created a countdown that is called from the Document class. I think it's a problem with the scope of the variable, but I can't get out.

    Main Document class:

    package
    {
    import flash.display. *;
    import flash.events. *;
    Import count_timer;
    Import RectangleButton;
    main/public class extends MovieClip
    {

    public void main()
    {

    create a Btn [begin]

    var startBtn_mc:MovieClip = new MovieClip;
    addChild (startBtn_mc);
    var startBtn:RectangleButton = new RectangleButton("Start",90,25,18,0xCC0000,0x000000);
    startBtn_mc.x = 105;
    startBtn_mc.y = 200;
    startBtn_mc.addChild (startBtn);

    startBtn_mc.addEventListener (MouseEvent.CLICK, onClickStartBtn);

    function onClickStartBtn(event:MouseEvent):void
    {
    var inputDay1:String = dayInputtxt.text; [these are fields of entry on the scene]
    var inputHr1:String = hrInputtxt.text;
    var inputMin1:String = minInputtxt.text;
    var inputSec1:String = secInputtxt.text;
    var counter: count_timer = new count_timer (inputDay1, inputHr1, inputMin1, inputSec1);
    }
    }
    }
    }

    Countdown:

    package
    {
    import flash.display. *;
    import flash.utils.Timer;
    import flash.events. *;
    import flash.text. *;
    Import RectangleButton;
    public class count_timer extends MovieClip
    {

    not sure it's correct
    public var daytxt:TextField;
    public var hrtxt:TextField;
    public var mintxt:TextField;
    public var sectxt:TextField;
    public void count_timer (inputDay1, inputHr1, inputMin1, inputSec1)
    {

    var inputDay = inputDay1;
    var inputHr = inputHr1;
    var inputMin = inputMin1;
    var inputSec = inputSec1;
    var msinputDay:Number = Number (inputDay);
    var msinputHr:Number = Number (inputHr);
    var msinputMin:Number = Number (inputMin);
    var msinputSec:Number = Number (inputSec);
    var ms: Number = Number (msinputDay).

    convert input in milliseconds
    MS = ms + msinputDay * 24 * 60 * 60 * 1000;
    MS = ms + msinputHr * 60 * 60 * 1000;
    MS = ms + msinputMin * 60 * 1000;
    MS = ms + msinputSec * 1000;

    addEventListener (Event.ENTER_FRAME, loop);

    function loop(e:Event):void
    {

    MS = ms - 1000;

    var sec: Number = Math.floor(ms / 1000);
    var min:Number = Math.floor(sec / 60);
    var hr:Number = Math.floor(min / 60);
    var day: Number = Math.floor(hr / 24);
    s = s % 60;
    min = min % 60;
    HR = % 24 hr;

    daytxt. Text = day.toString (); [everything seems to work for these variables. I think it should be root.]
    hrtxt. Text =(HR<10)? "0"+ HR. ToString(): hr. ToString();
    mintxt. Text =(min<10)? "0"+ min. ToString(): min. ToString();
    sectxt. Text =(sec<10)? "0"+ dry. ToString(): sec. ToString();

    If (ms < = 0)
    {
    removeEventListener (Event.ENTER_FRAME, loop);
    gotoAndPlay ("TimesUp");

    }

    }
    }
    }
    }

    Thanks in advance.

    Your code will not work as show you. First of all, you shouldn't put your methods of the class inside the builders... And Yes - scope. You do your new count_timer as a local variable inside a function that is called when the click on. Essentially, the timer went so fast that it is created. If you want the timer available to other methods in the class must be declared as a var in the class definition.

    And I agree with kokorito - your timer to extend EventDispatcher and then he can do like: dispatchEvent (new Event ("myTimerEvent")); and you can then add an eventListener to it when you create in your main class. You listen to just "myTimerEvent" or any string you use and call any function you want - as well as the use of any other listener.

  • Change selected text in the TextInput, TextArea controls color

    I can't find a way to change the color of the selected text in the TextInput or TextArea controls from the default black.

    Could someone point me in the right direction on how to do this in AS3.

    I thought it would be a style or a property, but in this case I must be missing it.

    Thank you

    Unfortunately, there is no support for this.  There is in the new text layout framework

    Alex Harui

    Flex SDK Developer

    Adobe Systems Inc..

    Blog: http://blogs.adobe.com/aharui

  • Need text box changes to reflect through the document.

    Hi all

    I'm pretty new in InDesign. I was wondering if there's some way to do master text box changes reflect through the whole document used this master page after you move the text boxes on the documents. Is this possible?

    So. Let's say that there is the block of text with the text on the master page. I decided to use this master page on a given document, but I needed to move the block of text with the text in this document. I won't be able to change the master page text?

    Right. Once ignore you it and move on the live page, change the text on the master does not affect the text on the live page.

    If you have the same frame with the same variable text appear in the same place on multiple pages, put that image on a master page is a good way to make your life easier. But if you need the same frame with the same variable text appears upwards in * different * places on many pages, there are more effective ways.

    You don't mention a version. CS3 and CS4 allow variables (Type > text Variables). You can create a custom text variable and insert this variable in your document. Change the definition of the variable and this will change all at once. I think that a custom text variable cannot be more than one line long, but the only limit to the length of the line is the length of the block of text that is.

    For more than one line, you can make your block of text in a separate document, export it to PDF and then place the PDF anywhere in your document. Edit the new document, PDF export and it will change all at once. In CS3 or CS4, you can also directly put your separate Indesign document into your working document. No necessary PDF.

    Ken

  • Can't add placeholder text data merge for all blocks of text on the document

    I'm trying to put together a script that loops if all pages in an indesign file, search all text frames label caption1, caption2, caption3... (whenever you get to a new page, the number of text images label starts again from 1) and add a placeholder in the text data fusion: caption1, caption2, caption3... but this time, when you get to a new page the number continues to go... caption4, caption5 and so on.

    Page 1 - image text = caption1 = tag > data merge placeholder = < < caption1 > >

    Page 1 - image text = caption2 = tag > data merge placeholder = < < caption2 > >

    Page 1 - image text = caption3 = tag > data merge placeholder = < < caption3 > >

    page 2 - text = caption1 = image tag > data merge placeholder = < < caption4 > >

    page 2 - image text = caption2 = tag > data merge placeholder = < < caption5 > >

    Currently, the script is adding placeholder text merge data only for the two text frames first (out of 6) on a page (about 8 pages) and just the first image of text on the page two (out of 3)

    Any help will be greatly appreciated

    Here's the script:

    myDocument var = app.activeDocument;

    -SOURCE DATA CALLS FUSION

    main();

    main() {} function

    myDataSource var = File.openDialog ("Please select a datamerge source", "text files: * .txt");

    If (myDataSource! = null) {}

    myDocument.dataMergeProperties.selectDataSource (myDataSource);

    myDocument.dataMergeProperties.dataMergePreferences.recordsPerPage = RecordsPerPage.MULTIPLE_RECORD;

    }

    }

    -MERGE OF DATA FIELD

    function get_field (captionString, myDocument) {}

    fields var = myDocument.dataMergeProperties.dataMergeFields;

    for (var f = 0, l = fields.length; e < l; f ++) {}

    If (fields [f] .fieldName == captionString) {}

    Returns the fields [f];

    }

    }

    Alert ("error: did not find all the fields with the name" + field_name);

    }

    THE TEXT - ADD PLACEHOLDER DATA MERGE

    var countFrames = 1;

    for (i = 0; i < myDocument.pages.length; i ++) {/ / TOTAL NUMBER OF PAGES in the DOCUMENT}

    var capPerPage = 1;

    for (x = 0; x < myDocument.pages [i].textFrames.length; x ++) {//COUNT TEXT TOTAL IMAGES PER PAGE

    If (myDocument.pages [i] .textFrames [x] .label < 0) {}

    Alert ('can not find any image caption');

    } ElseIf (.textFrames [x] myDocument.pages [i] .label == 'caption' + capPerPage) {//IF IT IS A TEXT LABEL of IMAGE 'caption1' EXECUTE

    var captionString = "caption" + countFrames;

    var myTextFrame = myDocument.pages [i] .textFrames [x];

    var myDataMergeProperties = myDocument.dataMergeProperties;

    var myTextFrame.parentStory = monarticle;

    var myStoryOffset = myTextFrame.parentStory.insertionPoints [-1];

    var myNamePlaceHolder = myDocument.dataMergeTextPlaceholders.add (monarticle, myStoryOffset, get_field (captionString, myDocument)); ADD DATA FUSION TEXT HOLDER TO THE TEXT BLOCK

    countFrames ++; INCREASE THE NUMBER TO ADD DATA FUSION TEXT PLACEHOLDER FOR THE NEXT BLOCK OF TEXT

    capPerPage ++;

    }

    }

    }

    Hello

    To verify this change (replace for...) loop)

    var countFrames= 0, currLabel, capPerPage;
    
    for (i=0; i
    

    Notice countFrames starts at 0.

    Jarek

  • Cannot generate the plain text of the document version

    I have a strategy that uses the AUTO_FILTER. Whenever I use this policy when I call the POLICY_FILTER to filter a non-text document. The POLICY_FILTER is

    I'm on Oracle 11.2.0.2 and I can't get the POLICY_FILTER to generate a gross of a text document text version no whenever I call the POLICY_FILTER with a policy set by using the AUTO_FILTER. I specified TRUE for the plaintext parameter when calling the POLICY_FILTER, and yet I still get an HTML version of the document.

    It seemed to work correctly in 10.2.0.4, but once I upgraded to 11.2.0.2, I lost the ability to generate a plain text version.

    Is there anything else that needs to be configured with 11.2.0.2 for a simple plain text version?

    Thank you.

    Due to change of suppliers of filter for 11 g, the 'clear text' parameter has no effect - HTML is always output.

    The only suggestion I can make to use the function REGEXP_REPLACE to remove the HTML tags programmatically.

    -Roger

  • Content by linking - change a font in the document of the child

    Hello

    First of all, it might be useful to give you a little background info as to what exactly, I'm hoping to reach.

    We have quite a few pieces of information in our business that are repeated in all documents (for example, certain formulations on some technologies that we use, an introduction to society, that sort of thing). My Manager likes to keep these consistent, but every now and then they can change and upward until we got CS6 a few weeks ago, it was a pain to try and find all the documents affecting text in. When we discovered the related content we were rather excited and decided that we would create a document that contains all the "common" content linking us then.

    I managed to get the linked content. So I have a piece of text, I put in another document and if I make changes to the parent company, the flags of the child up as obsolete, and I can update. What I seem to be having trouble with is the fact that we do not always want the text of the 'child' to have the same attributes of fonts or character as the parent. "I change the font in the child, but as soon as changes to parent, it is up to the parent police - I was expecting it, so I started to have a play around with the link" options ", but I can't seem to find an option that allows me to change the font in the child and this continues even when the parent text is updated."

    Someone know how to do this and could you take me through it step by step?

    (On Mac OS x 10.6.8 CS6)

    What you need is Custom Style Mapping

    He talked to halfway down the page here:

    http://helpx.Adobe.com/InDesign/using/linked-content.html

  • Acrobat Pro XI, after placing a watermark on a PDF file, applying an A / Web certificate, then save as a PDF - A, the text in the document becomes unfathomable.

    After adding a watermark in Acrobat Pro XI and / Web certifying and saving as a PDF - A, the text in the PDF file becomes unfathomable, and it seems that the pages have been flattened.  Under Save settings, I can see radio boxes I can uncheck to make sure that the pages become flattened. This translates into an error and the PDF file does not get it's / Web certification.  Is this a bug?  I can search for text in an A / Web document certified without watermark, fine.  I can search for text in a document with a watermark and no A / Web certification, very well.  But not with the two elements applied.  Why the watermark is causing a conflict?  Is there a way to solve or work around this problem?

    Thank you!

    I do not know what A / Web is. But if you save as PDF/A-1a or PDF/A-1b, and that transparency, it must be flattened. Flattening often lose the text completely, for example, if the text superimpose a transparent image.  Your watermark is probably using transparency. Not a glitch or bug.

  • Is there a way to create a link in a document that will draw the text in the document and open it in a separate text in the document box?

    I am trying the link between the sections of a form in a PDF file and instructions in the same PDF document.  I want, instead of having this jump back to page in the document so that it can pull up the text identified in a contextual text separately on the same page where the form lives.  Is this possible?

    Hi gwebster,.

    Instead of linking to the instructions page, maybe you can use tooltips or comments so that the instructions are perceptible besides than the text.

    Kind regards

    Rave

  • How to select all the text in the document?

    I need to select all the text in a long export to RTF document. I only seem to be able to select a story. Any ideas of how I can do?

    Thank you

    Ian

    Cannot be done. You will need to attach all the text boxes in a long history, or to use the 'ExportAllStories.jsx' script that comes with your installation default InDesign.

    There are other alternatives (each using scripts), and the best way may depend on what are your intentions with the exported file - for example, if you want to read back into their original text after the mounting frames, well, there are ways to do it.

  • Cannot save]] &gt; in the text of the document as XML

    Ladies and gentlemen,

    I am currently evaluate a save-as-XML problem with FrameMaker 9.0p255. The content of the document shows some examples of XML that contains CDATA sections, as

    <environment>
      <var name="service"><![CDATA[Inhalt]]></var>
    </environment>
    

    Reminder: It is in the text in the FrameMaker document.

    "When I save as XML, the XML parser complains:" error at line 140, char 77, Message: the sequence "]] > ' is not allowed in character data" ""

    When I opened the XML file in an XML editor I see that all the < are correctly escaped as & lt; and all the > are left as is. "Integrated Xerxes Analyzer also reports:" the sequence of characters "]] >" must not appear in the content except to mark the end of a CDATA section. «

    And recommendation XML says:

    The sign higher (>) may be represented using the string " &gt; ", and must, for compatibility, to escape using "" &gt; "or a character reference when it appears in the string" ]]> "in content, when that string is not marking the end of a CDATA section."

    It seems to me FrameMaker must either write all > as & gt; to avoid the possibility that it could be used after]].

    Can you reproduce this problem (I can using the UserGuide structured application by putting just]] > in any element)?

    Have you found a way to get around this, perhaps with a special rule of R/W?

    Thank you

    -Michael

    Michael,

    As long as you use a DTD, there is an easy solution. Set a principal for the hook closed and use a rule of r/w that maps the entity to that character. In fact, if you call the parallΘlisation of the entity, and your r/w rules include the default reference to isoall.rw, it is useless even to add a rule. Instead of setting the entity in your DTD, you can, of course, simply include ISOnum.

    In any case, with the defined entity and rule, written FM ' ] ] > "instead of"]] >.

    -Lynne

Maybe you are looking for