InDesign - Hidden Characters Corrupting Documents

I post this message in the spirit of sharing information, hopefully to be of help others.
I recently encountered a problem after distilling a document from InDesign which, as an Acrobat PDF, would not print - giving three successive error messages:
1. The Document could not be printed.
2. There were no pages selected to print.
3. A drawing error occurred.
Well, that covers about everything !
After about an hour of patient diagnosis I discovered some erroneous characters had appeared in some bullet points and removal of these cured the problem.
I found them only after copying and pasting the text into Word (using the paste as "text only" option) and copying and pasting it back into InDesign. The spurious characters then appeared as a red-highlighted squares and could be easily deleted.
(Note: I had previously used the 'Show hidden characters' option in InDesign which did not reveal these little devils, neither did they 'appear' in the Word document)
I believe the erroneous character is probably a result of formatting which was in the original Word document imported into InDesign and which could be a 'flag' for bullet formatting (in Word).
The lessons I learned from this are:
patiently isolating the section of the document led to the discovery of the problem
be aware, in the future, of possible odd characters appearing (invisibly) from Word and corrupting InDesign documents.
Hope this may be of assistance.
I haven't given version numbers of my software since this is almost certainly not relevant - but the general principle is.
I hope this may be of assistance.

Thankyou for putting that on the record...

Similar Messages

  • AppleScript picking up InDesign hidden characters in text.

    I have run into an issue where two empty text strings {""}, one pre-defined in a variable, the other pulled from text frame content, are failing to match because hidden characters left over from a data merge remain in the frame. I have documented my problem on a blog entry here, and I would appreciate any insight that can be offered to fix this.

    Thanks for forwarding the link, however that thread assumes that you are dealing with JavaScript, which is not the case. Perhaps I am not proficient enough to see how that translates to a solution in AppleScript.
    I have remnants of a placeholder element tag used in a data merge being picked up with the content when called by the script:
    set pageData to contents of
    (every text frame whose label is frameLabel)
    AppleScript does not know how to display this InDesign metacharacter in terms that allow me to address it as an object so I can remove/ignore it, and it took a bit of fiddling in ScriptDebugger just to that there was a byte of data in there at all.
    I have also tried
    set pageData to text of...
    to the same effect.

  • Force show (not toggle) hidden characters and threads in script

    I have been working on a script to show all the extras (for the most part). I can turn on rulers and frame edges from the DOM, but can not Show Hidden Characters or Show Text Threads from the DOM. I've been working on using menuActions, but there two is a hitch. It seems that the menuActions are only available if the menu has been accessed during the current session? Not 100% on that. There is a good comment (#10) that touches on this a bit at Indiscripts :: How to Create your Own InDesign Menus.
    This method works, but again only if the menu has been previously accessed... so it's not reliable:
    // locale-independent (should work on non-english versions of InDesign)
    // Show Hidden Characters
    // FIX/TODO - Only seems to work if the Show/Hide Characters has been toggled within this session?!
    var showHiddenChars = app.menuActions.item("$ID/HideHiddenCharactersCmdStr"); //The 'hide' ID String only valid when characters are hidden
    var areCharsHidden = (showHiddenChars.isValid);
    if (areCharsHidden == true) {
        try {showHiddenChars.invoke()} catch (givenError){alert(givenError.toString())};
    else {
            //alert("Hidden characters are already shown!")
    I also have a less desirable version of Showing Hidden Characters, which relies on English name property of the Menu Action. It suffers from the same issue.
    //~     var acID = acID||
    //~             ((t=app.menuActions.item("$ID/ShowHiddenCharactersCmdStr")).isValid&&t.id)||
    //~             ((t=app.menuActions.item("$ID/HideHiddenCharactersCmdStr")).isValid&&t.id);
    //~     var showHiddenChars = app.menuActions.itemByID(acID);
    //~
    //~     //if the name property for the menuAction is currently "Hide Hidden Characters", the characters are hidden.
    //~     var areCharsHidden = (showHiddenChars.name == "Hide Hidden Characters");
    //~     if (areCharsHidden == true) {
    //~         try {showHiddenChars.invoke()} catch (givenError){};
    //~         }
    //~     else {
    //~         //alert("Hidden characters are already shown!")
    //~         }
    Any suggestion on how to force show characters (show threads works the same way) with out having to have had accessed a menu before hand?
    Thanks,
    Kevin

    When you have found a menu action you can remember its ID and use menuActions.itemByID() later on to retrieve it. Most action IDs are hard wired, bound to their implementing plugin. Of course there is an exception for dynamically allocated actions, e.g. script actions.
    My first attempt following you is to retrieve the action name - that should trigger the internal method to update the whole action state including checked, enabled (not applicable in this case). Of course it failed, would someone please file a bug? The translated versions of strings that you'd use for the comparison are available via app.translateKeyString().
    Btw you are using the wrong string - cmd strings are used for command history as seen in the undo menu. Menu strings usually have an ampersand character to indicate the underline / Alt+Key combo in Windows.
    $.writeln(app.menuActions.itemByID(0x1d301).name==app.translateKeyString("$ID/Show Hidden Characters"));
    $.writeln(app.menuActions.itemByID(0x1d301).name==app.translateKeyString("$ID/Hide Hidden Characters"));
    app.translateKeyString("$ID/Show Hidden Characters")
    Ergebnis: Verborgene Zeic&hen einblenden
    app.translateKeyString("$ID/Hide Hidden Characters")
    Ergebnis: &Verborgene Zeichen ausblenden
    // failed test
    $.writeln(app.menuActions.itemByID(0x1d301).name);
    app.menuActions.itemByID(0x1d301).invoke();
    $.writeln(app.menuActions.itemByID(0x1d301).name);
    // output should change after invoke
    Verborgene Zeichen ausblenden
    Verborgene Zeichen ausblenden
    As you found command strings, I also had a look at the undo history - it remained empty.
    $.writeln(app.activeDocument.undoHistory.length);
    Probably the setting is not persisted in the document any more, someone should have removed the command strings.
    Then I realized that the output of the previous lines around the invoke had changed as it was expected originally. And I had not touched the menu since restart … but I had activated the application.
    One can do that with scripting too - app.activate();
    A couple of restarts later this is definitely leading somewhere.
    Regarding the command, I also had a second look with a debug build of InDesign: the command is still executed, but there is a flag that binds its undo to the previous command - left as an exercise to verify.
    Hmm. It is stored in the persistent document preferences in a structure internally called kDocWorkspaceBoss / ITextOptions, thus should also be exposed for scripting. Back to scripting: set a breakpoint, browse thru tons of document sub-objects, and here we are:
    app.activeDocument.textPreferences.showInvisibles
    Happy programming,
    Dirk
    Edit: when comparing the strings, you also have to strip the extra ampersand.

  • Finding hidden characters and overriden styles

    Hello,
    I'm struggling with the following things:
    I need to check a document to see if it contains any hidden characters. Do i have to create a loop and check each of the characters? Because with a big document it is impossible to do. Or is there an easier way to do it?
    2nd question is that i need to check if any of the character styles have been overriden, i have yet to find a way to do this so any help would be highlyappreciated.

    ~ Trevor ~ wrote:
    I think I've come up with a nice technique here if I say so myself it can be utilized for umpteen properties.  To find them very quickly
    I actually think this is one of the best scripts I've written (by far no the most complicated but I think very efficient)
    Blah, Blah, Blah
    Drat, Drat, Drat!!! Darn! Egg on face!!!
    I was sure that using
    myOverRiddenStyleFlags = doc.stories.everyItem().textStyleRanges.everyItem().styleOverridden;
    while (l--) (myOverRiddenStyleFlags[l]) ? myOverRiddendTextStyleRanges.push(myTextStyleRanges[l]) : 0;
    would be a lot quicker than using
    while (l--) (myTextStyleRanges[l].styleOverridden) ? myOverRiddendTextStyleRanges.push(myTextStyleRanges[l]) : 0;
    well it's not. It is actually slower.
    On a nearly 600 page document with several thousand overrides the script took about 74 seconds to run (including making an array of the contents but not displaying it) when not using the flags and about 100 second when using them
    So this is not one of the best scripts that I have written at all and my newly discovered technique is pretty rubbish.
    Oh well, back to the drawing board.
    Anyway here's the boring old script using the good old convectional methods.
    // Script by Trevor to make an array quickly of Overridden Text Styles
    // http://forums.adobe.com/message/4853747#4853747
    #target indesign
    app.doScript("main()", ScriptLanguage.javascript, undefined, UndoModes.FAST_ENTIRE_SCRIPT, "List Overridden Text Styles");
    function main()
        var startTime = new Date().getTime(); // removable if the time alert below is removed
        var doc = app.activeDocument, myOverRiddendTextStyleRanges = [], l,
            //myOverRiddenStyleFlags = doc.stories.everyItem().textStyleRanges.everyItem().styleOverridden;
         myTextStyleRanges = doc.stories.everyItem().textStyleRanges.everyItem().getElements();
        l = myTextStyleRanges.length;
        while (l--) (myTextStyleRanges[l].styleOverridden) ? myOverRiddendTextStyleRanges.push(myTextStyleRanges[l]) : 0;
        // For the Sake of the Alert but not neaded otherwise
        l = myOverRiddendTextStyleRanges.length;
        var overRiddenContents = [];
        while (l--) overRiddenContents.push(myOverRiddendTextStyleRanges[l].contents);
        alert ("Script  took "+(new Date().getTime()-startTime)/1000+" seconds"); // removable
       // alert (overRiddenContents) // if there are a very lot of overRiddenContents this line can be problematic that's why it's escaped.

  • Issue with corrupted document, need Help !

    Dear all,
    In our company we use daily Indesign 7.5 (cs 5.5 package) and when we export the .ind document to .pdf the system crash.
    Above this the original document (.ind) is corrupted and we're not able to open thedocument.
    We loosed a lot of work and we're not able to restore de document.
    When we try to open the corrupted document this message appear :
    Can somebody help me?
    Thx and have a nice day.

    Thank you, yes, we at Markzware can try to help with your corrupt InDesign documents, for sure.
    From as far as we can see when dealing with the odd corrupt InDesign file from time to time, is that it comes down to three main reasons why these InDesign documents have issues:
    Font(s)
    Image(s)
    PowerOutage or Forced Stopped
    Fonts can indeed be a corrupt font itself, but also corrupt, over-loaded or otherwise odd-balled font caches. Here is a video on how to clear font caches in InDesign and although for a Mac in this video, I think you'll get the idea on how to do that on a PC as well:
    One highly corrupted image can ruin the show for your entire file. Check all images individually till you find the bad one and remove that. Also, more times then I can count, InDesign users drag-and-drop images from a web browser while visiting a web page, right into an InDesign layout. That is a big no-no. Not saying your are doing that, but just covering what can happen in the images category and a bad InDesign file.
    As for the odd power outage, well that is something maybe Tesla could have helped us with, but until a time when we are not dependant on AC/DC currents, it will remain a sore point. Power in your cases is likely not the issue though.
    Always report issues like these to Adobe though. They can also often help and if not right away, at least they may gather important details to help stop that type of corruption in the future.
    If all else fails and as mentioned, we as Markzware can help try and fix your files - Bad InDesign or Quark File Recovery Service
    Friendly Regards,
    David
    Markzware

  • Copy and paste from word to InDesign - foreign characters

    Hello,
    I have a Word file using foreign typefaces, Chinese, Korean etc. I have the fonts on my machine because the word document shows them OK..but, if I try to copy and paste the text into InDesign, those characters either don't show at all, or you just get the pink color with the little gray squares...Does anyone out there have any tips for how to handle this type of situation.
    Thanks!!
    babs

    Ooooh, okay. I retract my finger-waggling cautionary statement.
    It could be one of a number of different things. I almost always place instead of copy/paste, but I don't have any difficulty copying & pasting complex script text of any sort in any of my various versions and platforms. I'd figure that there are two different possible routes - either there's something about the styling or clipboard that is doing this (meaning that it could be unpacked exactly the same way as any font drop, no complex-script knowledge necessary) or there's something about the non-Latin text itself that is causing the problem. Take a look at the clipboard settings (Edit -> Preferences -> Clipboard Handling) to see if changing those settings resolves the issue, by e.g. changing the settings to raw text.
    If that doesn't work, I'd suggest posting a lot more detail. Platform, versions of Word and Indy, the particular fonts that are failing, a description of how styles are set up in the current Word and Indy docs, perhaps a sample of the Word and Indy docs zipped up and made available for testing (e.g. if I can successfully copy/paste into the doc when your user can't, then there's something wrong with the user's install), and so on. Without that kind of information, the best I can do is take random guesses.

  • Hidden Characters is not displayed properly

    Hi Friends,
    I am a user of Adobe Indesign CS4 (6.0.6). lately, I upgraded my MAC OS X to 10.6.4 version. I found out the Hidden Characters in Indesign becomed to be not displayed correctly. I captured a screenshot as below for reference. All Hidden Characters such as forced line break, table are displayed as rectangle box in total like below screenshot.
    But when i transfered to Mac OS X 10.4.11, all instances were fine.
    If anyone occurred this issue before, kindly please tell how to resolve it.
    Thanks in advance.
    L1on

    Typically I tend to advocate installing Mac OS X on a new hard drive and migrating the profile over. It's a huge timesaver and issues located to profiles are rare and generally easy to diagnose.
    This time around though I've had a couple of machines have runaway directory processes, which made me curse Bob for being right again.
    I'd still say it is a good idea beyond doing a fresh install to keep your last OS in a bootable format until you are wholly content with it. Migrating back a version of Mac OS X is not for the feint of heart. I had to do it do to printing and application incompatibility and it roached a good half day to get everything back on track on version back.

  • Hidden Characters Displaying Wrong

    So ever since I started using CS4 my InDesign will sometimes show my hidden characters improperly. There doesn't seem to be any consistency in when it happen. The only common thing I can think of is that it sometime happens after I open an Illustrator file, but not always. I have re-installed InDesign and I just reset my preference last week, but It still is happening. Anyone have any Ideas on what is going on and how to fix it?

    This is another example

  • [Mac 4.0.2] Show/Hide Hidden Characters

    Hello,
    Is it possible for my plugin to get notified when the end-user is switching Show/Hide Hidden Characters from InDesign's Type menu? And if the answer was YES then how could we do that would be the next question . . .
    Any pointer or direction to have this event watcher implemented smoothly would be very much appreciated indeed.
    Best regards
    Patrick Perroud

    Hi John,
    I modified my script and now I am getting error when I run it first time and when I run it again then it run fine.
    set the date_stamp to ((the current date) as string)
    tell application "Finder" to quit
    set OnOff to do shell script "defaults read com.apple.finder AppleShowAllFiles" 
    if OnOff = "NO" or OnOff = "OFF" then
      set OnOff to "ON"
      tell application "Finder"
      display dialog "Show all hidden files in this Mac ?" & return & return & date_stamp buttons {"Show Hidden Files", "Cancel"} default button 2 with title "/MSN/" with icon 1
      end tell
    else
      set OnOff to "OFF"
      tell application "Finder"
      display dialog "Hide all hidden files in this Mac ?" & return & return & date_stamp buttons {"Hide Hidden Files", "Cancel"} default button 2 with title "/MSN/" with icon 1
      end tell
    end if
    do shell script "defaults write com.apple.finder AppleShowAllFiles " & OnOff
    delay 1 
    tell application "Finder" to launch

  • Show hidden characters shortcut causes crash

    I'm running CS4 on Mac OS 10.5.8 (Indesign 6.0.4 which I believe is the latest).
    Lately, InDesign has started crashing when I use command+opt+I (the shortcut for show hidden characters), which I do A LOT for text design purposes. It doesn't crash every single time I use the key combo, but it's gotten to about 50% of the time, so that I'm afraid to use it. I'm very shortcut oriented rather than menu oriented, so please don't suggest I just stop using the shortcut (that's what my IT guy would suggest). It took me forever to even remember what the command was called that I was doing -- I ended up finding it by accident.
    Has anyone else run into this? Does anyone have any advice/suggestions?
    Thanks!

    I would start by Quitting Indesing, removing (putting on Desktop in case you have custom settings saved there) the Indesign Prefs;
    /Users/YOUR HOME FOLDER/Library/Preferences (Indesign Folder & .plist) and also removing the Indesign Cache folder;
    /Users/YOUR HOME FOLDER/Library/Caches.

  • "show hidden characters" is not working

    InDesign CC. Neither the show/hide grid nor the show/hide hidden characters works.

    Maybe you're in the wrong screen mode. Try View -> Screen Mode; invisibles like gridlines and hidden characters will appear in Normal, but IIRC not in Preview.

  • PC to Mac hidden characters

    Having problems displaying hidden characters and guides when opening a document created on a PC (CS3) on a Mac. Any tricks, suggestions?

    It has nothing to do with Windows/Mac. The document is likely in a
    preview mode.
    Bob

  • AreaText find hidden characters

    Is it possible to find out if a AreaText contains text that is out of bounds?
    I want to make sure that NO text is invisible after creating a new AreaText and I dont want to make it bigger then absolutly needed
    Trying to find it in the Scripting Reference: Javascript, but without result.
    any tips?

    Hi Fubar,
    I didn't check for  a long time in javascript references, but i working on another project, and may be this can help you:
    explanation:
    first, i take the length of content text
    second, i duplicate text and create outline, this make items of all visible text, so if this length is different than content text, there are thus some hidden characters
    1) create a document with an area text with contents
    2) run this below
    #target illustrator
    try {
    var doc=app.activeDocument;
    var text=doc.textFrames[0];
    var tLen=text.contents.length; // total length
    var tSpaceB=text.contents.split(" ").length; // number of spaces in tBefore
    doc.layers.add();
    doc.layers[0].name='TEMP';
    text.duplicate (doc.layers.getByName('TEMP'),ElementPlacement.INSIDE ); // duplicate for vectorizing
    var tTemp=doc.layers.getByName('TEMP'); // name it
    var ctTempVec=tTemp.textFrames[0].createOutline(); //vectoriz
    var ctTLen=ctTempVec.pageItems.length-1; // actual length ( = tLen without spaces )
    tTemp.remove(); // remove TEMP
    if (ctTLen+tSpaceB==tLen){alert ("There are no hidden characters")} else {
    alert ("there are "+(tLen-(ctTLen+tSpaceB))+" hidden characters")}     
    } catch (e){alert (e)}
    ciao, art.chrome

  • Strange Hidden Characters

    I have several editors who are getting very strange hidden characters appearing occasionally. It's not all the time and there doesn't seem to be a pattern. This started with CS4. They will be working and all of a sudden, all of their hidden characters change from the little dot to these large cross-like symbols. They can quit Incopy and restart and the symbols go away, but it's really a hassle. These editors are working on Macs. Has anyone else seen this?

    Changed to crosses? Could it be a stigmata type of thing? ;-)
    Seriously ... go to this post and download the PDF I link to there, it's a guide to all the hidden/special characters in InDesign as seen in both layout view and story view.
    http://indesignsecrets.com/free-guide-to-indesign-special-characters.php
    It's like a Field Guide. Let us know which one is a match!
    AM

  • Find Hidden Characters-in downloaded file

    All,
    I have a file interface that downloading file to SANS server using open dataset. But recently we are getting some hidden characters in the file. These are getting from a long text.
    Now my requirement is to find these hidden characters and display in the screen and user can correct then go for download.
    Currently i am using Notepad++ or using this link for finding the hidden characters
    http://string.online-toolz.com/tools/string-functions.php
    Now user wanted to use the same functionality with in SAP using ABAP.
    Any input on this appreciated.

    Similar functionality can be achieved by JavaScript. You can pass the entire Text and create your function in JS to find out the Hidden Characters. If you are successful finding the JS which can do this job for you, you can use [JS Engine|http://help.sap.com/saphelp_nw04/helpdata/en/49/a8e3c8d59811d4b2e90050dadfb92b/frameset.htm] available in ABAP.
    Refer to [ABAP & JavaScript|http://help-abap.zevolving.com/2011/10/javascript-in-abap/] to see the simple JS usage.
    Regards,
    Naimesh Patel

Maybe you are looking for