adobe-indesign

Indesign Script for footnotes losing text styles

纵然是瞬间 提交于 2019-12-11 16:14:22
问题 I'm working with footnotes in InDesign 5 . I managed to convert my text to footnotes, but my problem is that they lose the style in the process. This is the script I'm using : Application.prototype.main = function(){ if ( this.documents.length <= 0 ) return; var tg = this.selection[0] || this.activeDocument; if( 'appliedFont' in tg ) tg = tg.parent; if( tg.constructor == TextFrame ){ tg = tg.parentStory ; } if(! ('findGrep' in tg) ) return; var fnPatterns = ["@FOOTNOTES_BEGIN@([\\s\\S]*?)

Specifying Encoding While Placing Files In InDesign Using Extendscript

三世轮回 提交于 2019-12-11 12:28:05
问题 I have a script that places a Markdown file into a text frame in InDesign. Unfortunately, InDesign doesn't seem to be picking up on the UTF-8 encoding, as quotation marks and other things are ending up as ‚Äú . I tried setting file.encoding to "UTF-8" based on this question, all to no avail. Here's the relevant code as it stands: var file = File.openDialog ("Select content markdown" , "Markdown:*.md", false ); file.encoding = "UTF-8"; myFirstTextframe.place(file); How can I resolve this

Automating InDesign to place italicized text in a new paragraph

一世执手 提交于 2019-12-11 11:52:35
问题 I'm making a book about quotes. Got in the thousands of them. They all apear like this: Patience is a tree whose root is bitter, but its fruit very sweet. Persian proverb And I would like to make them appear like this Patience is a tree whose root is bitter, but its fruit very sweet. Persian proverb So I basically need the program to understand that when the text ends with regular, then have a space and then there is italic the space needs to be converted into a paragraph enter (^p). Don't

InDesign: How can I get paragraph contents with its characterStyles?

前提是你 提交于 2019-12-11 10:48:55
问题 I'm trying to write a very custom export script for InDesign (I have CC 9.2, but my target is CS6). When I process a paragraph, I can get its paragraphStyle and its content. What I don't understand is: how can I get the content and the characterStyles of the content? I'm looking at the docs, but I don't understand how can I descend into a paragraph and find all characterStyles and the text parts to which they are applied. If, for instance, I have a paragraph like the following: My nice

landscape fixed layout epub 3 viewing only 1 page at a time starting from indesign file

自作多情 提交于 2019-12-11 10:42:58
问题 I am creating an indesign cs6 epub3 fixed layout with landscape only mode, viewing only one page at a time. I added the meta <meta property="rendition:layout">pre-paginated</meta> <meta property="rendition:orientation">landscape</meta> <meta property="rendition:spread">none</meta> and I also specified the width and height in css and each xhtml file with <meta name="viewport" content="width=1024, height=768" /> I want the document to appear as one landscape page only, not as a two sides book.

getting XMP File does not have a constructor error through ExtendScript

不羁岁月 提交于 2019-12-11 09:05:08
问题 I am using In Design CC 2019, on my Mac OS. When I am trying to get XMP data for my .indd (InDesign document) using ExtendScript . I am currently getting the error like this: XMPFile Does not have a constructor . Below is my script. // load XMP Library function loadXMPLibrary(){ if ( ExternalObject.AdobeXMPScript){ try{ExternalObject.AdobeXMPScript = new ExternalObject('lib:AdobeXMPScript');} catch (e){alert('Unable to load the AdobeXMPScript library!'); return false;} } return true; } var

InDesign CS5 Script: How can I close all modal dialog windows in a document?

会有一股神秘感。 提交于 2019-12-11 05:38:36
问题 When a document does not have any modal dialog window messages, app.activeDocument.close(SaveOptions.no) works fine. However, I have some InDesign documents that do have such windows appear, showing error messages about links that need to be updated, or incorrect styles. The above statement won't work in this case, as the windows prevent the script from accessing the document. So, is there a way to iterate through all of the modal-dialogs in the active document? Here is what I have tried so

Check InDesign Links for missing XMP - DocumentID and InstanceID

时间秒杀一切 提交于 2019-12-11 04:56:32
问题 I am using ExtendScript to work on metadata information of .indd files in InDesignCC 2019. My requirement is that I need to access all individual links metadata associated with the .indd file and see whether any of the links metadata is missing DocumentID and InstanceID . If any of the links metadata do not have a value for DocumentID and/or InstanceID properties then I need to display the file name associated with that link, indicating that, that particular file is missing a DocumentID and

How to use app.selection[0] for scripts in Adobe InDesign

馋奶兔 提交于 2019-12-10 14:33:15
问题 I would like to run code by testing only the current selection (not the whole document) and I'm having difficulty understanding exactly how the array "app.selection" and its methods work. To start, I use a "for" loop to cycle through each item selected by using: for(loop = 0; loop < app.selection.length; loop++){ var sel = loop; } This works okay, but when I want to get into determining what each item IS, it gets a little weird. For example, for(txt = 0; txt < app.selection[sel].textFrames

Manipulating text in a TextBox in Adobe InDesign CS5

青春壹個敷衍的年華 提交于 2019-12-10 12:58:06
问题 How can I do some manipulations with the text in a TextBox on resize in Adobe InDesign CS5 ? The main goal is too split the last word on every row to achieve something like a custom hyphenation. Is it possible using JavaScript (or ExtendScript ?) ? Thanks. UPDATE I've tried to describe my problem in comments I need an example on ExtendScript , which would find textbox dimensions and hyphenate the text according to dimension and after I'd like to create an event on textbox resize, which would