m1b
Community Expert
m1b
Community Expert
Activity
3 hours ago
Hi @wckdTall-2 aside from ensuring the script file is encoded as UTF-8 (given that I can save and open it and the Japanese characters are fine I assume this is adequate), you can also add this to the start of your script and see if it helps:
$.appEncoding = 'UTF-8';
- Mark
... View more
4 hours ago
Thank you all for testing! 🙂 So I know that it isn't a problem local to my system.
@Eugene Tyson that is good information! My usual (naive?) approach is (a) I use Adobe Paragraph Composer until it gives a bad result (often!), and then (b) I switch to Adobe Single-line Composer just for that paragraph and do my best to fix it.
@Peter Kahrel thanks, that doesn't surprise me but I tried to find an existing bug report and nothing appeared in uservoice that I could find.
@Mike Witherell thanks for your comments... the demo document might be a little messy, as it was copy/pasted out part way during the cleaning up of someone else's document, but I had the paragraph styles working the way I wanted. This bug—now confirmed—appeared during a real use case and it was weird because it was easy to fix—just change almost anything: add a character, remove a character, change the table width, and the whole thing would go back to normal... only to fail again when another change triggered it again. And I couldn't find any reported instance of this issue, so I felt the need to post something here, even though I had found a workaround.
> But when would I validly do that? Override Paragraph Composer with Single Line Composer? I wouldn't do so, normally, would I?
Oh dear! This is literally what I *normally* do! See my comment to Eugene above. Is there a better way to fix a bad composition caused by Adobe Paragraph Composer?
However in the case of my demo document, it is ikely that I was fiddling around before I realised some of the parameters of the presumed-bug. But when I "Clear Overrides" on all text in the demo document, the bug is still evident.
> But if I edit the paragraph style Body to use Single-Line Composer, it functions correctly.
Yes! that is the workaround that I used. But I only needed to change the last paragraph before the span (the magenta paragraph).
> Interestingly, I notice the Heading and the Table Caption are set to Span; but the table styles are not set to span
Not too interesting... I set the Heading and Table Caption to span because they are in the text frame that has 2 columns, but the table styles—meaning the paragraph styles used for the table cells' text—don't spam because a cell doesn't have columns. As an experiment I set the table cell paragraph styles to span, but it didn't change anything, which makes sense.
I appreciate you all looking into it and confirming the bug. Thank you again!
- Mark
... View more
Mar 03, 2025
Hi @punit_9859, I don't know that error, and I couldn't find the equivalent file on my system (MacOS, though).
So I don't have an answer, but here are some things to try:
• uninstall Illustrator and re-install.
• setting permissions on the file or folder(s) mentioned in the error message?
• try deleting that file(!) or just move it somewhere else
- Mark
... View more
Mar 03, 2025
I was hoping at least one person could confirm that it isn't just on my system! 🙂
If anyone had a chance could you please open my demo document and see if you get the same result I got, shown in the gif above? Only 5 steps to test!
@Peter Kahrel @rob day @Marc Autret @Eugene Tyson @Mike Witherell
... View more
‎Mar 02, 2025
06:16 AM
Hi @Olivier24257193r870 could you please post an example of what you mean?
... View more
‎Mar 01, 2025
12:09 AM
1 Upvote
Hey @Eugene Tyson things don't always work out in the end, but that was great problem solving on your part. 🙂
... View more
‎Feb 28, 2025
08:20 PM
Thanks @Marc Autret, in my quick test I did notice that app.colorTransform was returning 0..1 numbers, but I was too silly to realise that it would also require 0..1 numbers, too! Haha.
- Mark
... View more
‎Feb 28, 2025
05:43 PM
Hi @SmythWharf, just for starters, are *you* able to select items on different pages (edit: I was thinking spreads) at the same time? I don't know how to do that. - Mark
Edit: Ah I think I understand now... you mean two items on unconnected pages in the same spread. Of course. Sorry.
... View more
‎Feb 28, 2025
04:23 PM
1 Upvote
Hi @imashleysantoro it sounds like this known bug. If you read that page you might get an idea of how to fix it. I had the problem and it might have been related to my font manager RightFont which I don't use any more. Honestly I'm not sure if that was the issue, but it does seem to be font-related. You might need to try a few things, such as closing fonts, or quiting font manager apps and see how you go. Good luck.
- Mark
... View more
‎Feb 28, 2025
03:43 PM
Hi @abdullh_raad027_ perhaps you could give readers an introductory paragraph explaining your project and reason for posting it on a user forum? Outlining a potential use case for this tool might be helpful too. Are you asking other users the answers to the Next Steps questions? You will get more help if you make your questions very specific and actionable, which currently they are not. Also, some of your requirements are formidable development challenges.
- Mark
P.S. Those emoji codes don't work on this forum—you can just enter the emoji directly though.
... View more
‎Feb 28, 2025
03:31 PM
Edit: I posted a script here originally, but I realised that it gives a bad result when there is text selected. I won't bother fixing it, I'll just delete it, because @Marc Autret's has found a much better way to do it, that doesn't have that problem. Please see Marc's post.
- Mark
... View more
‎Feb 28, 2025
03:32 AM
I tried it out @John37830937iqgg, but it seems to return the size of the clipping path, not the visual part of the clipping group. 😞
... View more
‎Feb 28, 2025
03:27 AM
That's a clever idea @John37830937iqgg, I'll give that a try and see if it covers the edge cases. It might be a winner!
- Mark
... View more
‎Feb 27, 2025
05:34 PM
Thanks @Joel Cherney I always forget that option. I will be interested to see if it solves the problem here. There's a solid chance, but sometimes the problem can be related to something else, such as a change in the OS.
... View more
‎Feb 27, 2025
04:15 PM
@Riannon368885617n15 great to hear!
(I see your other reply now but the forum software makes these threads very confusing to navigate! Grr.)
... View more
‎Feb 27, 2025
03:52 PM
1 Upvote
@Riannon368885617n15 did you use my updated script? If it still gives an error, I need another sample document that gives the error.
- Mark
... View more
‎Feb 27, 2025
03:48 PM
1 Upvote
Yes Robert, but it is only a sample document. On OP's machine they might be fine.
... View more
‎Feb 27, 2025
03:47 PM
1 Upvote
Yes that seems to be the problem—a carriage return in the URL. The encoded version you show from Acrobat has double-encoded the carriage return (the %250D). Normal (correct!) encoding is %0D, but if you encode that again the % is encoded as %25.
It is strange that the problem doesn't appear in the indesign one. I think the hyperlinks might be a bit messy.
... View more
‎Feb 27, 2025
03:25 PM
Hi @Textbook Perfect I haven't tried, but are you using this version? Also you could try this script, which looks great.
- Mark
... View more
‎Feb 27, 2025
03:11 PM
@Riannon368885617n15
> Interesting thing is - the URL's work when in acrobat pro or viewing the pdf
Interesting! Are you sure they are going to the *full* URL? Maybe they are missing the part after the carriage return, ie. "&utm" etc. Or maybe in the process of generating the pdf hyperlinks it automatically removes illegal characters, but not in the other process.
- Mark
... View more
‎Feb 27, 2025
03:04 PM
Thank you @Riannon368885617n15 that's helpful. I've updated my script above to work with your sample document. The bad URLs had a carriage return or linefeed in them. Please try it out the revised script.
- Mark
P.S. After reading Robert's comment, I should add that yes most of your hyperlinks were broken, but I assumed that was because you made a quick demo document. I assume they use shared destinations in another document that we don't have so they are broken. When I run my script on your demo document it fixed exactly 8 URLs. I'm not sure if that's what you expected.
... View more
‎Feb 27, 2025
01:31 PM
Hi @Meeiir I was waiting for someone knowledgeable to answer this, but no one has yet, so I'll answer as best I can, which is to say:
1. I believe CEP is still the only supported way to create extensions for Illustrator. (And plugins via the SDK).
2. UXP is not available in the released version of Illustrator.
So there might be something else going wrong for you. Unfortunately, I have no idea what it might be. I would start by attempting the most basic sample CEP extension from the Adobe CEP github and working out exactly what is going wrong. Maybe even uninstalling Illustrator and re-installing? Sorry I can't be more help.
- Mark
... View more
‎Feb 27, 2025
12:03 PM
You're welcome!
... View more
‎Feb 27, 2025
05:56 AM
1 Upvote
Yep, done that many times! Whenever I think I've found a bug, I immediately set about creating that bare bones version that I can post here and everyone can test. Usually in the process I realize what's really going on. Haha!
- Mark
... View more
‎Feb 27, 2025
05:54 AM
1 Upvote
Hey @Riannon368885617n15, can you try this script and see if it works? It's a stab in the dark, but it might do the trick.
- Mark
/**
* @file Clean Hyperlinks.js
*
* Attempts to strip bad characters from
* the active document's hyperlink URLs.
*
* @author m1b
* @version 2025-02-28
* @discussion https://community.adobe.com/t5/indesign-discussions/update-urls-to-remove-hidden-character-in-large-document-so-they-function-correctly/m-p/15180488
*/
function main() {
const illegalCharacters = /[\x00-\x1F\x7F-\x9F\u200B\u200C\u200D\n\r]+/g;
var doc = app.activeDocument,
hyperlinks = doc.hyperlinks,
counter = 0;
for (var i = 0; i < hyperlinks.length; i++) {
var hyperlink = hyperlinks[i];
try {
if ('HyperlinkURLDestination' !== hyperlink.destination.constructor.name)
continue;
} catch (error) {
// $.writeln('Hyperlink ' + i + ' links to a missing document.');
continue;
}
// quick attempt to strip bad characters
var originalURL = hyperlink.destination.destinationURL,
newURL = originalURL.replace(illegalCharacters, '');
if (newURL === originalURL)
continue;
// fix the hyperlink
hyperlink.destination.destinationURL = newURL;
counter++;
// $.writeln('Fixed Hyperlink ' + i + ' URL: ' + hyperlink.destination.destinationURL)
}
alert('Cleaned ' + counter + ' hyperlink URLs.');
};
app.doScript(main, ScriptLanguage.JAVASCRIPT, undefined, UndoModes.ENTIRE_SCRIPT, 'Clean Hyperlinks');
Edit 2025-02-28: changed code a bit to work with OP's sample document.
... View more
‎Feb 27, 2025
05:37 AM
1 Upvote
Hi @Jeremy bowmangraphics, it seems to be working as normal for me (Indesign 20.1, MacOS 15.3.1). Can you set up a bare bones demo document and script that shows the problem?
- Mark
... View more
‎Feb 27, 2025
03:16 AM
@aniri5j9ox8tw2ln I have made it much easier to adjust now. Just change the line:
et.minimumSize = [1000, 600];
... View more
‎Feb 27, 2025
02:52 AM
1 Upvote
@aniri5j9ox8tw2ln here is a script that collects all the linked files of all the open documents and copies them into the destination folder. Script will ask you for the destination.
- Mark
/**
* @file Collect All Documents Links.js
*
* Script will ask you to choose a folder
* and will *copy* all open documents' linked
* files into it. The Indesign documents
* won't be relinked to them, however.
*
* @author m1b
* @version 2025-02-27
* @discussion https://community.adobe.com/t5/indesign-discussions/suche-script-oder-plug-in-verknüpfungen-suchen-und-einfärben/m-p/15180561
*/
(function () {
if (0 === app.documents.length)
return alert('Please open some documents and try again.');
var destination = Folder.selectDialog();
if (
!destination
|| !destination.exists
)
return;
var paths = app.documents.everyItem().links.everyItem().filePath;
for (var i = 0; i < paths.length; i++) {
var f = File(paths[i]);
if (!f.exists)
continue;
f.copy(File(destination + '/' + f.name));
}
// reveal the destination folder
destination.execute();
})();
Edit 2025-02-27: minor typos.
... View more
‎Feb 27, 2025
02:22 AM
1 Upvote
Thanks @Laubender that's interesting. I think Apple deprecated the old HFS paths, eg. "MacintoshHD:Users:mark:Desktop".
- Mark
... View more
‎Feb 27, 2025
01:26 AM
Well for starters, here is a quick script to show you the link paths.
- Mark
/**
* Show All Link Paths.js
*
* @author m1b
* @version 2025-02-27
* @discussion https://community.adobe.com/t5/indesign-discussions/suche-script-oder-plug-in-verknüpfungen-suchen-und-einfärben/m-p/15180561
*/
(function () {
var doc = app.activeDocument,
linkPaths = doc.links.everyItem().filePath;
alerter('Link Paths for "' + doc.name + '"', linkPaths.join('\n'));
})();
/**
* Show text in a multiline edit text field.
* @version 2024-07-30
* @Param {String} title - the title of the alerter
* @Param {String|Array} input - the text content (array of strings will work).
* @Param {Number} [width] - the dialog width (default: most of screen width).
* @Param {String} [buttonTitle] - the title of the button (default: 'Close').
*/
function alerter(title, input, width, buttonTitle) {
if (input instanceof Array)
input = input.join("\r");
var w = new Window("dialog", title),
et = w.add("edittext", undefined, input, { multiline: true, scrolling: true }),
button = w.add("button", undefined, buttonTitle || "Close", { name: "ok", alignment: ['right', 'center'] });
et.minimumSize = [1000, 600];
return (1 === w.show()) ? et.text : null;
};
Edit 2025-02-27: cleaned up alerter function to make it easier for OP to adjust size.
... View more