Hello,
Is itpossible toretrievethe value of anumbered paragraph?
Yours
Bonjour,
Est-il possible de récupère la valeur d'un paragraphe numéroté ?
Bien à vous
Hello,
Is itpossible toretrievethe value of anumbered paragraph?
Yours
Bonjour,
Est-il possible de récupère la valeur d'un paragraphe numéroté ?
Bien à vous
We are creating a custom .NET web application and need to import CS6 files. We need to be able to read the layers and the coords of each object in order to create Regions for our PDF Templates that we create using these files.
Is there an API or something that will tell us how to read these files so we don't have to convert everything to XML, then create variable fields within that PDF instead of just reading and importing?
I have an applescript that runs perfectly with Acrobat pro 10.
But now I want to run it on a computer where Acrobat pro 11 is installed and it makes Acrobat quit on the "insert pages" command.
I installed Acrobat 11 on my mac as well and it has the same behaviour: it quits on the insert pages.
If i use the Acrobat 10, it is still executing correctly...
Has anyone experienced the same problem or a solution?
Part of the script below:
tellapplication "Adobe Acrobat Pro"
setdeneerstetoopenfileoutputFormaat
setdentweedetoopenfileoutputPDF
setafmetingentomedia boxofpage 1 ofdocument 2
sethoogteto (item 2 ofafmetingen)
setbreedteto (item 3 ofafmetingen)
ifhoogte< breedtethen
setrotationofpage 1 ofdocument 2 to 90
endif
repeatoplagetimes
--This is where Acrobat 11 quits...
insert pagesdocument 1 after -1 fromdocument 2 starting with 1 number of pages 1
endrepeat
closedocument 2 savingno
closedocument 1 savingyes
endtell
Ok, here is a snippet of my script.
tellapplication "Adobe InDesign CC"
setaspActiveDocumenttoactive document
tellview preferencesofaspActiveDocument
--get horizontal measurement units
setaspOrigHorizonalMeasurementUnitstohorizontal measurement units
setaspOrigVerticalMeasurementUnitstovertical measurement units
setaspTryThistohorizontal measurement unitsasstring
--set horizontal measurement units
sethorizontal measurement unitstomillimeters
setvertical measurement unitstomillimeters
endtell
setaspDocHeighttoitem 3 ofboundsofpage 1 ofaspActiveDocument
setaspDocHeighttoaspDocHeightasstring
setaspDocWidthtoitem 4 ofboundsofpage 1 ofaspActiveDocument
setaspDocWidthtoaspDocWidthasstring
setaspSizeInfoto (aspDocWidth& " x " & aspDocHeight& " " & aspTryThis) asstring
display dialogaspSizeInfo
endtell
If I run it from AppleScript Editor I get: 215.9 x 279.4 millimeters
If I save it as an Application I get: 215.9 x 279.4 <<constant ****zmms>>
If I run the script from the scripts panel in InDesign I get: 215.9 x 279.4 <<constant ****zmms>>
Anyone have any idea why or how to fix this issue?
Hello
I have a tekst with a paragraph style and i want before the tekst a vertical line of all the lines with that paragraph style.
Is there a script for or a another solution? I work with CS6 Mac.
Kind regards,
Patrick
i want to make a schedular probably in Coldfusion or using javascript , which read xml files from a folder ,import in Indesign template then export as a pdf....
How can I make this script work?
app.findGrepPreferences.findWhat = "\\[(.)";
app.changeGrepPreferences.changeTo = "$1";
app.findGrepPreferences.underline = true;
app.findGrepPreferences.underlineColor = "underline";
app.selection[0].changeGrep();
app.findGrepPreferences = app.changeGrepPreferences = null;
app.findGrepPreferences.findWhat = "(.)\\]";
app.changeGrepPreferences.changeTo = "$1";
app.findGrepPreferences.underline = true;
app.findGrepPreferences.underlineColor = "underline";
app.selection[0].changeGrep();
app.findGrepPreferences = app.changeGrepPreferences = null;
Hi
I have created a InDesign template in CS6. It's around 300 styles and this styles are standard styles. Now I have edited (edited = apply font, size, color, rule, tracking, etc.,) 70 paragraph styles in standard template.
In this template I didn't apply any paragraph styles in page. I have edited styles only. My question is "How to get report edited paragraph styles only?
I have applied select all unused command in paragraph panel, but it is selected all styles.
I will get report edited styles only. It is anything possible?
Now I have get all paragraph style report in excel sheet and I filtered particular styles only.
Thanks
ASHRAM
i'm trying to generate bookmark of first level element, to achieve that, i'm using evaluateXPathExpression, works perfectly for some files, for some other files.. it is fetching wrong order.., meant fetching based on the xmlElement(id) i hope, instead of XML position. My script is below.
var aDoc=app.activeDocument; var sectionFirst="//body/*[not(self::titleGroup)]/*[starts-with(local-name(), 'title')]"; //namespace required to execute evaluateXPathExpression var rootElement = aDoc.xmlElements[0]; if( !rootElement.xmlAttributes.itemByName("xmlns:xml").isValid ) rootElement.xmlAttributes.add( "xmlns:xml", "http://www.w3.org/XML/1998/namespace" ); if(rootElement.xmlAttributes.item("xmlns").isValid ) rootElement.xmlAttributes.item("xmlns").remove(); var sectionFirstElements=rootElement.evaluateXPathExpression(sectionFirst); for(var ele=0; ele < sectionFirstElements.length; ele++) { alert(sectionFirstElements[ele].id+" "+sectionFirstElements[ele].contents); }
InDesign sample file is attached to verify (Dropbox - sample.indd). Does anyone across this issue. please enlighten me on this.
I am running this script for getting all form fields of a indd file.
var _ALL_FIELDS = "";
var allFields = myDocument.formFields;
for(var i=0;i
var tf = allFields[i];
alert(tf.id);
alert(tf.label);
alert(tf.name);
alert(_ALL_FIELDS = _ALL_FIELDS +\",\"+ tf.name);
}
What i have done is, created a soap-java based client and calling the runscript method. Now i am able to get these fields but how to send these fields back to the client i.e. how to write this in response and then at client side how to read it from response.
Code for calling runscript method is:-
Service inDesignService = new ServiceLocator();
ServicePortType inDesignServer = inDesignService.getService(new URL(parsedArgs.getHost()));
IntHolder errorNumber = new IntHolder(0);
StringHolder errorString = new StringHolder();
DataHolder results = new DataHolder();
inDesignServer.runScript(runScriptParams, errorNumber, errorString, results);
Also i have found in docs that runScript method returns RunScriptResponse but in my case it's returning void.
http://wwwimages.adobe.com/content/dam/Adobe/en/devnet/indesign/sdk/cs6/server/ids-solutio ns.pdf
Please help!!!!!!!!!!!!
Im having issues with code below. I inherited the previous designer documents would like to unlock, delete & create margins to the master pages. I'm no an expert but knows a little bit.
tellapplication "Adobe InDesign CS4"
activate
setmyDocumenttodocument 1
tellview preferencesofactive document
--Set horizontal and vertical measurement units to inches.
setruler origintopage origin
sethorizontal measurement unitstoinches
setvertical measurement unitstoinches
endtell
--change margins of the master spread
setmyMasterSpreadtomaster spread 1 ofmyDocument
tellmargin preferencesofpage 1 ofmyMasterSpread
-- page margins and columns.
setleftto ".5" --outside
settopto ".5 in"
setrightto ".75 in" --inside
setbottomto ".75 in"
endtell
--Page margins right master page
tellmargin preferencesofpage 2 ofmyMasterSpread
setleftto ".5" --inside
settopto ".5 in"
setrightto ".75 in" --outside
setbottomto ".5 in"
endtell
--create guides on master pages 1 & 2
--** currently not working
setmyMasterSpreadtomaster spread 1 ofmyDocument
tellguide preferencesofpage 1 ofmyMasterSpread
setguides lockedtofalse
setruler guides colortoorange
--tell page 1 of myDocument
deleteguides
makeguidewith properties {orientation:vertical, location:".25"}
makeguidewith properties {orientation:vertical, location:"7.6875"}
makeguidewith properties {orientation:horizontal, location:".25"}
makeguidewith properties {orientation:horizontal, location:"10.25"}
--end tell
tellguide preferencesofpage 2 ofmyMasterSpread
deleteguides
makeguidewith properties {orientation:vertical, location:".25"}
makeguidewith properties {orientation:vertical, location:"7.6875"}
makeguidewith properties {orientation:horizontal, location:".25"}
makeguidewith properties {orientation:horizontal, location:"10.25"}
endtell
endtell
endtell
Hi,
I'm new in scripting in Indesign. I'd like to write a script for applying a paragraph style to a row in a table like that:
1. Search for the string "XX" in a table
2. When the string "XX" is found, apply a defined paragraph style named "ParA" to the row which contains the string "XX"
3. Apply a cell style named "CellA" to the cell which contains the sting "XX"
4. Apply the paragraph style named "ParB" to the string "XX"
5. Search for the next string "XX" till the end of the table
Can anybody help me ?
I'm laying out a fairly large technical book using InDesign CS4 and need to print proofs of pages that use a specific custom master page. Rather than scrolling through the Page window and writing down page numbers that use that specific master, i'd like to have a quick way of doing it. If anyone knows of a way to do this by either script or other means, I'd really appreciate the help. Thanks!
NOTE: Originally posted in general discussion and recommended to scripting forum.
I write a script for del square brackets and then make some markups, then i want the underline has a specify color
before del square brackets like this:
ASSETS
Non-current assets
Investments in subsidiaries 45 [448,520] [448,520]
Current assets
Amounts due from subsidiaries 17 [29,577,718] [24,414,028]
Other receivables and prepayments 17 [7,095] [3,072]
Restricted cash 18 [2,786,304] [1,033,136]
Cash and cash equivalents 19 [173,502] [505,184]
[32,544,619] [25,955,420]
Total assets [32,993,139] [26,403,940]
I want get the result like this:
ASSETS
Non-current assets
Investments in subsidiaries 45 448,520 448,520
Current assets
Amounts due from subsidiaries 17 29,577,718 24,414,028
Other receivables and prepayments 17 7,095 3,072
Restricted cash 18 2,786,304 1,033,136
Cash and cash equivalents 19 173,502 505,184
32,544,619 25,955,420
Total assets 32,993,139 26,403,940
but not work, two lines have error, can someone help me to fix it?
app.findGrepPreferences = app.changeGrepPreferences = null;
app.findGrepPreferences.findWhat = "\\[(.)";
app.changeGrepPreferences.changeTo = "$1";
app.changeGrepPreferences.underline = true;
app.changeGrepPreferences.underlineColor = swatches.item "underline";// <----- the script has an error in this line
app.selection[0].changeGrep();
app.findGrepPreferences = app.changeGrepPreferences = null;
app.findGrepPreferences = app.changeGrepPreferences = null;
app.findGrepPreferences.findWhat = "(.)\\]";
app.changeGrepPreferences.changeTo = "$1";
app.changeGrepPreferences.underline = true;
app.changeGrepPreferences.underlineColor = swatches.item "underline";// <----- the script has an error in this line
app.selection[0].changeGrep();
app.findGrepPreferences = app.changeGrepPreferences = null;
We have 150 photos to place in an Indesign file with Data Merge. Each page has: the photo, the name and surname.
Is it possible the export these pages as separate files but named with the file name of the photo?
gert
I would to batch the process of changing document to inches & update all missing links, save & close. The images are located in a folder in another volume. The script is changing document to inches but it is not updating the missing links. In what part of the process I'm failing? I see --> error number -1708
setsource_foldertochoose folderwith prompt "Select folder containing Indesign Documents"
tellapplication "Finder" tosettheFilestofilesofsource_folderwhosename extensionis "indd"
setmyFoldertochoose folderwith prompt "Select the folder containing the graphics you want to update"
tellapplication "Finder"
setmyFilestoeveryfileoffoldermyFolder
endtell
repeatwithoneFileintheFiles
tellapplication "Adobe InDesign CS4"
setuser interaction levelofscript preferencestonever interact
activate
setmyDocumenttoopen (oneFileasalias)
tellmyDocument
--++++++++++++++++
tellview preferences
setruler origintopage origin
sethorizontal measurement unitstoinches
setvertical measurement unitstoinches
endtell
endtell
telldocument 1
settheLinksto (everylinkwhosestatusislink missing)
repeatwithifrom 1 tocountoftheLinks
setthelinktoitemioftheLinks
settheNametonameofthelinkasUnicode text
setnewpathto (myFolderasUnicode text) & theName
try
relinkthelinktonewpath
endtry
endrepeat
endtell
closemyDocumentsavingyes
endtell
endrepeat
The following will batch ID files but it is not compiling.
Here is i want to achieve: Change doc prefs to inches, resize, bleeds, no slug, master margins, delete all unused masters, unlock-delete some layers & load master pages templates. The load master pages templates is not compiling. my brain is fried & i can't see where the error is
try
withtimeoutof 3600 seconds--1HR
setsource_foldertochoose folderwith prompt "Select folder containing Indesign Documents to batch"
tellapplication "Finder" tosettheFilestofilesofsource_folderwhosename extensionis "indd"
endtimeout
onerrornumber -1712 -- the comand time out, so cancel the script
tellapplication "System Events"
tellapplication process "Finder"
clickbutton "Cancel" ofwindow "Choose a Folder"
endtell
endtell
errornumber -128 --throw a user cancelled error
endtry
repeatwithoneFileintheFiles
tellapplication "Adobe InDesign CS4"
setuser interaction levelofscript preferencestonever interact
activate
setmyDocumenttoopen (oneFileasalias)
tellmyDocument
--++++++++++++++++
tellview preferences
setruler origintopage origin
sethorizontal measurement unitstoinches
setvertical measurement unitstoinches
endtell
--tell document preferences
telldocument preferences
--Change current DocSize
setpage widthto "7.9375 in"
setpage heightto "9.75 in"
--bleed and slug
setdocument bleed bottom offsetto ".25 in"
setdocument bleed top offsetto ".25 in"
setdocument bleed inside or left offsetto ".25 in"
setdocument bleed outside or right offsetto ".25 in"
setslug bottom offsetto "0"
setslug top offsetto "0"
setslug inside or left offsetto "0"
setslug right or outside offsetto "0"
endtell
--delete Unused Master pages- delete used Master
setmoreMastersto {}
tellapplication "Adobe InDesign CS4"
repeatwithifrom 1 tocountofdocuments
telldocumenti
setallMasterstoeverymaster spread
settheMasterstoapplied masterofeverypage
repeatwithxintheMasters
setendofmoreMasterstoapplied masterofx
endrepeat
settheMasterstotheMasters& moreMasters
repeatwithxinallMasters
ifxis notintheMastersthendeletex
endrepeat
if (exists (master spread "Z-OMX Master")) and (countmaster spreads) > 1 thendeletemaster spread "Z-OMX Master"
endtell
endrepeat
endtell
--change margins of the master spread
setmyMasterSpreadtomaster spread 1
tellmargin preferencesofpage 1 ofmyMasterSpread
-- page margins and columns.
settopto ".25 in"
setbottomto ".5 in"
setleftto ".5" --inside
setrightto ".75 in" --outside
setcolumn countto 2
setcolumn gutterto 0.279
endtell
--Page margins master page for the right-hand page.
tellmargin preferencesofpage 2 ofmyMasterSpread
settopto ".25 in"
setbottomto ".5 in"
setleftto ".5" --inside
setrightto ".75 in" --outside
setcolumn countto 2
setcolumn gutterto 0.279
endtell
deleteguides
--unlock/colorize
tellguide preferences
setguides lockedtofalse
setruler guides colortocyan
endtell
--make guides on Master Pages
tellmyMasterSpread's page 1
makeguidewith properties {orientation:vertical, location:0.25}
makeguidewith properties {orientation:vertical, location:7.6875}
makeguidewith properties {orientation:horizontal, location:0.5}
makeguidewith properties {orientation:horizontal, location:9.5}
endtell
tellmyMasterSpread's page 2
makeguidewith properties {orientation:vertical, location:0.25}
makeguidewith properties {orientation:vertical, location:7.6875}
makeguidewith properties {orientation:horizontal, location:0.5}
makeguidewith properties {orientation:horizontal, location:9.5}
endtell
--load Master template
set docRef to document 1 of application "Adobe InDesign CS4"
set templatePath to "Macintosh HD:Applications:Adobe InDesign CS4:Templates:Maxi_Templates.indd"
(*Boolean if false indicates master spreads should be renamed in case of name clash*)
loadMasters(docRef, templatePath, false)
tell application "Adobe InDesign CS4"
set templatePath to file path as string
--set templatePath to "Macintosh HD:Applications:Adobe InDesign CS4:Templates:Maxi_Templates.indd"
end tell
(*Loads master spreads from referenced document.*)
on loadMasters(docRef, filePath, doOverwrite)
tell application "Adobe InDesign CS4"
tell docRef
if doOverwrite = true then
load masters from filePath global strategy for master page load all with overwrite
else
load masters from filePath global strategy for master page load all with rename
end if
end tell
end tell
end loadMasters
--+++
--display dialog "" buttons {"Cancel"} default button 1
--+++
closemyDocumentsavingyes
endtell
setuser interaction levelofscript preferencestointeract with all
endtell
endrepeat
beep 5
withtimeoutof 10000 seconds
tellapplication "Finder"
activate
--display dialog "DONE" buttons {" :-) OK"} with icon 1 default button 1 giving up after 15
--display dialog "Done, check the links" with icon path to resource "ID_App_Icon.icns" in bundle (path to application "Adobe InDesign CS4")
display dialog "DONE" buttons {" :-) OK"} giving up after 15 with iconpath to resource "ID_App_Icon.icns" in bundle (path toapplication "Adobe InDesign CS4") --giving up after 15
endtell
endtimeout
Let me introduceone of myProjects - DialogBuilder for ExtendScript.
Designerfocused onautolayout dialogs and generates code as ScriptUI-resources strings.
small video on YouTube
probably it will be interesting to someone...
sorryfor my english : )
Hi,
If my indesign file has 'font missing', 'Missing links', and 'Overflow Text', I have to give the alert message by script. Is this possible?
by
hasvi
Hi,
I don't have CC 2014 installed - but I have TLB file so I can recompile my script.
But I don't know what is the current "reference name" for the newest ID CC 2014 v. 10
What should be at the end - instead of "CS6"
Set myIndi = CreateObject("InDesign.Application.CS6")
"CS9.2" ??
TIA