rudiwarttmann
Participant
rudiwarttmann
Participant
Activity
‎Feb 20, 2025
02:20 AM
Oh, and, by the way, if you follow the recommendation 2. and copy cells instead of cell contents, you clearly copy all cell properties as well, inasmuch you won't need the step to transfer all cell properties. What you definitely should do is to transfer all column properties using this neat technique.
... View more
‎Feb 19, 2025
11:36 PM
Two more notable things regarding the t.columns.add(LocationOptions.XXX, t.columns[n]) command: 1. It remains completely unclear what exactly is added with which content if you use this command. Intuitively you would assume that the column is just duplicated just as if you would move a column manually in your layout - where really everything is duplicated. But this is NOT the case, and also here no documentation available at all, so that you need to endeavour for an arduous trial-error experience. It turns out that only mere textual content is duplicated; no tables in cells, no anchored objects. 2. If you try to copy the cell's content using select(...) and app.copy(), you will be confronted with error messages eg if the cell content consists only of an anchored graphic. Therefore, don't copy the cell's content, but copy the cell as such instead - i.e.: Don't use something like select(table.columns[x].cells[y].texts[0]) and copy this, but use select(table.columns[x].cells[y]) and copy/paste that. Which seems to transfer text, tables, anchored items. (Of course, also here no official documentation available.)
... View more
‎Feb 19, 2025
11:38 AM
This technique works well, unless you have just another table in any cell in the column to move. I personally would say that this is an InDesign bug that not any cell content is duplicated but only the "textual" one. You will end up with an empty new cell in this scenario. What you in fact have to do in this case is - unfortunately - using the computer's clipboard function, using the copy/paste mechanism mentioned below.
... View more
‎Jan 29, 2025
11:52 AM
2 Upvotes
To make it crystal clear: This is the intended - correct - result: You can see clearly that the graphic frame exactly matches the SVG dimensions, i.e. that there is no white space around.
... View more
‎Jan 29, 2025
11:49 AM
1 Upvote
Hi Abhisek: Thank you very much for taking care about this. I'm afraid you're wrong - also on your MAC my SVG file (the striped one) is not placed correctly. You can clearly see the white space around the actual square within the graphic frame which is not part of the graphic. The only difference in your two screens is that on MAC you'd enabled the "high" display performace, on WIN you hadn't. I've been on MAC, InDesign CC 2025, v. 20.0.1; I've just updated to v. 20.1 and get the same - wrong - result with this. Thanks, Rudi
... View more
‎Jan 29, 2025
06:16 AM
1 Upvote
Hi, the SVG was originally created by myself on my local machine with Adobe Illustrator CC 2025 and from there saved as a SVG 1.1 with default settings. You can find the SVG file here: https://www.swisstransfer.com/d/905e493e-ec28-433b-b4bb-65960a5ffbd0 The file is stored on my MAC (MB Pro M4) local hard disk in a folder like "/users/rudiwarttmann/documents/..." and was placed into an empty InDesign CC 2025 file.
... View more
‎Jan 29, 2025
02:59 AM
Of course I don't know it exactly, either, but having a closer look you could have the idea that the developers had borrowed some code from the QR Code module which also adds extra white space (clearing area) around the actual content - interestingly exactly the same amount ...
... View more
‎Jan 29, 2025
02:47 AM
1 Upvote
Hi Om Nath Jha: It seems that you weren't successful. OK - it's just five years or so ... The bug still persists, and it's really annoying. Example:
... View more
‎Jan 21, 2025
01:02 AM
Doug is struggling with the automatic horizontal, not vertical adjustment of a table cell based on its content. Which is _not_ part of InDesign's functions (for obvious reasons).
... View more
‎Jan 16, 2025
06:35 AM
This one seems to work, i.e. it ungroups nested groups as well: while ( true ) {
app.activeDocument.groups.everyItem().ungroup();
if ( app.activeDocument.groups.length == 0 ) { break; }
}
... View more
‎Jan 16, 2025
06:27 AM
This doesn't seem to work for groups in groups, i.e.: recursive un-grouping doesn't work this way, unfortunately.
... View more
‎Oct 19, 2024
07:49 AM
1 Upvote
Well, then go ahead ... what is your question to the community ... ? You will quickly recognize that just counting the number of characters by far won't do the job - even if you use a even-spaced font like "Courier". Eg: What if there is more than one line of text in a cell? You will have to make quite a few decisions along the way and need to first make sure that certain preconditions are met. That said, you could certainly mimic the Excel function mentioned in this thread, letting the user select any cell in the column in question and then start a script. The script would have to examine line by line of text in any cell of this column, find out the largest one and take this as the basis of the new column width. So far it's pretty straightforward, the only noteworthy thing is that the actual width of a line can be calculated as the difference of the horizontal position of the first and the last insertion point. Now you should have everything at hand to write a great script that mimics Excel "Adjust Column Width" function, and of course you would share it here with the community 🙂
... View more
‎Oct 03, 2024
02:06 AM
This is clearly a bug in the scripting environment, and it has been a bug for more than 10 years now, most probably from the first day on. What's really weird is that Adobe is aware of this bug and hasn't managed to fix it yet for any reason that surely no one at Adobe can even tell you. (If you're lucky enough managing to encounter someone at Adobe who even understands this issue.)
... View more
‎Mar 10, 2024
03:23 AM
Unfortunately the answers so far don't really help to really answer the question. What you really need to do in order to get a predictable CSV from your PDF form field data, having full control, is the following: Create a JavaScript which you can start, for example, by using the "Option" area of a "Button". (All JavaScript-related information can be found here: https://opensource.adobe.com/dc-acrobat-sdk-docs/library/jsapiref/JS_API_AcroJS.html .) Within this JavaScript, you iterate through all form fields using eg: for ( i = 0; i < this.numFields; ++i ) { theField = this.getField(this.getNthFieldName(i)); // acquire eg the Field's name and value and write it to a string (9 = TAB; D = Return): myCSV = myCSV + theField.name + "\u0009" + theField.value + "\u000D"; ... } Then, you create a data object and have it exported, having opened a dialog window to let the user choose the CSV's location, eg like this: this.createDataObject("output.csv", myCSV); this.exportDataObject({ cName:"output.csv", nLaunch:"1"}); I hope you can get the principle and now tailor you CSV to your needs.
... View more
‎Feb 01, 2024
09:25 AM
Thanks - that might be the case, but this is beyond reality of at least agencies and vendors ... on most machines, there are multiple InDesign versions installed in order to match all customer's InDesign versions. For me, it's still a bug raised as a side effect of any other development, and it continues passing Adobe's, hm, quality assurance.
... View more
‎Jan 19, 2024
01:53 AM
Very sorry - step 3 must of course be like this: myDoc.hyperlinks.add(myHyperlinkSource, myHyperLinkDestination); 🙂
... View more
‎Jan 19, 2024
01:34 AM
In order to equip a frame with a hyperlink, you basically have to do the three following things: 1. declare the frame be a hyperlink source within your InDesign document; 2. define the hyperlink destination, i.e. where the link should point to; 3. add the hyperlink as such to your InDesign document. With InDesign scripting, these steps look something like this: // the document, for example like this: myDoc = app.activeDocument; // example text frame on the first page, named "hello" (Layers panel) myFrame = myDoc.pages[0].textFrames.itemByName("hello"); // step 1: myHyperlinkSource = myDoc.hyperlinkPageItemSources.add(myFrame); // step 2: myHyperLinkDestination = myDoc.hyperlinkURLDestinations.add("https://myOwnCoolWebsite.com/hereWeGo"); // step 3: myDoc.hyperlinks.add(newSource, newDestination); Now you can export your InDesign document as an "interactive PDF", making sure that the option "Hyperlinks" is activated in the PDF export dialog window. And please keep in mind that there are different types of hyperlink sources - be sure to see the InDesign API for these.
... View more
‎Dec 13, 2023
05:34 AM
1 Upvote
If you'd like to do it really well, you'd need in fact to iterate through each cell, looking recursively at its content - since a cell can contain other tables or text frames containing tables and so on. Moreover, it is explicitely not enough to select the table, hoping that cells are worked off automatically when invoking a table-related command. Anyway - you'd really consider using the techniques explained below instead of invoking menu commands which should be the very last option to choose. Just a simple thing: Have you tried invoking a menu command during this menu command has been taken out of the menus using "Edit > Menus"? Fingers crossed that it works.
... View more
‎Dec 12, 2023
08:49 AM
I see that Diane understood well what it was about, and gave correct instructions to break the links of ALL paragraphs to their respective styles in one or in multiple threaded text frames. Inasmuch, she exactly answered the question.
... View more
‎Dec 12, 2023
07:47 AM
Sorry, obviously only one period character in text.applyParagraphStyle(.....);
... View more
‎Dec 12, 2023
05:30 AM
In fact there is unfortunately no command like "...breakLinkToStyle(...)" or so. What you need to do is the following in order to break the link from ... : table to table style: table.appliedTableStyle = app.activeDocument.tablesStyles[0]; table.clearTableStyleOverrides(); cell to cell style: analogous, replacing "table" by "cell"; object to object style: analogous, replacing "table" by "object"; paragraph from paragraph style: text..applyParagraphStyle(app.activeDocument.paragraphStyles[0], false); character from character style: analoguous, replacing "Paragraph" by "Character". Not kind of straighforward, but anyway, it works.
... View more
‎Nov 17, 2023
06:44 AM
Thanks a lot - yes, strange enough, but will do it this way. I remember something similar - wasn't that the thing how to navigate to a URL?
... View more
‎Nov 17, 2023
06:13 AM
To come back to the actual question: "How can I change the reference point in InDesign": Manually, it's possible to change the standard reference point with _no_ document open, i.e. without a "Layout Window". Is this also possibly by scripting? Or is also this lacking in the scripting API? (Just as a side note: You can't set a text frame on a master page to be the "primary text frame" by script.)
... View more
‎Nov 17, 2023
12:37 AM
Hi Uwe, I'm afraid I've been no longer active in the Prerelease (nor in the Developer) forums for years now for various reasons. Sadly, there is no property "z-index" or "stacking_order" or so that could give me the appropriate index for each object on the spread directly. However, I perfectly understand that altering the z-index of an object by script would, in turn, make it necessary to re-stack all other items on the respective spread which could have unpredictable side effects. Anyway: Given that the "allPageItems" array reflects the correct stacking order, then easy workarounds can be used eg to find out the relative position of two objects - i.e. which one is on top of which one - which is the point of stake in my current project. Cheers, Rudi
... View more
‎Nov 16, 2023
06:41 AM
It seems that even the array "allPageItems" is built in the correct z-order, beginning from the top to the bottom, regardless of the object type - just as if the objects are put together as they appear in the Layers panel. However, this is just an empiric finding -- so: Could someone of the Adobe folks please confirm this finding as the actual InDesign behaviour or tell us that we just have been lucky so far? Thanks a lot!
... View more
‎Oct 19, 2023
03:15 AM
1 Upvote
That solution works fine, in principle, however, here are two important amendments: 1. If you only need the actual page number, then you could of course use the name, but the "name" can appear multiple times within an InDesign document (different sections). So you have at least to check the section as well. Or you assess the page's "index" and in a second step you find out the actual page number. 2. If the cell overflows, then you don't have a chance to assess any kind of insertion point, baseline etc. simply because this layout information is not present - since not shown on the monitor. What you have to do is to save the "<cell object>.texts[0]" first, then remove it eg using "<cell object>.texts[0].remove()", then assess the insertionPoint[0] plus additional information, and then restore the "<cell object>.texts[0]".
... View more
‎Aug 15, 2023
02:19 AM
Nice to see, thanks for sharing. I'm using InDesign 18.4 on Win11 hence I think I'm up-to-date 🙂 No doubt that you're showing a plug-in - which is still in a beta phase. I'm talking about standard InDesign scripting. Where trying to add a second index fails. Unless you can provide a script command for it - I didn't succeed. However, I wouldn't say that I'm a scripting wizard ... and I'm eager to learn everyday from the Pros.
... View more
‎Aug 15, 2023
02:00 AM
Here's now the way along which you can change your index entries to literally anything: 1. Loop through "allTopics" from back to forth: 1a. save the allTopics[i].name into a variable X 1b. If there is no allTopics[i].sortOrder yet then set allTopics[i].sortOrder to allTopics[i].name + "####" 1c. replace whatever you need to replace within the variable X 1d. set allTopics[i].name to the variable X The tricky part is to reset the sort order because InDesign resorts - and re-indexes! - the index array instantly after changing each sort order. 2. Loop through "allTopics" from back to forth: 2a. delete each allTopics[i].sortOrder if it contains "####" However, there can arise a lot of situations where even this approach still brings "At least one index entry contains illegal characters ..." - I found, for example, that blank characters imported from a MS Word index are sometimes considered "illegal" ... so I replace all blanks by another character and re-replace it later on. Very strange, and unfortunately no real documentation from Adobe at this point ... like, for example: "Which characters are ever considered 'illegal' by the Index function"? Only in the property "name" or also in the property "sortOrder"? And more - hence you need to perform time-consuming, cumbersome investigations and are still unsure if you're doing the right thing. Not funny. Good luck!
... View more
‎Aug 14, 2023
10:40 PM
1 Upvote
I found a nice solution but still have to investigate whether this is really the solution. What you have to do is to prevent the index from being re-sorted instantly after changing a topic's name. That can be done by first applying a specific "sortOrder" to each topic. Ideally you'd use the topic's name, complemented by something that you can easily find afterwards and delete this special sortOrder entry later on. For example something like: for ( var i = 0; i < myIndex.allTopics.length; ++i ) { // first replace each (empty) sortOrder by the topic's name complemented by some silly stuff: if ( myIndex.allTopics[i].sortOrder == "" ) { myIndex.allTopics[i].sortOrder = myIndex.allTopics[i].name + '####'; } // now you can change the name as you like: myIndex.allTopics[i].name = myIndex.allTopics[i].name.replace(/[aeiou]/gi, 'xyz'); } ... and finally, you just have to delete those sortOrder entries which contain those trailing "####".
... View more
‎Aug 14, 2023
09:52 PM
The API says "indexes - a collection of indexes" and offers a method "add" ... however, it seems that only one index is allowed. You can't add a second index behind the scenes - which might make a little sense because in the front end there is in fact only one index (in opposite to TOCs). However, this would have been a nice approach: to add a second index, copy all topics with changed names into it and then remove the first index, making the second the actual index. Maybe it works with a "standard" array in which you can push all topics first ... might be worth to try. Anyway, just looping through "topics" (only first level!) or "allTopics" (all 4 levels), changing and resaving names, will NOT bring the intended result.
... View more