1 person found this helpful
Most likely, the documentation is wrong.
Thanks for the reply. I just wanted to make sure I wasn't missing anything. before I submitted another report.
Thanks for helping me out.
I just realized you are the same person who made http://try67.blogspot.jp/search/label/Spell-check.
I have no idea how you actually made your spell checker. Here is my version which I made and has the following functions.
Now, I understand you might not want to give away how you did things (I'd be happy to disclose how I made mine though),
but I was wondering if you could give me any pointers on how you made the "Spell Checking Zones" functionality?
(My current idea was to have the user put square boxes around what they want to check, grab the info about
those square boxes (maybe look at the time stamp) and then just check whether getPageNthWordQuads is within the Annots property method quads or something like that).
That's pretty much how I implemented it...
Thanks. It seems like it would be something like that. The only thing I wish is you could do searches on selected pages
and not the entire document, but that doesn't seem possible.
My company actually bought a license for your spell suite. However
there is an error on line 225: thisWord = thisWord.replace(/・g,"'");
(This error also appears in the demo version)
What were you trying to replace there?
1 person found this helpful
That line replaces some special unicode characters with a standard
apostrophe... It's very odd you're getting an error message as it is
working fine for me. I will make some changes and update you by email, if
you don't mind.
Thank you. Everything is working now. I appreciate the quick response.
(And to answer your question: I did open up the file before using it. If I figure out anymore about why the error happened, I'll let you know.)
I wonder if it's a Unicode issue. Saw one just like it this week. What platform was it made on (try67) and failing on (jesseg7681)?
Yeah, it was a Unicode encoding issue. My scripts are written on Windows
(XP earlier, 7 now) using Notepad++ and are ANSI-encoded for maximum
compatibility. I had to replace the plain-text Unicode characters with
String.fromCharCode() calls to get it working for Jesse. I'm not sure which
platform they're using, but my guess is that it's not Windows.
On Thu, Apr 4, 2013 at 10:22 AM, Test Screen Name
Yes, I think that has something to do with it. I'm on Windows 7 (Japanese Version), the character comes out as U+30FB, which is part of the Katakana writing system. (My system locale is set to Japanese). Probably on non-Japanese locales it works (just a guess though).
What I found yesterday was interesting, and might be worth sharing.
Background: scripts are stored as "text strings" (a specific thing, not just random strings) in PDF. All text strings can be in 1-byte or 2-byte coding.
1-byte uses "PDFDocEncoding". In theory this will go fine to other platforms.
2-byte uses Unicode. More portable, but twice the size.
What I found was that Acrobat X, when you edit a script event, looks at the script. If it has no Unicode characters, it stores a 1-byte string. If it has any Unicode characters (including that hyphen) it stores a 2-byte string. Maybe this breaks down sometimes, or maybe there is a way of editing that makes Acrobat think there is no Unicode when really there is... Maybe PDFDocEncoding is misread as "platform encoding". Anyway, more questions than answers.
Just want to stress that the script we're talking about is an external .js
file, not one embedded in a PDF file.
On Thu, Apr 4, 2013 at 10:39 AM, Test Screen Name
Definitely not relevant then. I don't know how Acrobat decides the encoding of .js files if they are single byte.
Thanks for sharing, anyway... You never know when this kind of info can be relevant.
Confirmed issue. Switching "system locale" for non-unicode programs under language regional settings to US (English) fixes the issue. This issue is due to the system locale being Japanese. The character properly displays as the unicode quotation mark under US English, but changes to Katakana character under Japanese locale.