adobe-indesign

Indesign script - How to get first paragraph in threaded text frame

前提是你 提交于 2019-12-13 05:23:33
问题 I have a book with text frames on each page , they are all threaded together, I want to grab hold of each text frames first paragraph, is there any way, I'm trying app.activeDocument.textFrames[0].paragraphs.length and returns "0", only parentStory.paragraphs.length returns the paragraphs but I can't know which are the first in a text frame, any help? 回答1: You should be able to use the textContainers attribute of Story to get each TextFrame of a story. var frames = story.textContainers; //

Selecting textFrames inside of a group in InDesign CS6

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-13 04:24:22
问题 Similar to my earlier problems with finding a textFrame on a page based on its geometricBounds or by part of its name, I now am running into the problem of finding textFrames if they are inside groups. If I use an array of all textFrames, such as: var textFramesArray = document.textFrames.everyItem().getElements(); it will not find any textFrames that are inside of a group. How can I figure out how to reference a textFrame if it's inside a group? Even if the group has to be un-grouped, that's

InDesign Text Modification Script Skips Content

社会主义新天地 提交于 2019-12-13 03:09:43
问题 This InDesign Javascript iterates over textStyleRanges and converts text with a few specific appliedFont's and later assigns a new appliedFont:- var textStyleRanges = []; for (var j = app.activeDocument.stories.length-1; j >= 0 ; j--) for (var k = app.activeDocument.stories.item(j).textStyleRanges.length-1; k >= 0; k--) textStyleRanges.push(app.activeDocument.stories.item(j).textStyleRanges.item(k)); for (var i = textStyleRanges.length-1; i >= 0; i--) { var myText = textStyleRanges[i]; var

Indesign and XML - how to auto flow into multiple pages with differing styles?

你。 提交于 2019-12-13 02:01:30
问题 I've got a bit of a problem at the moment. I'm trying to work with indesign (cs3) and xml. Basically i have a template which is has 1 master dps, both pages have the same data (fields 1-5) but one is left aligned, one right - hence mildly different paragraph styles. What i want to be able to do is import xml and have indesign flow the data from the individual nodes into many pages. eg xml format: root day field1 field2 field3 field4 field5 day field1 field2 field3 field4 field5 day ... I can

How to set pageItem properties in Basil.js?

江枫思渺然 提交于 2019-12-12 10:17:07
问题 This is a follow up on this question. How do I set pageItem properties like shearAngle in Basil.js? In ExtendScript it is: myPageItem.properties = { shearAngle:20 }; or myPageItem.shearAngle = 20; What would be the Basil.js-ish equivalent? What about nested properties like some preferences? app.activeDocument.properties = { documentPreferences:{ pageWidth:100, pageHeight:100 } }; 来源: https://stackoverflow.com/questions/36723099/how-to-set-pageitem-properties-in-basil-js

Convert indesign output to html5

烂漫一生 提交于 2019-12-12 09:02:42
问题 I want to write a viewer that convert in-design output format to html5 format and all the user design in adobe indesign can display in browser but i do not know which output is suitable for me, i think i can retrieve all info about the adobe indesign in idml export,but the problem is parsing such XML and display the tags in html5 format,i want to know is it possible the simple way to convert the output format into html5? is it possible to download the adobe indesign SDK and use its method to

What is the difference between app.doScript and $.evalFile?

风流意气都作罢 提交于 2019-12-12 07:59:20
问题 The only difference I have found so far: If a script that is run by app.doScript returns an error, the file and line number of the error are overridden by the file and line number of the app.doScript call. Are there any other differences I should know about? Here's sample code that demonstrates the above difference: First run InDesign: c: cd "C:\Program Files\Adobe\Adobe InDesign CS6 Server x64" InDesignServer.com -port 12345 pause Next create a batch file to run a script: c: cd "C:\Program

Adobe InDesign script change to uppercase and copy text to clipboard

旧巷老猫 提交于 2019-12-12 04:06:19
问题 I am try to create an Adobe InDesign script that will select text, change the selected text to Uppercase and then copy the same text. I am stuck. #target "InDesign" var myDoc = app.activeDocument; if(app.documents.length != 0){ if(app.selection.length == 1){ try{ //var text = app.selection[0]. var frame1 = page.textFrames[0]; //var frame2 = page.textFrames[1]; frame1.texts.everyItem().select(); //frame1. app.copy(); } catch(e){ alert ("Please select text", "Selection"); } } else{ alert (

Basil.js and ExtendScript in Indesign / How can I style textFrames?

早过忘川 提交于 2019-12-12 03:39:58
问题 After the svg elements are placed/drawn in Indesign, I wanna change the style from some or all elements . In my example I style the textFrames while they are drawn. My example works. But how can I change the style after the textFrames are placed? I wanna use the skewing angle (applied to the TextFrame) and the rotationAngle (look in my example -> forLoop) I tried the following: r.textFrames.shearAngle=20; and doc.textFrames.add({shearAngle:20}); ...but both don‘t work. #includepath "~

evaluate XPath expression not working for attribute (xml:lang) in indesign

南楼画角 提交于 2019-12-11 23:41:51
问题 I am using Xpath expression in Adobe Indesign, to collect the list of elements. I am using the below code to generate it. tell application "Adobe InDesign CS5.5" set user interaction level of script preferences to never interact tell active document tell XML element 1 set myElement to evaluate XPath expression using "//para" end tell end tell set user interaction level of script preferences to interact with all end tell The above code does not works fine if the element contains "xml:lang"