adobe-indesign

How to EXCLUDE MasterPage items when bulk exporting all text Frames

假如想象 提交于 2019-12-10 11:47:55
问题 When I'm exporting all text frames from a file, the script sees the textframes in the masterpage and messes up the calculation and gives an error at the end because those frames are locked and can't be exported. var myDoc = app.activeDocument; var myFolder = myDoc.filePath; var myImage = myDoc.textFrames; var JPEGFolder = new Folder(myFolder+"/"+app.activeDocument.name+"_"+"JPEG"); if (!JPEGFolder.exists) JPEGFolder.create(); var PromFolder = new Folder(myFolder+"/"+app.activeDocument.name+"_

need setProperty syntax for XMP object

此生再无相见时 提交于 2019-12-08 22:38:52
问题 I am randomly generating DocumentID and InstanceID , but facing problem in setting property DocumentID and InstanceID to the xmp object. How can I set the generated DocumentID and InstanceID to my allXMP ? var xmpFile = new XMPFile(linkFilepath, XMPConst.FILE_INDESIGN, XMPConst.OPEN_FOR_UPDATE); var allXMP = xmpFile.getXMP(); // Retrieve values from external links XMP. var documentID = allXMP.getProperty(XMPConst.NS_XMP_MM, 'DocumentID', XMPConst.STRING); var instanceID = allXMP.getProperty

Get current page number in InDesign CS5 from Javascript

我是研究僧i 提交于 2019-12-08 19:32:03
问题 What is the DOM expression to get current page where the cursor is: app.activeDocument.currentPage ? 回答1: You want: app.activeWindow.activePage.name; This will give you the actual page number name as a string (i.e. if your pages are numbered in roman then this will give 'v' for the fifth page). 回答2: The below would create a Text Block with the current page number. You could also have this be applied to the master page by changing the page location for which the text frame is placed.

How to script InDesign/InCopy to “Check In” and “Check Out” textFrames?

拈花ヽ惹草 提交于 2019-12-08 07:39:17
问题 I am not very familiar with InCopy. I keep seeing that it's a separate application, but I only have InDesign CS6 here, no InCopy CS6. Yet I am able to access InCopy functions within InDesign, such as "checking out/in" various textFrames for editing, then refreshing them in the Links panel so they update other textFrames on other pages in the document. My question is this—How can I use ExtendScript to automate this process?: InCopy > Check Out a specific textFrame. Alter the text within it, or

How to generate InDesign content using XML data

扶醉桌前 提交于 2019-12-08 04:41:28
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? This is actually very easy to do this. Complete directions can be found in the book a Designer's Guide to Adobe InDesign and XML. The easiest way to do this is to import your XML source into

How to script InDesign/InCopy to “Check In” and “Check Out” textFrames?

六眼飞鱼酱① 提交于 2019-12-07 02:52:31
I am not very familiar with InCopy. I keep seeing that it's a separate application, but I only have InDesign CS6 here, no InCopy CS6. Yet I am able to access InCopy functions within InDesign, such as "checking out/in" various textFrames for editing, then refreshing them in the Links panel so they update other textFrames on other pages in the document. My question is this—How can I use ExtendScript to automate this process?: InCopy > Check Out a specific textFrame. Alter the text within it, or its properties, etc. InCopy > Check In that textFrame. Refresh the links so that the other InCopy

Rapidly learn InDesign scripting?

删除回忆录丶 提交于 2019-12-06 16:10:45
问题 In the middle of a large publishing project, and the sheer scale is weighing me down. Many deadlines coming down the pipe, and most of my trouble is tedium and repetitive tasks. I need to pick up the basics of InDesign scripting pronto, and I'm looking for resources or books which will get me up to speed. I get Java, XML and some web techs... I am not a programming professional, however, and JavaScript is new to me. Mac/Linux, if it matters. Advice? Thanks in advance. 回答1: @niteshade -- Old

Scripting InDesign - Beginner

回眸只為那壹抹淺笑 提交于 2019-12-06 13:57:34
问题 I am a seasoned JavaScript programmer, and am currently working on a project which requires a lot of work, and I'm hoping that the process can be automated using scripts for InDesign. Essentially, here's what I want to do. I have a 5 (sometimes, but rarely, 4)-digit string. I then have three rectangles underneath the text frame which I would like to apply a swatch to, depending on the final digits of the number. Numbers 0-9 are assigned a specific colour (and swatch), and at the moment I am

How can I programmatically clear text selection in InDesign with ExtendScript?

谁都会走 提交于 2019-12-06 08:17:22
问题 I've programmatically selected some text in InDesign using ExtendScript: app.findGrepPreferences = NothingEnum.nothing; app.findGrepPreferences.appliedFont = myFont; var matches = app.activeDocument.findGrep(); if(matches.length > 0) { matches[0].select(); } How can I deselect it now? Is there no function for this, like app.clearSelections(); or something of the sort? 回答1: Try with: app.activeDocument.select(NothingEnum.NOTHING); 来源: https://stackoverflow.com/questions/10743073/how-can-i

COM returns type that does not implement any interface

孤街浪徒 提交于 2019-12-05 17:55:58
I need to automate some tasks in Adobe InDesign CS3 from a .NET 4.0 application. I've added a reference to the InDesign Type Library using the Add Reference dialog in Visual Studio. It genereates an interop assembly, which correctly includes all of the interfaces and types declared in the type library. I haven't installed any Adobe SDK, as the type library was available in Visual Studio without installing anything but Adobe InDesign CS3. The interesting types in the interop assembly for me right now is the interfaces _Application and Application , and the class ApplicationClass . Here is the