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.

Similar Messages

  • Developer Update for InDesign Server Developers

    Hello all,
    If you are creating plug-ins for the Creative Suite of Adobe applications, you'll want to attend this ninety minute session for an update on developing plug-ins for Photoshop, Illustrator, InDesign, Bridge, Version Cue, and XMP.
    Topics include the C and C++ APIs, Extendscript and other developer details. Dan Brotsky, Chief Architect for the Creative Suite, will discuss highlights of the Version Cue SDK, and the Creative Suite Activation Software. This presentation is not for the technically faint of heart expect high technology at high speed!
    This session will be recorded for later review, and a summary document made available for reference.
    Who should attend? Any developer that is interested in creating plug-ins for any products in the Creative Suite.
    May 3rd. 9:00 am to 10:30 am PST
    Free
    Online via Acrobat Connect - watch from your desktop - no special software require to participate.
    Register at:
    http://www.adobe.com/cfusion/event/index.cfm?event=detail&id=883099&loc=en_us
    MNR

    I have spent some time geting Java automation to work with InDesign, it's not my favorite language but I learned some things that may help and put them into some course content that Adobe should put out shortly; will post here when it is available online.
    Our company, Silicon Publishing, provides general InDesign Server automation training, though we don't have a current offering that specifically targets Java we teach some of the basics of working with Java (many unique techniques!) and could arrange a limited form of training.
    The documentation and samples with the SDK should take you part of the way there: for specific scripts, it has been helpful to us to get things working in an easier-to-write (i.e. JavaScript) script first, then translate such a script to Java, taking into account the unique characteristics of the language and various tactics (outlined in the SDK documentation) to address these.
    Max
    Max Dunn
    Silicon Publishing
    www.siliconpublishing.com
    [email protected]

  • InDesign server crashes every time when calling deleteEmptyPages in script

    We are evaluting InDesign Server CS6 on a Windows server environment. We have an idml file, sample xml file that is tagged to specific frames inside the idml file and a script file for execution on the server. This script opens the idml file using the app.open api, imports the xml file and export the ID file to a PDF. Because we have table content with variable row count, we are using the smart text reflow functionality. Setting the text preferences with smart text reflow appears to be working but we also want to delete the empty second page when the content is less than a page. So, we also tried using the deleteEmptyPages property document's textPreferences. When this is set to true and the script is executed on the ID server using the sampleclient, the server crashes with the following message. When I do the same thing in the InDesign UI using the preferences options, it works as expected.
    The script looks like below - is this the right way to do it?
    var myInddFile = app.scriptArgs.get("idfile"); //"X:/IDFiles/AutoFlow.indd";
    var myXmlFile = app.scriptArgs.get("xmlfile"); //"X:/IDFiles/deleteme.xml";
    var myOutputOptions = "[Smallest File Size]";
    var myPDFPreset = app.pdfExportPresets.itemByName(myOutputOptions);
    var myDoc = app.open (File(myInddFile), OpenOptions.OPEN_COPY);
    myDoc.xmlImportPreferences.ignoreWhitespace = true;
    myDoc.textPreferences.smartTextReflow = true;
    //myDoc.textPreferences.addPages = AddPageOptions.END_OF_STORY;
    //myDoc.textPreferences.limitToMasterTextFrames = true;
    myDoc.importXML (File(myXmlFile));
    //uncommenting this line causes the ID server to crash
    //myDoc.textPreferences.deleteEmptyPages = true;
    var myOutputFile = app.scriptArgs.get("outputfile");//File("X:/IDFiles/sampleX.pdf")
    myDoc.exportFile (ExportFormat.PDF_TYPE,myOutputFile, myPDFPreset)

    Thanks Harbs. We are looking at full automation and so removing the pages manually is not an option. But I did find a script at InTools http://in-tools.com/article/scripts-blog/script-of-the-day-jan-24-2010/ that helps with automating the removal of empty pages. This script appears to be a nice workaround for server side usage. I used it on my document with multiple column text frames and it is removing the empty page as expected. If there is a better way to do this, let me know. Thanks.

  • What's needed for a PDF processing module for InDesign Server?

    Hello,
    After digging through lots of documentation and whitepapers, I am still puzzled about what would be an efficient way to implement a software module that handles some specific processing tasks of PDF output (automatically generated in InDesign Server and targeted for various types of print configurations from small-run LFP up to very high volume commercial printing).
    We have a working standalone script that uses Acrobat's preflight and correction functions, and now we would like to port and integrate this into a server-based workflow. Apparently, there is no Acrobat Server product available. Distiller Server does exist, but seems to be limited to converting PostScript to PDF without the PDF-to-PDF processing features we need. Some of the functionality that is typically found in RIPs (e.g. converting colours to a preset output intent with highly configurable options [for pixel/vector elements, black and spot colour ink issues etc.] and flattening native transparency) could probably be implemented using the Adobe PDF Print Engine, but this seems a bit overkill and would probably require extensive programming from scratch. I suspect there should be a smarter way to use existing software – but which? I am not yet familiar with InDesign Server; does its SDK permit full access to the same parts/functions of the PDF library that Acrobat uses for its preflight and correction features?
    Any help is welcome.
    Eric

    Gordon,
    It appears that in the past few days you have not received a response to your
    posting. That concerns us, and has triggered this automated reply.
    Has your problem been resolved? If not, you might try one of the following options:
    - Do a search of our knowledgebase at http://support.novell.com/search/kb_index.jsp
    - Check all of the other support tools and options available at
    http://support.novell.com.
    - You could also try posting your message again. Make sure it is posted in the
    correct newsgroup. (http://support.novell.com/forums)
    Be sure to read the forum FAQ about what to expect in the way of responses:
    http://support.novell.com/forums/faq_general.html
    If this is a reply to a duplicate posting, please ignore and accept our apologies
    and rest assured we will issue a stern reprimand to our posting bot.
    Good luck!
    Your Novell Product Support Forums Team
    http://support.novell.com/forums/

  • InDesign Server CS6 (MacOS) - JavaScripting & Troubleshooting "Bus error" or "Segmentation fault"

    I'm attempting to convert a workflow from InDesign CS5.5 Desktop with AppleScript to InDesign Server CS6 with JavaScript. It seems most of our templates work fine but every now and then I run into one that seems to work properly but right after we export to PDF and JPG which is the final step in the script I get either a Bus error or a Segmentation fault error. The files do export and the console sits idle for a few seconds then I get the crash. It doesn't seem to give me anything else and I can't find a crash dump or core file anywhere on disk to examine.
    The exact same input files on InDesign CS5.5 Desktop completing a very similar automation task via AppleScript work without an issue or error. I'm not certain if it's a problem with the way the InDesign files were put together, a version problem between a CS5.5 file and CS6, or something that I'm doing wrong in the script.
    Is there a way to get InDesign Server to go into debug or verbose mode so that it will show more than just two word errors on crash?  I've read a few people talking here about the debug version but every path I've found to get access to the debug version runs into a roadblock with a bad link.
    I would appreciate a point in the current right direction for how to debug these templates this script.

    Re: verbose mode. These are not InDesign error messages. They are system errors, saying that an app (InDesign?) crashed, went away, hence could not issue any kind of message. Crash logs are the place to start. If they don't help, and the crash is outside your code, after that it's over to the maintainer (Adobe?)
    Worth sharing a suitable crash log, as the list of routines active at the crash can narrow down issues.

  • InDesign Server as a reporting service

    Hi, Im looking for help/guidelines regarding InDesign. I'm a software architect working on a line-of-business application that will eventually require printing about 5 hundred thousand personalized report (of about 20 pages each) over a couple of days (and many other smaller jobs), and my client requires that this job be executed by a third party. Think of the document as a fairly standard financial report printed once a year for each participant. The application is built in .net, backed by a sql database. Once a year, the data is mined, computed, and outputed in a format acceptable by the supplier (who is chosen through a public tendering process).
    So from what I've learned thus far, to be complient with most suppliers, I must use some file format like postscript or eps, and to do this, it looks like InDesign Server might be what I'm looking for.
    So here is what I've figured out so far (and where I will need your help if I'm not making sense) :
    - Create a kind of IDML template using InDesign on a desktop computer
    - in our .net application, modify the IDML for each participant to personalize it (a lot of conditional code to remove sections of text, and inject numbers, etc).
    - Send each (or a batch is feasable) to the InDesign Server to prepare for publishing into postscript/eps files
    - and if feasable, also create a PDF of each because we need to keep a digital version of the document on the client's corporate SharePoint (for legal reasons).
    Is this how InDesign should be used? Am I making any sense?
    Thanks in advance for all the answers.

    Hi, JP43.
      For what it's worth, your question is on the boundary between the scripting forum and the general forum.
    So from what I've learned thus far, to be complient with most suppliers, I must use some file format like postscript or eps,
    This seems a bit peculiar. The obvious format for your document output would be PDF. PostScript and EPS seem weird choices, though certainly conceivable (well, I don't think you can have multi-page EPS files, but you can certainly have 20 EPS files and you can have multi-page PostScript files, but they tend to be output-device specific, though they need not really be).
    What is your supplier doing with the file? Are they a printer? A specialty industry auditor? Or something else? If they're a printer, they should be asking for a PDF, I think.
    Though it's also possible what they want is a less final output format that humans can deal with in other applications, such as Microsoft Word. A lot depends on the workflow. Anyhow, back to the main question:
    and to do this, it looks like InDesign Server might be what I'm looking for.
    Note that it's not a requirement that you use InDesign Server, and at $22,000/license, depending on your volumes, it may make sense to just use InDesign Desktop. The standard InDesign EULA doesn't let you drive its automation remotely, but if you have a human being walk up to a computer and start a script that reads 500,000 input files and produces 500,000 output files, I think that is in compliance.
    Replacing your bullets with numbers:
    1. Create a kind of IDML template using InDesign on a desktop computer2. in our .net application, modify the IDML for each participant to personalize it (a lot of conditional code to remove sections of text, and inject numbers, etc).
    3. Send each (or a batch is feasable) to the InDesign Server to prepare for publishing into postscript/eps files
    4. and if feasable, also create a PDF of each because we need to keep a digital version of the document on the client's corporate SharePoint (for legal reasons).
    #2 is definitely one way to do it. If you are comfortable manipulating the IDML XML in .NET, and it's not important for you to leverage InDesign's object model in your conditions (e.g., you do not need to know how many pages InDesign would set a particular table at, and that does not effect your decisions of what objects to place where), then this is fine.
    If your batch data is fairly simple substitutions, you could use InDesign's Data Merge feature. But that's really just a mail merging feature and it sounds like you have large tables of data and it is probably not sufficient.
    The way I would probably implement it is to write code for InDesign's scripting that starts with a template (INDD or IDML or whatever), and then instructions InDesign to place various items in various places, replace/remove conditional items, etc. This allows you to leverage InDesign's knowledge of how the page is laid out and to make layout-continent adjustments in your script. If you tried to do this in IDML, you would have to replicate InDesign's layout engine in your software which is essentially infeasable and at which point you might as well throw InDesign out the window and just use something like iText to produce a PDF directly.
    That said, #'s 1,3 and 4 are all trivial.

  • Indesign server application

    I have a separate web application, which among other things works with Indesign files.
    I need to process indesign files:
    1)extract text; return extracted text to my application;
    2)replace some specific text content inside document; return output document to my webapplication;
    I need this entire processing to be automated. So I would like to pass file to some application (idnesign server script/plugin? running somehwere ), which would work with file and give me an output.
    Is it feasible? How would I go about such task? What bits of Adobe software would I need?
    It seems that I need Indesign Server CC, but I can't figure out theoretical workflow. From what I gathered, I can develop some script for indesign server, that will do the job. But how would script inside server might be triggered and notified about incoming file?
    Any suggestion/links/information is deeply appreciated.

    Doing some searching I came across this thread in the Adobe Reader forum which is the first place I've seen a concrete answer, so you might want to give it a try: http://forums.adobe.com/thread/392875?tstart=0

  • Font's...manage through indesign server or os?

    Hi,
    I'm just getting started with InDesign Server, and working with packaged .indd file (i.e all elements in a nice folder structure).
    My question is, if i'm uploading a new package onto my server, and want to use the fonts for that artwork, do I need to manually, or through some form of automation add the fonts to the windows server, or is there a function in the InDesign Server that deals with importing / loading fonts?
    Any help much appreciated!
    Many thanks,
    Brett

    You're pretty close, the outlined steps could work. Of course you'd have to add some more postprocessing steps - add or remove pages dependent on your conditional sections, let InDesign rebuild the index if you need one, eventually optimize the layout beyond the automatically maintained keep options.
    With that number of produced documents your topmost issue will be speed. For that reason I'd try to not use IDML and outside processing - to open an existing document is much faster than to import it from IDML, and if you can reuse the same template document without close-open, it will be even faster. InDesign has many features such as conditional text, text variables, counters that could be utilized. Your script would then work straight on the document object model, given an input such as tab delimited text or xml.
    It is possible to communicate from .net applications with InDesign, but here you should also run comparisons with VBScript and ExtendScript which both have the advantage to run within the InDesign process. There are also other advantages of VBScript and ExtendScript - controlling InDesign can be a bit inconvenient for strongly typed languages like C#, even though it is doable. The community and thus possible support is larger for ExtendScript.
    Output will work in all mentioned formats. You might get along with a PDF-only workflow, but as you mentioned the print supplier may have special requirements.
    Dirk

  • 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).

  • Visual Studio compiling 64 Bit Plugin for InDesign Server CS5

    Hello guys,
    Again I have a problem compiling 64 bit plugins, but this time in windows environments, the 32 bit compiling works fine (also on 64 bit machines). The first thing I've done was creating a new project configuration for 64 bit environments copying the 32 bit settings. Now I changed the precompiled libraries to use the 64 bit ones and changed the output directories. After that the compilation process completed without errors, but the resource files have not been copied to the output directory (the directory for them has been created, but it remains empty). Adding the created plugin into the servers directory ends up with a server message that the plugin could not be recognized. Have I missed something that is necessary for compiling 64 bit plugins?
    I'm using the 64 Bit Developer Version of the indesign server CS5. The operating system is a Windows Server 2008 x64 R2 with Visual Studio 2008.
    Thanks!
    P.S. a plugin compiled with 32 bit settings (including 32 bit libraries) also works for the 64 bit version of the server, so does it make any difference if I'm using 32 bit or 64 bit libraries?

    The libraries were all correct (all using 64-bit).  The problem was a pathing issue.  libxml2 needs iconv.dll, but it couldn't find the 64-bit version that I built.  Once it found it, everything worked correctly.
    The funny thing about depends.exe is that it isn't right all the time.  For example, if you open one of the 64-bit .aip files that ships with Illustrator (rename it to .dll first), you'll see what I'm talking about.  It complains that you're mixing x86 and x64 CPU types, even though you're not.
    The program I used to discover my issue is Process Monitor (http://technet.microsoft.com/en-us/sysinternals/bb896645.aspx).  I've been using it for years and love it.

  • Is it possible to leverage InDesign Server templates in a custom web app?

    Hi there,
    I am building a custom web app and was hoping to leverage our existing InDesign Server templates within our web app. What I would like to do, is based on user input, show my template with the user's input in the browser. I have looked through the API guides for InDesign Server CS6, but I haven't been able to conclusively find anything that will allow me to use the APIs to call the server, send the data points the template requires, and then get an image back from the server.
    I believe this is possible, I am just not sure how to achieve it! Any ideas or articles that help push me in the right direction would be extremely helpful!
    Thank you!
    Marshall

    Yes it's completely possible. There are two parts to making something like this work:
    1. The scripts themselves. You can generally script InDesign Server and desktop InDesign exactly the way using ExtendScript. So that's the part of the process where your script receives variables and passes them into the template and replaces something you've identified as variable, whether text or an image or something else (perhaps a color theme, etc.). You should get your scripts running on desktop before playing around with server.
    2. The messaging between your web app and the server. Whatever language you are using (i.e. PHP, .Net, Java, Ruby…) there is a way to make a SOAP call to InDesign Server to tell it basically "run this script with these parameters". You should get the "hello world" script running from a SOAP call on the server before using your real variable-driven document.
    The documentation of these things is available here:
    http://www.adobe.com/devnet/indesign/sdk.html
    You need to download the InDesign Server SDK (don't worry if you're on CC and it says CS6, almost nothing changed) and the InDesign Scripting SDK. The Server SDK deals with part #2 above, the Scripting SDK with part #1.
    It really isn't that hard. I should warn you, though, that it is addictive and once you do your first one you will become all-powerful and want to do nothing else. :-)
    Good luck and don't hesitate to ask questions.
    Max
    http://blog.siliconpublishing.com

  • Issue in setting Load balancing for Indesign Server CS5.5

    Hi All,
    I need to set up load balancing mechanism for Indesign Server CS5.5 on Windows Server 2008 R2(64 bit version).
    I have dutifully following all steps defined in "WORKING WITH LOAD BALANCING AND QUEUEING FOR ADOBE INDESIGN CS5 SERVER.pdf"
    After running Indesign server using batch file "startup-indesign-server-CORBA-4instances.bat" from "<ID_SDK>\samples\load-balancing-and-queuing-clients\indesignserver-startup-scripts", I get only one instance of Indesign Server running. How to run multiple instances of the INDD server ? Is running multiple instance has something to do with type of licensing ?
    Now I run Clover.cmd script, I get this screen. I have no idea why its not working. Please help. Please let me know, if the scenario is not clear and more information is required.
    Thnx,
    D

    This is the image after running clover.bat

  • Can not start trial InDesign Server CC 2014 PC

    Hi
    I tried several time to start a trial version of InDesign Server CC 2014 on my pc but it does not work (licence problem)
    If I try to use APTEE (CS6 didn't find any other version) with this command:
    adobe_prtk --tool=StartTrial --leid=InDesignServer-10-Win-GM
    I have a return code 6
    Please help

    up

  • Indesign Server download link not working

    Hi
    I tried to download InDesign Server for windows from the https://www.adobe.com/cfusion/tdrc/index.cfm?product=indesign_server. Following this gives me the "403: Header Length Too Large" as an error.
    Any advice is much appreciated.
    Thanks,

    Yes. I tried CS6, CC and CC2014. They all seem to work.
    What browser are you using?

  • Problem with InDesign Server CS5

    Hi all,
    when i run from prompt (of Windows Server 2008) the command "InDesign Server.com -port 18383" the system respond "Adobe InDesign Server is not properly licensed and will now quit", until some days ago the InDesign Server work perfecly. What i do for that issue ? I try to run cthe command "InDesignServer.com -serilanumber xxxxxx" and the command "InDesignServer.exe -serilanumber xxxxxxx" but doesn't work (the system says me the same think "Adobe InDesign Server is not properly licensed etc etc"). What can i do ?
    Thank you in advance
    Luca

    If you are using CS6, you need to link the installation to an Adobe ID. The simplest way to do that is input the Adobe ID while you install, but you can use the tools (I forget off hand what they are called) to do that afterwards.

Maybe you are looking for

  • Material status blocks creation of reservation in SRM

    Dear All, We observe the following behavior in our SRM (5.0) System: If we create a caddy for a product that has the Cross-Plant Material Status : 04 (Material master, view Basic Data 1) in the Backend-System, the reservation can not be created. Ther

  • Converting QT movie with pauses to Flash

    I hve exported a Keynote 4.0.3 presentation to QT and it looks great. It pauses where it should. The task is to convert this to a flash video and retain all the pauses in the correct spots (without having to learn Flash cs3 or actionscript). I have a

  • Trying to restore from PC, after big NSW storm

    Apple TV Gen 3 not working after storm. Tried to hold down menu button and down button, got nothing, apple logo flashed on tv then nothing. Trying to do restore from PC. itunes, picked up unit, and it says it is downloading the software, I have a sta

  • PROTOCOL.MSGID_EXISTING_INBOUND: Message already exists in called system

    Hello all, in our receiver system we get follow error: PROTOCOL.MSGID_EXISTING_INBOUND: Message already exists in called system The message is in status: message already processed. But sure we sent the message only once and the message aren't process

  • Math code, how to create search help

    how will you call match code in your program