Back

If your email is not recognized and you believe it should be, please contact us.

  • You must be logged in to reply to this topic.Login

Rogue 'point'

Return to Member Forum

  • Author
    Posts
    • #56249

      Am assisting in troubleshooting a page that turned completely blue in ouput PDF. Finally discovered an orhpaned pen 'point' hiding under a photo as if someone clicked once with the pen tool then immediately switched tools. Turns out it had a blue fill attached. I have seen these orphaned points cause problems of various kinds and they are darn near impossible to find. Anyone know of a technique or script to find single points on a page to add to my troubleshooting arsenal?

    • #56250

      Yeah, I've seen that before. Seems no-one at Adobe expected this! You could file a bug report …

      This quick script searches for all stray points (with only one path and consisting of one single point) and deletes it. It seems to work, even if the single point is grouped with other objects, but I suspect it will fail if the point itself is locked or on a locked layer. If you find one, I'll add checks for those too.

      p = app.activeDocument.allPageItems;

      for (i=p.length-1; i>=0; i–)
      if (p[i].hasOwnProperty (“paths”) && p[i].paths.length == 1 && p[i].paths[0].pathPoints.length == 1)
      p[i].remove();

    • #56251

      Hi I tried this.

      Pasted into text doc, saved as .jsx and ran it. Errored out

      Javascript Error!

      Error Number:8

      Error String: Syntax Error

      Line: 2

      Source: for (i=p.length-1; i>=0; i–)

      Offending Text: –

      I should have mentioned, i'm in CS3

      As ever, thanks for posting so quickly

    • #56254

      Ouch. Foiled again! by the smart character formatting script that runs this site …

      In this case, two consecutive hyphens – – were automatically converted to an en-dash –, which is great, really, for a general text, but not so great for code. Please adjust manually … I'm sure (fairly … a bit …) the script ought to run fine under CS3 then.

      (“Foiled again” because in the past I struggled with disappearing backslashes (fortunately there ought to be none in this script) and double quote marks, which were converted to “smart” curly ones … One more thing to keep an eye out when posting scripts.)

    • #56257
      David Blatner
      Keymaster

      Sorry that our forum is messing up your code, Theun. Frustrating. I don't see an easy way around that, but… wait, here is an option:

      https://creativepro.com/for…..files-test

    • #56279

      Sorry for the delay. Was not at work yesterday.

      Made the change and it works just fine now.

      Thanks again!!!!

    • #56298

      @Jongware: to circumvent this foolish forum software in the case of “i plus double minus” one could write the long form i=i-1, but in other cases like blackslashes etc.pp. it would be too complicated to rewrite a orderly written script into it's forum user-friendly version.

      @David: or could you point to all problem characters and instances of character pairs that will spoil good looking code? So, hopefully, we can do a search/replace sequence to “format” code for avoiding garbage.

      Uwe

    • #56300

      .. or a medium long form: i-=1 ;-)

      David is looking into a file attachment option. I think that's the best solution: no more cumbersome copying entire scripts into and out of a post, no ultra-long posts, and if you want to point out interesting features or techniques, you can always insert code fragments in the text.

Viewing 7 reply threads
  • The forum ‘General InDesign Topics (CLOSED)’ is closed to new topics and replies.
Forum Ads