Automating indesign

Hi,
I am new to Indesign scripting. I have developed a tool using VB.NET for automating word, for exporting text to a Word document and changing styles in it.
Similarily, I want to export data to an Indesign Document.
I want to know, what are the requirements/downloads (sdks/APIs etc.) required to develop a tool for automating Indesign?
Thank you,
Surya.

I don't know how to generate MFC classes of InDesign.
But I am sure you can control InDesign with a "smart" pointer style.
(I don't know what is called this "smart" way.)
// import Type Library
#import "Resources for Visual Basic.tlb"
int findPreset( InDesign::_ApplicationPtr& app, const char* presetName, PrinterPresetPtr& preset)
int rt=-1;
PrinterPresetsPtr pres = app->PrinterPresets;
for(long m=1;m<=pres->GetCount();m++){
PrinterPresetPtr p = pres->Item[m];
if(p->Name == _bstr_t(presetName) ){
preset = p;
rt=0;
break;
return rt;
// inddPath : path of a InDesign document
// printSet : name of print set
void printOut( const char* inddPath, const char* printSet )
do{
InDesign::_ApplicationPtr app;
app.CreateInstance( L"InDesign.Application.CS2_J" ); //Japanese version
InDesign::DocumentPtr doc;
doc = app->Open( _bstr_t(inddPath), VARIANT_TRUE/*show*/ );
//fint Preset
PrinterPresetPtr preset;
if(findPreset(app,preset)!=0){
break;
_variant_t showDialog( true ); // show print dialog?
_variant_t showGrid( false ); // show grid? only Japanese version???
doc->PrintOut( showDialog, preset.GetInterfacePtr() , showGrid );
}while(0);
Hope this helps.
-Satoru

Similar Messages

  • Automating InDesign from C++/MFC

    Hi, I would like to be able to control InDesign via COM (aka Scripting Interface in Adobe InDesign parlance).
    I've done this quite a few times for other apps including Acrobat Reader.
    Normally it's possible to create an MFC C++ class from the TLB file.
    For InDesign the only TLB/TypeLib file which I can find is "Resources for Visual Basic.tlb" buried deep in the Documents and settings folder. Seems to be rebuilt every time InDesign is run to take account of COM interface to plugins. All very well but the typelib Wizard in Visual C++ IDE doesn't read the file let alone generate the classes.
    I've managed to do a 'half baked' test using
    #import "Resources for Visual Basic.tlb"
    that works but it's not as clear and certainly not as easy to see my way around.
    Specifically I'm trying to control printing using print presets via COM.
    I see it's possible from the VB examples.
    Is there a core TLB in InDesign somewhere that I could use to generate the MFC classes?
    Has someone done this before (in C++ of course)?
    Does anyone have any experience or examples?
    Many thanks
    Caerwyn Pearce

    I don't know how to generate MFC classes of InDesign.
    But I am sure you can control InDesign with a "smart" pointer style.
    (I don't know what is called this "smart" way.)
    // import Type Library
    #import "Resources for Visual Basic.tlb"
    int findPreset( InDesign::_ApplicationPtr& app, const char* presetName, PrinterPresetPtr& preset)
    int rt=-1;
    PrinterPresetsPtr pres = app->PrinterPresets;
    for(long m=1;m<=pres->GetCount();m++){
    PrinterPresetPtr p = pres->Item[m];
    if(p->Name == _bstr_t(presetName) ){
    preset = p;
    rt=0;
    break;
    return rt;
    // inddPath : path of a InDesign document
    // printSet : name of print set
    void printOut( const char* inddPath, const char* printSet )
    do{
    InDesign::_ApplicationPtr app;
    app.CreateInstance( L"InDesign.Application.CS2_J" ); //Japanese version
    InDesign::DocumentPtr doc;
    doc = app->Open( _bstr_t(inddPath), VARIANT_TRUE/*show*/ );
    //fint Preset
    PrinterPresetPtr preset;
    if(findPreset(app,preset)!=0){
    break;
    _variant_t showDialog( true ); // show print dialog?
    _variant_t showGrid( false ); // show grid? only Japanese version???
    doc->PrintOut( showDialog, preset.GetInterfacePtr() , showGrid );
    }while(0);
    Hope this helps.
    -Satoru

  • Populating InDesign templates with data from Excel or XML?

    I have a client who does a weekly catalogue for computer parts. It’s very detailed and extremely time consuming, and we are looking at moving it to an automated InDesign workflow to save time and money in production. Once imported into InDesign, the resulting file can be exported as a formatted XML document to a webpage for auto formatting.
    I know you can import XML directly into InDesign and vice versa. I have created some categories and tables in Excel and exported this as an .xml document. When I import that document into the View > Structure panel, it displays a whole list of attributes but not the actual text I was after.
    Any help much appreciated. I’m using InDesign CS4 and doing some research on google at the moment.

    Hi CDesign2,
    If I understood you correctly, you are either trying to
    View your xml data in Adobe LiveCycle form to redit the form???
    View your xml data in Adobe acrobat pro
    Or wishing to collate updated(new) data into adobe (lifecycle) tracker and view the data set
    I suspect points 2, 3 may be the case.
    My experience with migrating excel data back to adobe is this.
    If you created the original form with adobe, you have the option of distributing the form (file/form distribution..)
    to recipients list (could include form creator).
    This allows adobe to generate a distribution and form response file and therefore able to track returned forms either as pdf (preferably) or excel/xml converted back to pdf after saving it.
    For Point 2 above,assuming your original data set were created using an adobe form you previously saved, open your original form in acrobat pro, go to menu/forms/manage form data/import data (usually as xml). It automatically repopulates the form.
    OR
    To view returned forms as a set, go to menu/forms/compile returned forms and this will bring up a window that
    requires you
    -to browse and locate your response file (essentially defining the index form),which is opened into the top row
    -then find and add each new completed form into a list in the second row.
    You then click ok and all returned forms are opened in a tracker window...
    I just realised I am talking about liveCycle ES version8 and this forum refers to pre ES!
    I am not sure if this helps but I hope it answers some of your questions.

  • Location of InDesign scripts

    I'm trying to find the moved location of the InDesign zip archive of the scripts shown in the InDesign_ScriptingGuide_JS.pdf.
    Adobe lists this link in the pdf as
    http://www.adobe.com/products/indesign/scripting/index.html.
    but it just takes you to their InDesgin CC page.
    Thanks

    Try going down the page and in one of the side list is a link
    Resources
    Adobe Exchange
    Adobe Configurator
    Developer Center
    Automating InDesign
    Custom editorial publishing solutions
    Creative Suite Printing Guide
    Print production
    Click on the Automating InDesign and then the Scripting Resources.

  • DPS integration with InDesign Server

    Is there a way to integrate DPS functionality (create, upload, share folios) with InDesign Server, e.g. through the scripting API?
    Suppose I have an automated InDesign workflow and I want to publish the result to acrobat.com. Is this possible? Is this planned for a future version?
    I found a reference to the "Folio Producer SDK" in the DPS buying guide but could find any other information about this at all...
    Thanks

    AFAIK DSP has part of the production workflow NOT inside InDesign, so also InDesign Server alone can not be used to produce a digital magazine automatically. So its not about blocking, but having a better integration of the different parts into basic InDesign.
    Whether this will happen in the near or medium to far future (CS6, CS7...) we all don't know, but if they were integrated they possibly would be available in InDesign Server API/SDK too, as the code base is pretty much the same (except for the whole Java interfacing).
    IMHO InDesign will NEVER integrate all these production steps, as DPS is a lot about multimedia production workflow. A workflow system aka Woodwing for instance therefore is a wise solution to look at. Especially, as you can start at as low as €169 monthly with Enterprise 7 for DPS integration (in the near future with Enterprise 7.5).

  • Scripting Flash

    I have not been able to find a scripting forum for Flash, so please forgive me if this is the wrong forum...
    Some of you might have noticed the existance of Script Bay.
    It is a free panel for writing and running scripts and it works in the many of the CS programs including Flash. It currently supports ExtendScript and Javascript.
    As you might know, the only scripting language that Flash (the application) supports is Javascript. I am implementing AppleScript support in Script Bay for InDesign, Illustrator, and Photoshop. These apps have native support for these languages, so AppleScripts can be used to control the apps.
    It is possible to enable support of AppleScript (and maybe VB) in Flash and Fireworks as well, but such support would be of limited use, because the app cannot be controlled as there is no built in support for these languages. It would be possible to control external applications (such as other CS apps, the Finder, system events, etc.). My question is: would such functionality be useful or not?
    You can let me know your opinion using this really short survey.
    Any responses would be very much appreciated!
    Thanks,
    Harbs

    No, that's not what I mean at all.
    I'll use an example or two from InDesign which I'm more familiar:
    Imagine you have a document (or set of documents) which have many images which need to be processed in some way before the document is exported to pdf (like resampling or have some filter applied, etc.). You really need to invoke the scripting interface of Photoshop from InDesign to have this processing done. Now technically, this can be done using BridgeTalk, but just using applescript: "tell application "Photoshop"... is a whole lot easier!
    Another example (which is impossible using ExtendScript or Javascript alone) is batch processing a folder of documents and emailing the resulting pdfs to the correct recipients. The only way to control mail apps on Mac is by using AppleScript.
    This is just two of many reasons why you'd need AppleScript while automating InDesign.
    If my question is not yet clear enough: is there ever a need/use to control external apps from within Flash? Could you envision the utility of being able to control Photoshop or Illustrator while automating the creation of a swf or fla file? Could controlling Mail or Finder be useful? etc...
    Harbs

  • Looking for developer XMP Lightroom

    Hi,
    Lightroom 3 has a big problem for me with the Titles and Legends. We can only put one legend and one title per image and since I work in many languages (english/french/portuguese) I need to have the possibility to have 2 or 3 titles and legends for each picture. The solution I used till now is to create virtual images but it's a mess !
    Anybody would be interested to work on it ?
    Best,
    David

    Hi Klaus,
    Good Morning!!.... I'm Harihara Sudhan as a Sr.Software Engineer, in MPS Limited, we are specializes in automating InDesign Server, InDesign CC and Desktop InDesign CS6. We could definitely help. You can contact me at the below mail id:
    http://adi-mps.com
    [email protected]

  • Search and Underline

    Is there any way to let InDesign CS4 searchfor some text and underline it automatically.
    I have a very large document, contains headings (title) and its contents, some titles are mentioned in other paragraphs,
    here some Exmaple, where the words "Data", and "hard disk" is underlined, because it has it own Title.
    please Help
    Example;
    Hard Disk
    A rigid magnetic disk fixed permanently within a drive unit and used for  storing computer data.
    Data
    Numerical or other information  represented in a form suitable for processing by computer, and stored in a medium such as hard disk.

    omansaud wrote:
    Dear Shonkyin
    Thank your very much for your help, but if possible i need to enter value in a dialogue box or reading the value from text file insted of changing the script.
    because i have to do it for 5000 topics/titles.
    Thanks for your valuable help
    Can you explain a little more about why you need to underline the terms in main text in these examples? If you want to create a hyperlink from the term in main text to the definition, consider using cross-references. You can define a cross-reference format to appear with any text style, such as underline. In PDF, a click on the link will take the user to the definition.
    Recently, there have been some discussions qnd links about scripts for automating cross-references. Here are some results from this Google search phrase;
    automating indesign cross-references script
    InDesignSecrets » Blog Archive » Create a Cross Reference Quickly ...
    Feb 24, 2010 ... Create a Cross Reference Quickly with this Free Script ... I'll be prepared to swap them out for InDesign cross-references with this script. ... Automating Hyperlinks in Unlinked PDF Files by David Blatner ...
    indesignsecrets.com/create-a-cross-reference-quickly-with-this-free-script.php -Cached -
    Automated Cross-References" thread from InDesign Talk
    Subject: Automated Cross-References, To: InDesign Talk .... In my script for the telephone directory layout (InDesign CS4) to each graphic module for the ...
    www.listsearch.com/InDesign/Message/index.lasso?149046 - Cached -
    Scripting automates many features in InDesign — it's
    File Format: PDF/Adobe Acrobat
    editor does this for you). Be very careful when you enter the text: Typos are script killers.Cross-. Reference. COPYRIGHTED MATERAL ...
    www.indesigncentral.com/i/IDB3-Ch37-Updated.pdf - Similar -
    HTH
    Regards,
    Peter
    Peter Gold
    KnowHow ProServices

  • Renumber endnotes with a script?

    Hey,
    I have a book in Indesign. Each document has endnotes. There are more than 3000 endnotes. Now the author wants to add/delete some endnotes.
    How can i renumber the endnotes automatically with a script?
    Thanks for your information!

    You may want to look at some of Peter Kahrel's scripts, found here: Dynamic endnotes, column notes, margin notes | Peter Kahrel. He provides some methods for making endnotes dynamic, for instance, that could be useful.
    If you want to do it yourself, it depends on how your book is set up. Do you number notes straight through (moderately straightforward to script), or by section (much less straightforward to script)? Do you use distinct styles for your note markers in the text and your note numbers in the note itself?
    Another option might be to export to IDML and renumber in the XML, then reimport; it really depends on where you're comfortable automating (InDesign via script or XML via text editor).

  • InDesign Server Automation

    I'm looking into purchasing InDesign Server for the document automation features. One feature, Data Merge, would be a tremendous help for our company.
    I'm having some trouble setting it up with a script.
    Here's what I have running, just a basic test.
    var myDocument = app.open(File("C:\\inetpub\\wwwroot\\indesign\\test.indd"));
    with (app.dataMergeOptions) {
    linkImages = true;
    removeBlankLines = false;
    createNewDocument = true;
    documentSize = 100;
    } // (end of dataMergeOptions)
    myDocument.dataMergeProperties.mergeRecords();
    myDocument.exportFile(ExportFormat.PDF_TYPE, File ("c:\\inetpub\\wwwroot\\indesign\\merged.pdf"));
    myDocument.close ();
    In the file I had it linked to a csv that pulled data but it seems the link has been broken (or out of date according to the error).
    Can anyone help me with what I am doing wrong or even provide a better method?
    I am running the script through PHP via SOAP in IIS running on Windows 2008 R2
    InDesign Server CC 2014

    Thank you for your post Loic.Aigon.
    After I stumbled upon this post javascript - InDesign Script: export to IDML - Stack Overflow I found the option dataMergeProperties.selectDataSource(csv file).
    Here's my updated code, sorry for the missing formatting.
    var myDocument = app.open(File("C:\\inetpub\\wwwroot\\indesign\\test.indd"));
    var myDataSource = File("C:\\inetpub\\wwwroot\\indesign\\test.csv");
    with (app.dataMergeOptions) {
    linkImages = true; 
    removeBlankLines = false;
    createNewDocument = true;
    documentSize = 100;
    } // (end of dataMergeOptions)
    myDocument.dataMergeProperties.selectDataSource(myDataSource);
    myDocument.dataMergeProperties.mergeRecords();
    app.activeDocument.exportFile(ExportFormat.PDF_TYPE, File ("/c/inetpub/wwwroot/indesign/merged2.pdf"));
    //myDocument.save(new File("C:\\inetpub\\wwwroot\\indesign\\mergedOutput.idml"));
    myDocument.close ();
    if I run myDocument.exportFile(ExportFormat.PDF_TYPE, File ("/c/inetpub/wwwroot/indesign/merged2.pdf")); then it tries to merge but throws a warning [link manager Link out of date: file: and links the original csv file it was created with (not my referenced data source file).
    I believe I should merge on the active document and not the original document.
    But if I run app.activeDocument.exportFile(ExportFormat.PDF_TYPE, File ("/c/inetpub/wwwroot/indesign/merged2.pdf")); it throws a javascript error, app.activeDocument is undefined.

  • Automating PDF Generation with InDesign

    Is it possible for InDesign to retrieve info from a database, automatically format the data with paragraph style(s) and export hi-res PDF art for each database entry? PDF export to include common art positioned on the master page. If this function is possible with InDesign, how does one accomplish this task?... AppleScript? I don’t speak code, so this could be very intimidating. Recommendations?

    I think you might need an interpreter. I speak code, sure, but very slowly and with a very thick accent.
    Plain vanilla InDesign won't hit a database; there are plugins for that. Catalog plugins, for example; if you're making something catalog-like, that's worth a search or three. If you can get CSV files from your DB, then Data Merge will work for minor automation. Read up on InDesign's XML capabilities if you need something more robust than that; it is extremely useful, and even someone like myself with barely-there software development skills can automate the production of a dictionary with XML spat out of a database.
    In terms of automating the the formatting, XML is another obvious choice, because the working method is to map an XML tag to a style.
    Exporting PDFs automatically is something that can be achieved with scripting, either Apple- or Java-. I don't know off the top of my head how to set it up, but there are quite a few talented scripters reading these forums, and perhaps one of them can nudge you in the right direction. Perhaps you'll see the advantage in actually contracting one of them to develop this for you.
    All that being said, I'd be surprised if there wasn't already a catalog plugin to do exactly what you want. (The last time I said "InDesign can't really do that" it took about fifteen minutes for the forum regulars to post both a plugin and a custom-developed script that basically completely fulfilled the original poster's criteria.)

  • InDesign and XML Automation

    I am new to the InDesign and XML Automation process.
    We have a xml file that has 100+ items and our goal is to automate them into a InDesign format (5-6 per page). Does InDesign/XML support this and what is the best approach to do this?

    The full script runs on "the active document", and it's possible that is the point where ID gets confused. Can you re-write it as a function with *one* parameter -- the document to work on?
    Then you can do your loopy (sorry) looping like this:
    someDoc = app.open(files[i]);
    Run("other script", someDoc);
    someDoc.close(SaveOptions.YES);
    "app.open" returns a handle to the ID document once it's opened, and if you save it into a variable you can use this wherever you are using "app.activeDocument" now.

  • No AUTOMATION in InDesign CS5!?

    hi, I'd like to use the data merge tool which has served very well in the past. Now, I can't find the menu window/automation. any idea what's happened?
    InDesign CS5 Design Premium / Windows 7 / 32 bit
    thanks folks...

    man, I must be blind!! Thanks a lot
    I misclicked on the helpful button and now can't correct to correct answer (unexpected error - must be a bad hair day) sorry & thanks again...

  • Batch Automating Design update on 1000 InDesign files- Any ideas?

    I have just been brought in to a new company that issues one page (and separately saved) biographies using inDesign. The biographies use a standard style, with a great deal of reoccurant information (company details, logo etc) and then some personal info that makes up the biography.
    The company recently underwent a re-brand which now means some 1000 of these biographies are displaying incorrect logos, colour schemes, font, watermark, contact information and company details.
    I want to amend this, upgrading them to the new style guidelines. And for my personal sanity would like to automate the process as much as possible. Any ideas on how best to tackle this would be greatly appreciated!
    My thoughts are as follows:
    Partial Automation: - Perhaps I can export swatches, colour profiles and font settings from the updated templates and retrospectivly apply them to all the old ones. This would get me a good deal of the way there... but would still leave an issue on changing all new company details. If I could apply this in bulk I could flag the files for a small amount of editing next time they're needed.
    Partial Automation: - Perhaps with a better understanding of the master pages tools I could create a default collection of swatches and space layout and import data into certain fields manually?
    Full Automation: - I would love it if some combination of the above and InDesign scripts were possible to use to achieve this... but I am not optimistic. Perhaps the better idea is to use the exportallstories.js script to scrape all the relivant data from my old files. From there I would need to write a python file to identify the relivant fields (namely: Name, Title, biography). I could then migrate these details to a spreadsheet and save it as a .csv file. From here I might finally be able to re-import it back into my new template style using the <<Automated Data merge>> functions! It's a bit hieth robinson and would require some careful thinking on python expressions to get everything into .csv correctly.... but I think it's crazy enough to work. Any assistance on ideas here... or ideas about how I automate this to batch export to RTF (without 1000 tiedious "ok" dialog box clicks) would be greatly appreciated.
    Any help, advice or pointers to relavant literature would be greatly appreciated.
    Other Info:
    I am on CS5
    Windows 8 (i know... i know...)
    I can get a python IDE up and running pretty quickly
    Am happy to migrate this to my native linux for some parts of this process if there are tools/i can use the command line to get things done quicker!
    Thanks
    aBoL

    Thanks all for the replies, it's given me a great deal to think on.
    I have discoved some of this information is helpfully stowed on their website. Am going to contact the IT guy... if i could scrape right off it or better yet get access to their mySQL or whatever perhaps that'd be the fastest way to make my magic .csv and then batch import all.
    As for plans b-z:
    Eugene Tyson I looked into what you suggested about using books. I've still got a problem with importing all to one file if anyone knows a handy script that'd be much appreciated. I still obviously need to read up on master pages, when i've been dragging the style it seems to sandwich both the new style and old style together... so perhaps the data in isn't clean enough anyway (cleaning +1000 files would probably take longer than ctrl+c ctrl+v on all of em)
    Peter, you're exactly right. Dirty in dirty out on data right? I've found that given that these files were all made with the same workflow, there is a great deal of consistancy. If its 100% i cannot yet tell, but if i export using the story export .js it seems to me i could either scalp off the bottom most five files (which seem to inevitably contain the valued data) or ponder clever if statements that will detect if it's got something that might be a name or just our latin placeholder text. But yes... i figure whatever a good deal of checking will be invovled.
    Ariel, Your help would be greatly appreciated and I will pm you and anyone else who would be willing to get stuck into this challenge!! The main one for me right now would be the automated importing of files in bulk into a single story... perhaps the automated use of the other story export script... or if you were feeling extremely talented, doing all the work in indesign itself, opening files in sequence in a folder, stripping out the contents according to rules (that we could base on the regularity of it's content) or placement (they're generally in the same area) and saving that out to a txt file or even better a .csv!!
    anyway I'm teetering between this being a fun challenge and a utter nightmare, but the looming idea of manual data entry is enough to propel me on. Any help / discussion or further thoughts would still be vastly appreciated!
    thanks all and have a great weekend.

  • InDesign 2.0 doesn't launch, but Automator does--???

    I know you must be thinking... InDesign CS2, but actually I am still using InDesign 2. Some files are just not built in anything too new that we receive.
    The issue is, when I have lately tried to launch ID2, Automator window comes up instead. I have no idea how to get out of the Automator mode to simply open ID2. I have ID2, IDCS and IDCS2 on one machine. Platform is Mac 10.4.11 (Tiger). The other versions seem to launch normally...
    Has anybody got a suggestion?
    Thanks.

    Harbs. wrote:
    Have you used 2.0 on this machine before? I have not tried to launch 2.0 in years, and I would not be surprised if it does not work on 10.4. I was created when OS 9 was still around...
    Harbs
    Harbs, you have hit the nail on the head. I sheepishly admit my mistaken memory of having run InD 2 on current machine, but we have had musical Macs (remember musical chairs?) and the last swap I don't think I migrated my apps with that knowledge in mind. It definitely is not compatible with OS Tiger. It would not let me re-associate program at all and I see Adobe compatibility is only for up to Jaguar...
    Sorry for the time-waster, I should have double checked all the obvious first steps before starting this thread...

Maybe you are looking for