Copy link to clipboard
Copied
Copy link to clipboard
Copied
I've seen this a few times at the level of story, maybe the underltying problem is the same as with character. Anyway, try
foundItems[i].contents = ''
Copy link to clipboard
Copied
But this wont cause any issue right. as we are just assigning '' empty character and not removing the character itself.
Copy link to clipboard
Copied
character.remove() and character.contents = '' are equivalent. They have the same effect. It won't cause any problems. Just try it.
Copy link to clipboard
Copied
Copy link to clipboard
Copied
I dont want to change all the found Charcters, In my Codebase I have created custom character style and applied to Characters for processing some other functionality (which I have not shared here). But Conclusion is I want to remove characters with perticular character style . if (foundItems[i].appliedCharacterStyle == markerStyle)
Copy link to clipboard
Copied
But you're looking for a specific marker:
app.findGrepPreferences.findWhat = BOUNDARY_MARKER;
So if you'll combine this marker WITH specific CharStyle - you can use Find&Change to remove ONLY instances where this specific marker has this specific CharStyle applied.
Copy link to clipboard
Copied
Something like this
Copy link to clipboard
Copied
Yes.
If it crashes - then your file might be corrupted - or you've a problem with fonts?
Copy link to clipboard
Copied
And you don't have to store results - just changeGrep() ;
Copy link to clipboard
Copied
app.findGrepPreferences.findWhat = BOUNDARY_MARKER;
app.findGrepPreferences.appliedCharacterStyle = markerStyle;
Copy link to clipboard
Copied
Even that being the case I have set up try catch, its not going into catch, Server just stops here
Copy link to clipboard
Copied
Even that being the case I have set up try catch, its not going into catch, Server just stops here
By @adarsh_0848
Have you tried on the desktop version?
Copy link to clipboard
Copied
In desktop there is not issue at all. I'm facing issue in Indesign Server with same document.
Copy link to clipboard
Copied
In desktop there is not issue at all. I'm facing issue in Indesign Server with same document.
By @adarsh_0848
Are you sure you've EXACTLY the same fonts?
Copy link to clipboard
Copied
Yes I'm sure. I'm using the same document in both InDesign desktop and InDesign server.
Copy link to clipboard
Copied
Yes I'm sure. I'm using the same document in both InDesign desktop and InDesign server.
By @adarsh_0848
But I'm asking about the "environment", not documents.
Fonts are not part of the Document.
If you'll have conflicting / duplicated or corrupted fonts on the server - and not on the desktop...
Try IDMLing on your INDD file anyway - export as IDML, open, save with a new name - do not overwrite your original file - maybe Server is more "sensitive"??
Copy link to clipboard
Copied
I'm not sure about fonts(where are they stored), I can see font present in InDesign server aswell, I am using Adobe ExtendScript Toolkit CC to debug InDesign server process of executing scripts. I can see paragraph style and fonts applied to the character which I want to remove.
PS: I have created IDML, what should I do next, try and run scripts on that in InDesign server?
Copy link to clipboard
Copied
Copy link to clipboard
Copied
Thank you@Robert at ID-Tasker, this works, so the thing is Fonts, Linked Graphics etc (image below)
are part of package.
, But the
Copy link to clipboard
Copied
So IDMLing worked - and your original INDD file was corrupted?
7 - depends if they are made of native objects - Rectangle, line, oval, TF, polygon - or are linked external files. You can also embed external files.
14 - scripts - no.
Copy link to clipboard
Copied
I still don't know what was causing the as I am creating a custom character style with default font and font size as 0.1 and processing(more than 200+ lines of code, this doesnt manipulate the font or the character style) it. Once the processing is done I am removing the characters and the character style.
But foundItems[0].remove() wasnt crashing for all the characters for few it was.
Copy link to clipboard
Copied
6 - not sure - never checked - you can link external doc / excel file - but contents is directly available for modification - although, everything might will go out of whack when the original linked file gets updated...