Open multiple indd docs through SDK

Hi guys
How can I open multiple indesign documents found in a folder chosen
through a folder chooser?
I need to open each indesign doc in that folder and do some
modification on each.
Here is what I have already written. Now how do I proceed please
SDKFolderChooser folderChooser;
folderChooser.SetTitle("Select folder where Indesign Docs are");
folderChooser.ShowDialog();
if (!folderChooser.IsChosen())
break; // cancelled
IDFile inFolder = folderChooser.GetIDFile();
PMString inFolderPath = folderChooser.GetPath();
if (inFolderPath.IsEmpty())
break;
//Now open loop through each file and do some processing on each one at a time
Logically I just have to loop through all the files in that folder,
open them and do my processing but I just cant find the right snippets
anywhere. I guess its pretty easy for u guys but am real new at that
and just cant find any examples anywhere.
Thanks for your help
Alicia

Hi Alicia!
You can use the FileSystemIterator to go through all the files in a folder. See the paneltreeview sdk sample plug-in for example code for this.
Basically you probably want something like this:
    PlatformFileSystemIterator iter;
    iter.SetStartingPath(inFolderPath);
    IDFile idFile;
    PMString filter("\\*.indd");
    bool16 hasNext = iter.FindFirstFile(idFile, filter);
    SDKLayoutHelper helper;
    if (FileUtils::DoesFileExist(idFile))
      do
          UIDRef docRef(helper.OpenDocument(idFile));
          ASSERT(docRef);
          helper.OpenLayoutWindow(docRef);
          hasNext = iter.FindNextFile(idFile);
      while (hasNext);
Good luck!
Oh, you need to include the actual implementations of PlatformFileSystemIterator and SDKLayoutHelper to your project so they are compiled into the plug-in, as they arent part of the InDesign runtime libs.
/Andreas

Similar Messages

  • Can't open multiple PDF docs on same display

    I have a Windows 7 x64 machine, with Acrobat X Standard, running dual displays.
    The problem is that I can't get multiple PDF files to open on my right display.  One PDF file will open on the right display, if no other PDF files are open.  The first one always opens there by default.  The problem is that if one file is open, any subsequent PDF files ALWAYS open on the left display, on top of my design software.  Then I have to drag it back over to the right to see what I'm doing on the left.  Very annoying.
    EVERY other application installed on my machine opens where it's supposed to.  Multiple Firefox windows always open in the same place on the right display.  Multiple Windows Explorer windows always open on the right display.  Multiple Outlook, Word, Excel, etc. docs always open on the right display.
    Acrobat is the ONLY app that will not open multiple docs on the right side.  I had the same issue with Acrobat Reader 9 before I installed X.
    My old machine used to do the same thing with Acrobat 8 Standard, and at some point there was an update that seemed to fix it.  However I can't seem to get it to work with X on my current machine.  Any ideas?

    The problem is with the document, not the program.You can try to open the file in Preview and print from there. Otherwise, you will need to contact the creator of the document for a new version of the file.

  • How can I hyperlink pages between multiple indd docs, and have them work in a pdf?

    Ok, this is confusing, so I'm going to try to be as clear as possible. I'm using InDesign CS6.
    I am working on a catalog, over 500 pages, which is split into several smaller indd files.
    I need to end with one single pdf of the whole catalog, with links to different pages. For example, there's an index in the back, a TOC in the front, and various "related product" type references throughout the catalog which I would like to have the page numbers as clickable links.
    When I try just linking to the different docs, either clicking it in the pdf opens the indd file (not helpful) or nothing happens at all (even less helpful). So I assume there must be a trick to it. Or it's impossible.
    I know how to do this if everything was one big indd file, but it's not. I suppose that could be an option but I really don't know how my mac will react to a file that large.
    So, how can I make this happen? Is there a way? Would it be better to just do this in Acrobat?

    I actually did already create a book with all the files in it, but I couldn't figure out how that was helpful. The hyperlink panel doesn't seem to have any "book" options (unless I'm looking in the wrong place?) and just linking to the different files (after creating the book) didn't have any different results than linking to the files before I created the book.
    I thought maybe linking to the different files in the book would work if I could export the whole book to pdf at once (which would be super-helpful in and of itself), but that doesn't seem to be an option either.
    I guess what I'm asking is for you to elaborate on what to do after creating the book.
    Thanks!

  • Issues with opening multiple artboard docs in Illustrator CS6

    Hi. I'm working in CS6 Cloud. I have a document with multiple artboards. However, when I go to open it, a dialogue box comes up and says "Open Pdf - Select a page from PDF to open...". I can then only open single artboards as separate documents. How do I go back to opening multiple art boards all at once? Thanks.

    Thanks for your help! That makes sense...I'm pretty sure I didn't save it as a pdf file, which is why I was getting confused...but maybe in between the document being opened between CS6 Cloud and CS5 (which my partner uses), something weird happened?? I will copy everything back into a new doc again with mulitple artboards and make sure it's saved for compatibility with previous versions, and see where that takes me. Thanks again for your help.

  • Open multiple .indd files

    Hello,
    usually when I have to ask for opening a single .indd file I use something like this:
    fileToOpen = File.openDialog("Open a document");
    myDocument = app.open(File(fileToOpen.fullName));
    But what if I have to open multiple files at once (eg. selecting them from the Desktop)?
    I read from the Indesign object model that the "open" function of the "application" object can accept an array of files.. am I right?
    Thanks in advance

    @lglmrc – the openDialog() method comes with another argument for opening multiple files. That argument is set to "false" by default.
    Setting it to "true" is the key here:
    var FilesToOpen = File.openDialog("Open one or more documents", true);
    for(var n=0;n<FilesToOpen.length;n++){
        app.open(FilesToOpen[n]);
    Alternatively there is the openDlg() method, that also comes with the second argument.
    See also:
    http://jongware.mit.edu/idcs6js/pc_File.html#openDialog
    File openDialog (prompt: string[, filter: any=null][, multiSelect: bool=false])
    Opens a dialog so the user can select one or more files to open.
    Opens the built-in platform-specific file-browsing dialog in which a user can select an existing file or multiple files, and creates new File objects to represent the selected files.
    • If the user clicks OK, returns a File object for the selected file, or an array of objects if multiple files are selected.
    • If the user cancels, returns null.
    Uwe

  • [AS] Can't open multiple indd files of a chosen folder

    Hi,
    I just can't get the opening of a bunch of indesign files inside a chosen folder with AS.
    I write this :
    --Prompt the user for a folder to be picked including indd files
    set
    b originfolder
    to (choose folder with prompt "Choisissez le dossier contenant les fichiers Indesign")
    --Try to open all the indd files included in the
    tell application "Adobe InDesign CS3" to open every file whose extension ends with ".indd" of folder
    b finalfolder
    end tell
    I am going nuts failing. I heard about a "creating list of files" way but when I try it, error says that it can't convert the files to a string.
    Hope someone can help. Thanks in advance.
    Loic

    Hi Larry,
    You 're right.
    This is the point, it works fine !
    thanks

  • Problem in opening a ms doc through server

    I am having the problem with doc and xsl. I have added this
    <mime-mapping> <extension>xls</extension> <mime-type>application/vnd.ms-excel</mime-type> </mime-mapping>
    <mime-mapping> <extension>doc</extension> <mime-type>application/msword</mime-type> </mime-mapping>
    to my web.xml. I even restarted the server. I still see doc and xsl in binary. Is there some other setting that needs to take place?
    I am using WebLogic Server 8.1
    I can see the doc and excel files in the browser if I don't go through the weblogic server. That just confirms it's not my browser.

    Well /C is not the path to the app. It is a switch to
    the command line.
    set your file name to "C:/test.doc"
    ~TimSorry, I guess my reply doesn't really answer the problem. But you can supply the entire path as part of the file name string.
    String file = "C:/Path/To/My/File/to execute/test.doc"

  • How to export multiple indd files to individual PDF's?

    Is there a way without using scripting, to simply take, say 10 single indesign files (all just single 3.5x2 business card layouts) and export them to a pre-defined PDF preset resulting in 10 single PDF's? (other than one at a time?)
    I tried a few things from Acrobat 9 pro, one of them being File/export/export multiple files/  thinking that must be the ticket, but
    1) I can't find my pre-defined PDF preset in the "export to dropdown list" (but thats secondary, probably can add that in somehow, right?) and
    2) even when I just pick PDF/a or PDF/x it starts the process, then tries to open each indd doc but a message comes up saying it can't open the INDD  file(s) and nothing was processed.
    Can someone help me with this?
    Thank you.

    Macinbytes,
    Would you mind walking me through what you are doing?
    In your screen shot, that window looks like the preferences panel, in which you can set your PDF preset, correct?
    Here's what I have been trying.
    File/Create PDF/Batch Create Multiple files.
    Eventually, I get this window. (output options)
    Then when I hit OK, I get this error message saying the files cannot be opened.

  • CANNOT OPEN MULTIPLE CATALOG MANAGERS

    I am not able to open two or more catalog managers at the same time.
    When the second session is opened an error log file containing the following error is created
    eclipse.buildId=unknown
    java.version=1.5.0_11
    java.vendor=Sun Microsystems Inc.
    BootLoader constants: OS=win32, ARCH=x86, WS=win32, NL=en_US
    Command-line arguments: -os win32 -ws win32 -arch x86
    !ENTRY org.eclipse.osgi 2009-01-23 18:24:16.375
    !MESSAGE Application error
    !STACK 1
    org.eclipse.core.runtime.CoreException[1]: org.eclipse.core.runtime.InvalidRegistryObjectException: Invalid registry object
    at org.eclipse.core.internal.registry.ConfigurationElement.createExecutableExtension(ConfigurationElement.java:134)
    at org.eclipse.core.internal.registry.ConfigurationElement.createExecutableExtension(ConfigurationElement.java:129)
    at org.eclipse.core.internal.registry.ConfigurationElementHandle.createExecutableExtension(ConfigurationElementHandle.java:48)
    at org.eclipse.core.internal.runtime.PlatformActivator$1.run(PlatformActivator.java:222)
    at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:376)
    at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:163)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:585)
    at org.eclipse.core.launcher.Main.invokeFramework(Main.java:334)
    at org.eclipse.core.launcher.Main.basicRun(Main.java:278)
    at org.eclipse.core.launcher.Main.run(Main.java:973)
    at org.eclipse.core.launcher.Main.main(Main.java:948)
    I tried re-installing only the presentation services but it dint work.
    Is it a problem with Java in my system?
    What can be the solution?

    I have jdk1.5.0_09,jdk1.5.0_11
    I did find a workaround i can open multiple catalog managers through the startup.jar file in
    OracleBI\web\catalogmanager ,but if try to open through the catalogmanager.exe it fails to open more than one session.

  • I have a brand new macbook pro 15" with latest Lion.Can anyone tell me why, when I open word or preview etc that multiple files open?For eg if I open a word doc, the last 1-3 docs that I have worked on all open. why?

    I have a brand new macbook pro 15" with latest Lion. Can anyone tell me why, when I open word or preview etc that multiple files open?For eg if I open a word doc, the last 1-3 docs that I have worked previously on all open. Can anyone tell me why?

    You have a choice as to whether or not applications in Lion like Word or Preview (or even Safari) save and re-open previous documents or windows... just hold down the option key while quitting a program and when you re-open it you won't get the previous documents or windows when you re-open the application. You can see this by selecting the open program in the menu bar and when holding down the option key the quit function will change to quit and discard open windows. This feature in Lion is referred to as "Resume" and is great if you want to restart an app and return to what you're doing (for example in Safari re-opening existing windows and tabs from your previous session). You still have the option to close individual windows within an app before quitting and they will not re-open when the app is launched again.
    This Resume function is not related to saving your work (a word or text document for example). This is handled by Lion's "Auto-Save" and "Versions" functions. See http://www.apple.com/ca/macosx/whats-new/auto-save.html
    Hopefully this is the complete answer you're looking for.

  • Batch script to open multiple excel and doc files

    Hi Everyone,
    Could anybody please provide a batch script to open multiple excel and doc files at a time.
    Appreciate ur quick response.
    Regards,

    You have several scripting choices within Windows. At a basic level you've got "batch files" - which run a series of command interpreter commands, and have a file extension of .BAT or .CMD. If you just wanted to open a list of Word documents, then assuming that the path to Word is correct (something like this below) you could list these in a file with a .BAT extension and run this (e.g. double click on it):
    "C:\Program Files\Microsoft Office\Office\Winword.exe" "C:\Documents and Settings\All Users\Desktop\File1.DOC"
    "C:\Program Files\Microsoft Office\Office\Winword.exe" "C:\Documents and Settings\All Users\Desktop\File2.DOC"
    "C:\Program Files\Microsoft Office\Office\Winword.exe" "C:\Documents and Settings\All Users\Desktop\File3.DOC"
    "C:\Program Files\Microsoft Office\Office\Excel.exe" "C:\Documents and Settings\All Users\Desktop\File1.XLS"
    "C:\Program Files\Microsoft Office\Office\Excel.exe" "C:\Documents and Settings\All Users\Desktop\File2.XLS"
    Another script language is VBScript, which was the example I gave. VBScript is available on most Windows platforms and can be run from a command prompt or within Windows. If you save the text I gave you above to a file with a .VBS extension you can double-click to run it (Windows) or open a command prompt and type CSCRIPT MyVBScript.VBS (assuming that's the name of the your .VBS file).
    Other script languages are available to achieve the same thing, including Powershell, however you'd need to have Powershell available on your PC.

  • How to open multiple forms through differnt responsiblity

    I have a 11.5.10.2 system on Linux red hat.
    Business pepole want to open multiple forms through different responsiblities from multiple web brower sessions.
    However when I opened 2 IE brower sessions, log into responsiblity and open one oracle form in one IE session and log into another responsiblity through second IE session. The first opened form disappear and replaced by the second oracle form opened from another IE session. That means only one Oracle form can be open at the same time for this case.
    The current walkaround solution is to open 2 browser sessions using 2 different browsers ( one is IE another is Firefox) to fix this issue. Apparently this is not a good solution.
    Can you please give me some suggestion to fix this issue?

    Thank you very much for the information.
    The note mention:
    The new forms launcher does not support opening multiple forms applets for the same database across different responsibilities. Opening a form in another responsibility will cause any forms currently open to close. This behaviour is standard.
    However it is possible to enable users to open multiple forms sessions for the same database for the same responsibility when using MS Internet Explorer as the client browser. This is made possible with Patch 3293241. This patch is included in Oracle Applications release 11.5.10 as standard.
    My current system is 11.5.10.2. I verified that patch 3293241 has been applied. I have no problem to open mutiple forms with in SINGLE web brower session, within same responsibility. I am aware that you can not open multiple forms through SINGLE web brower session through multiple responsiblity. What I tried to do is to open mutiple forms through multiple web browers sessions. Open one brower session, log into system and open a form, then open another web brower session, log into the sytem and open a form through different responsiblity. The system does not allow me to open multiple forms through multiple web brower sessions. Only the latest form can be displayed. Is this standard design for 11.5.10?
    Can Form Servlet architecture solve this limitation?
    Actually afterI changed some form funcation paramter in Oracle Application Developer responsiblity, I can open 2 form session from 2 different responsiblities through 2 web brower sessions. I can open one form session as Application Developer and another form session through another responsiblity. Then I can switch to other responsiblity through Application Developer responsiblity to open forms.
    Is there any other way I can open multiple form sessions to the same database through multiple web brower sessions?
    Thanks a lot for your help
    Edited by: wcxtao on Nov 3, 2008 9:47 AM
    Edited by: wcxtao on Nov 3, 2008 9:57 AM
    Edited by: wcxtao on Nov 3, 2008 10:08 AM

  • Why can't close open multiple docs in Word 2010 in multiple windows while having the option to close them out while keeping Word open?

    End User of mine is wanting to open multiple docs in Word 2010.....first initial glance I thought it was a PICNIC issue. But when addressing it she has it set up to NOT "Show all windows in the taskbar" that option is unchecked so that way she
    can close out docs in Word and not actually close Word. But with unchecking that box it only stacks the docs it won't display them in mutliple windows. This is not the case with Excel as she has the option enabled to "Show all windows in the taskbar"
    but yet the enduser still has the option to close out the spreadsheet and keep Excel open. Is there anyway to keep that second smaller x in Word to close out the docs but yet open in multiple windows like Excel does?
    Please advise!
    Thank you and any help would be greatly appreciated.

    Hi VyDrix13,
    What will happen if you check the option of “Show all windows in the taskbar”?
    If you want to closing document and keep Word open, the alternative is to click File > Close, right there under Open and Save.
    You also can add the Close button to the Quick Access Toolbar.
    If there is anything that I can do for you regarding this issue, feel free to post back.
    Best regards,
    Greta Ge
    TechNet Community Support
    It's recommended to download and install
    Configuration Analyzer Tool (OffCAT), which is developed by Microsoft Support teams. Once the tool is installed, you can run it at any time to scan for hundreds of known issues in Office
    programs.

  • Cannot open multiple docs

    Since installing SL, I can no longer open multiple items in the same program at the same time.
    For instance, I used to be able to select as many JPGs as I needed to view, double click or drag them to Preview and all of them would open in Preview.
    OR,
    select a few PNGs and drag them onto the Fireworks icon in the dock and they'd all open up in Fireworks, ready for editing.
    Now, when I do either of the methods for open multiple files that used to work, only the first file opens.
    What am I missing?

    HI,
    Try deleting the associated preference files to those applications.
    com.apple.Preview.plist
    com.adobe.fireworks.plist
    /Users/YourName/Library/Preferences. Drag those files to the Trash, empty the Trash and restart your Mac.
    If that doesn't help, try repairing disk permissions.
    Quit any open applications/programs. Launch Disk Utility. (Applications/Utilities) Select MacintoshHD in the panel on the left, select the FirstAid tab. Click: Repair Disk Permissions. When it's finished from the Menu Bar, Quit Disk Utility and restart your Mac. If you see a long list of "messages" in the permissions window, it's ok. That can be ignored. As long as you see, "Permissions Repair Complete" when it's finished... you're done. Quit Disk Utility and restart your Mac.
    Carolyn

  • Open multiple reports in WEBI Through URL

    Hi All,
    We are working on BO XI R3.1 WebI reports. We are trying to open multiple reportparts using opendocument url. We tested with juts one report part and it worked fine, but so far, the attempt for multiple report parts using same url has never succeeded. Can anyone suggest a way to achieve this?
    Thanks in advance.

    Hello ,,
    Could you please share the full scenario...
    How exactly you are expecting. with open document syntax.
    Thanks
    Santhu.....

Maybe you are looking for

  • HOW DO I COPY A WINDOWS 7 PROFILE SO I CAN USE ITS SETTINGS FOR ANOTHER USER?

    I want to copy an ex employee's profile in Windows 7 (we are on a domain by the way). I want to copy the ex-user's profile and replace the new user's profile so when the new user logs in, they will see the previous user's settings like calendar. Is t

  • Stuck on restore..

    when i connected my ipod touch [4gen] i noticed a new update. ios 4.3.4. i go ahead and start the update process. next thing i see, itunes is asking me to either choose a new name for my device or restore from backup. i was a little confused at this

  • Photoshop Elements Editor 8 Slice Tool

    Hi, Does Photoshop Elements Editor 8 has a slice tool. I right clicked on every tool but i can't find anywhere. Any help would be highly appreciated. - Thanks.

  • Detecting launcher (java.exe vs javaw.exe)?

    I found myself wondering this morning if one could and how if one could one would detect if the launcher of a particular main(...) were java.exe or javaw.exe programatically. Or by extension could one detect if Swing interfaces were supported. Consid

  • Set Change to 'Development' : ERROR: No maintenance cycle

    Hello, i have customized the change management scenario in SolMan 4. Now that I have approved a change request I want to set the change to 'development'. But the error No Maintenance Cycle appears. I have assigned a maintenance project to my Solution