adobe-indesign

What methods and properties are provided for use through scripting for standard InDesign panels?

假如想象 提交于 2019-12-24 09:28:18
问题 I’m able to get a reference to, for instance, the “Scripts” panel; but, although its constructor’s name is 'Panel' , it doesn’t seem to have the show and hide methods like panels created through scripting, or the window property, etc.: var scriptsPanel = app.panels.item('$ID/Scripts') scriptsPanel.window // → “Object does not support the property or method 'window'” scriptsPanel.show(); // → “scriptsPanel.show is not a function” It does have some of script-created Panels’ properties, though:

Web Link Buttons with Variable URLs in InDesign

梦想的初衷 提交于 2019-12-24 04:53:30
问题 My work assignment of late has been developing an interactive PDF catalog of our products that my superior can distribute digitally and let potential customers browse without accessing the website. We have an Excel file that lists all the details of our products - name, description, title, image, category, etc. I have used Data Merge to create this 300 page document rather than hand-copy each product's information to a single page. Unfortunately I am now stuck - I have designed the catalog in

PDF text extraction issue - font/capitalization inconsistencies

徘徊边缘 提交于 2019-12-24 01:27:08
问题 I am trying to extract text from a pdf book and continue to run an issue where sections of copied text fail to retain the proper capitalization properties when pasted into a text document. I have rights to reproduce the book and also have a license to use all necessary fonts. At first I thought that the issue was caused by the fonts not being embedded, but I checked and all fonts appear to be subset embedded. Within the pdf there are over 100 fonts used which have one of the following

How to generate InDesign content using XML data

≯℡__Kan透↙ 提交于 2019-12-23 03:27:06
问题 I'm trying to generate some content in InDesign by importing XML data, but I can't figure out how to do it. Here's what I have: XML <stuff> <person> <name>John</name><age>42</age> <name>Oscar</name><age>39</age> </person> </stuff> And here's what I want the result to look like: InDesign Person: John, 42 Person: Oscar, 39 How do I go about doing this? Is this the right site to post a question like this? 回答1: This is actually very easy to do this. Complete directions can be found in the book a

Adobe InDesign .jsx script execute .jsx script

岁酱吖の 提交于 2019-12-21 17:47:03
问题 How can I have my .jsx script when finished execute another .jsx script? Maybe this will help understand what I am trying to do: // WebCard.jsx file function mySnippet(){ //<fragment> var myPageName, myFilePath, myFile; var myDocument = app.documents.item(0); var myBaseName = myDocument.name; for(var myCounter = 0; myCounter < myDocument.pages.length; myCounter++){ myPageName = myDocument.pages.item(myCounter).name; app.jpegExportPreferences.jpegExportRange = ExportRangeOrAllPages.exportRange

How to detect shift down when clicking on ScriptUI button?

两盒软妹~` 提交于 2019-12-21 05:33:48
问题 On my scriptUI panel, I have a button. How can I detect whether the user is holding the shift key when they click on the button? 回答1: You can add an eventListener to your button. var win = new Window ("dialog"); win.aButton = win.add ("button", undefined, "Button"); win.aButton.addEventListener ("click", function (k) { if (k.shiftKey) { alert("foo"); }else{ alert("bah"); } }); win.show (); 来源: https://stackoverflow.com/questions/16446076/how-to-detect-shift-down-when-clicking-on-scriptui

Remove items from one array if not in the second array

对着背影说爱祢 提交于 2019-12-20 02:09:24
问题 I state that I have tried for a long time before writing this post. For an InDesign script, I'm working with two array of ListItems. Now I'm trying to remove the items of one array that aren't in the second array, but i'm stuck. Given that I use the following javascript code (it works great) to remove the equal items between the two arrays : function check_dupli(arr_A, arr_B) { for(var i = arr_B.length - 1; i >= 0; i--) { for(var j = 0; j < arr_A.length; j++) { if(arr_B[i] === arr_A[j]) { arr

Packaging a document with Indesign SDK

丶灬走出姿态 提交于 2019-12-14 04:27:32
问题 I would like to package an indesign document through the SDK but there doesnt seem to be any documentation about it. Does anyone know if it is possible, and if so, help me on the way? 回答1: check out these articles, I think they may be helpful: Packaging Adobe InDesign Files for Press Packaging ID Files If not, maybe elaborate your question a little further? Good luck! 来源: https://stackoverflow.com/questions/10583393/packaging-a-document-with-indesign-sdk

need to generate UUID for windows system in ExtendScript

我的未来我决定 提交于 2019-12-13 18:22:58
问题 I have used the below code to generate DocumentID and InstanceID for the links of .indd files. This works fine on MacOS. Can anyone suggest similar UUID generation code on Windows system. Is there any such library available on windows system? function generateUUID() { var cmd = 'do shell script "uuidgen | tr -d " & quoted form of "-"'; return app.doScript(cmd, ScriptLanguage.applescriptLanguage); } var genDocID = 'xmp.did:' + generateUUID(); 回答1: TLDR; Below are a couple of different ways to

InDesign: Accessing document dictionary

不羁的心 提交于 2019-12-13 05:25:58
问题 In my script, I am copying a table of cells that have a lot of text in them. This text has a bunch of custom hyphenation rules that are saved in the document dictionary, NOT in the user dictionary. This is accessed in the UI by opening User dictionary and selecting the document under Target . When copying the table to another document, these rules are unfortunately not copied with it, and the text is changed. How can I access this custom document dictionary so that my hyphenations are