15 Replies Latest reply on Apr 20, 2010 5:53 AM by AdobeScripts

    Programmatically Modifying InDesign Files

    Jones_12345

      Hi,

       

      I am new to the InDesign world, so looking for some major guidance from this team.

       

      In my current project, we are trying to build a web application, which takes an InDesign template file as input. The template will have areas where the users can enter text data. The customers should be able to login to the application and customize the file (add name, address and some other attributes). Finally when they are done, the system should preview the updated InDesign document with the information and finally the customers should be able to print this document.

       

      Could you provide some information on how these can be done programmatically? What software or API's does InDesign provide to achive this functionality? It is required to have an InDesign server to get this capability?

       

      Any help would be appreciated.

       

      Thanks

        • 1. Re: Programmatically Modifying InDesign Files
          Harbs. Level 6

          You can probably do what you want with IDML. You would have to 

          programatically link the input fields to data in the IDML. To do it 

          directly in InDesign would probably require an InDesign Server license 

          (see below).

           

          If you need the preview capability, then you need InDesign Server for 

          legal reasons. (It would be a violation of the EULA to use InDesign 

          desktop for this.)

           

          Harbs

          • 2. Re: Programmatically Modifying InDesign Files
            John Hawkinson Level 5

            Can't he likely accomplish the same preview function with exporting to PDF? [or is that EULA violation too?]

            • 3. Re: Programmatically Modifying InDesign Files
              Harbs. Level 6

              Yes. I think that would be an EULA violation...

               

              Harbs

              • 4. Re: Programmatically Modifying InDesign Files
                Colin Flashman Adobe Community Professional

                sounds like a web to print solution is being made. is this something that has to be built from scratch or something which can be done using an off-the-shelf solution?

                 

                the following URL is a list of off-the-shelf solutions for web-to-print providers:

                 

                http://www.veedeepee.com/w2p-solutions.html

                 

                the market leader is xmpie. i've been using online print solutions which has a solution based on pdfs, so the template art can be created anywhere... but IMO i hate it.

                • 5. Re: Programmatically Modifying InDesign Files
                  Jones_12345 Level 1

                  Yes it is sort of a web to print solution. The input to the web application will be an InDesign template. The web application should allow the user to customize some areas of the brochure, view the preview and finally print the document.

                   

                  Another req. is that the initial brochure template will have low resolution image files. once the user has viewed the preview, when the submites the form for preview, the application should switch the image files to high resolution ones and send it for printing.

                   

                  To implement these functionalities, do we need an InDesign Server? Our application would be a java web application and based on my research, InDesign services can be called using SOAP.

                   

                  Is this the only option when the input is InDesign file or IDML file?

                  • 6. Re: Programmatically Modifying InDesign Files
                    Harbs. Level 6

                    Yes. You (legally) need ID Server.

                     

                    You should probably research existing products, because you don't necessarily have to reinvent the wheel. It could be you can integrate existing solutions...

                     

                    You would probably use SOAP if you are modifying the InDesign document (template) directly (using the scripting interface within InDesign). If you modify an IDML document, you can change the (xml) data directly using whatever technology you are most comfortable with.

                     

                    Harbs

                    • 7. Re: Programmatically Modifying InDesign Files
                      AdobeScripts Level 3

                      Harbs. wrote:

                       

                      Yes. I think that would be an EULA violation...

                      So all "small ads systems" violate EULA ... And InData/InCatalog from EmSoftware ...

                       

                      And even DataMerge should be banned Because you can't import data from database, create PDF, split it to pages in Acrobat and put on web server as separate PDFs, right ?

                       

                      So why Adobe created IDML format ? Promoted as:

                      IDML

                       

                      IDML is an open, XML-based file format that enables third-party developers and systems integrators to programmatically create, modify, and deconstruct InDesign documents outside the context of InDesign. IDML works with standard XML editing tools, making it easy to use in automated workflows. And with support for multi-threading in InDesign CS5, working with the IDML file format is even faster.

                       

                      With IDML, developers can now:

                       

                      • Dynamically generate or modify documents
                      • Deconstruct and reuse portions of documents
                      • Transform document elements using XSLT
                      • Find and modify data within InDesign documents using XPath or XQuery
                      • Use Adobe Flex® Builder™ software and the Adobe AIR® runtime to create custom applications and interfaces in front of IDML workflows

                       

                      I don't see here any requirements/restrictions about using IDML ONLY in InDesign CS4/5 ...

                       

                      robin

                      www.adobescripts.co.uk

                      • 8. Re: Programmatically Modifying InDesign Files
                        [Jongware] Most Valuable Participant

                        Robin, the magic word is "web application". You are not allowed to have ID create documents as a service.

                        It's the same thing with the Distiller -- you are not allowed to put that onto a web server and have other people distill their own PS files with it.

                        • 9. Re: Programmatically Modifying InDesign Files
                          Harbs. Level 6

                          Robin,

                           

                          Jongware has it right. If you use InDesign as a web service it's a violation of the EULA. If you use it as an intranet (local network) service, you need either a server license or desktop licenses equal to the number of computers using the service.

                           

                          Modifying IDML does not use InDesign, so you are not using InDesign as a web service.

                           

                          Is that clearer?

                           

                          Harbs

                          • 10. Re: Programmatically Modifying InDesign Files
                            AdobeScripts Level 3

                            [Jongware] wrote:

                             

                            Robin, the magic word is "web application". You are not allowed to have ID create documents as a service.

                            So I can't use DataMerge (built-in feature) or XML to build set of bussiness cards or product catalogue by loading data from database - i.e. mySQL - populated by PHP forms on public web server ?

                             

                            It's the same thing with the Distiller -- you are not allowed to put that onto a web server and have other people distill their own PS files with it.

                            I'm not talking about making my InDesign/Acrobat/etc. installation as free access to anybody.

                             

                            Why there is any restriction for SOURCE of data used to build InDesign document and DESTINATION of this document?

                            If there is scripting/plugin posibility - why we can't use it the way we need?

                             

                            It's like you bought car - and you are allowed to drive only straight - if you want to turn left or right - you need to pay extra - but basic version of the car is still the same ...

                             

                            robin

                            www.adobescripts.co.uk

                            • 11. Re: Programmatically Modifying InDesign Files
                              AdobeScripts Level 3

                              Harbs. wrote:

                               

                              Modifying IDML does not use InDesign, so you are not using InDesign as a web service.

                              What if you'll use web database to create hundreds of IDML files, then you open these files in InDesign and then you create PDFs/EPSs/JPGs/etc.? And then you sent these PDFs/EPSs/JPGs/etc. by e-mail as "direct mail"?

                              If you CAN do this - then what we are talking about ? Why EULA have these silly points ?

                              If you CAN'T do this - then you CAN'T use DataMerge, right ? You can use DataMerge to build document, export it as PDF then split in Acrobat to separate pages - or export to separate JPG/EPS files directly - and then send as "direct mail".

                               

                              And if we are talking about "web service" than EVERY web printshop - offering bussines cards, leflets, etc. can't use InDesign - because they ARE "web service" - they use web to get data, store this data and then use InDesign to process this data ...

                               

                              From EmSoftware InCatalog description:

                               

                              InCatalog--a plug-in   for Adobe InDesign--is a powerful bi-directional linking tool for creating   transparent links between your Adobe InDesign documents and external   data. With these links in place, you never have to enter or update   your data in two places (documents and database), but can simply   update one or the other from the most current version.

                              [...]

                              Pro vs. non-Pro

                              InCatalog Pro is the ODBC-capable version of InCatalog and can   update documents directly from and to   ODBC-accessible databases such as Oracle,   SQL Server, Sybase, Access, etc.

                               

                              I don't see ANYWHERE on EmSoftware page ANYTHING about InDesign Server as REQUIRED and ONLY ALLOWABLE software ...

                              Is that clearer?

                              I'm sorry but still not

                              I still can't understand why I can't use product I bought - and it wasn't cheap - the way I want ...

                              Why there is ANY restriction for INPUT "data" and what I can or can't do with OUTPUT "data"?

                               

                              If you use InDesign as a web service it's a violation of the EULA. If you use it as an intranet (local network) service, you need either a server license or desktop licenses equal to the number of computers using the service.

                              So EVERY editor in newspaper or publishing house can't use WORD or Notepad to prepare texts - he need to use InDesign or InCopy?

                               

                              robin

                              www.adobescripts.co.uk

                              • 12. Re: Programmatically Modifying InDesign Files
                                Harbs. Level 6

                                No, no ,no!

                                 

                                There's nothing about a product like InCatalog which makes use of InDesign as a web service.

                                 

                                There's nothing wrong with InDesign (desktop) using web services. The problem starts when InDesign is used as a web service. If InDesign can be defined as a web service back end, then you need InDesign Server. If it can't be defined as a web service back end, then you are safe. If it's a grey area, ask your lawyer...

                                 

                                You can do anyting you want with output data. The question at hand is how is InDesign being used...

                                 

                                The OP sounds like he wants users on the web do be a able to send requests which drive InDesign to change files, create previews, and produce output. This is a classic case of using InDesign as a web service. This falls quite clearly into the scope of InDesign server. If you have a system where a web user sends requests which makes edits in IDML files and nothing more (i.e. the actual processing would be initiated on a local machine), I believe you would not need ID Server.

                                 

                                Harbs

                                • 13. Re: Programmatically Modifying InDesign Files
                                  AdobeScripts Level 3

                                  Harbs. wrote:

                                   

                                  No, no ,no!

                                   

                                  There's nothing about a product like InCatalog which makes use of InDesign as a web service.

                                  But you CAN use it as a web service, right ?

                                  There is NO restriction/limitation in software or in description, right ?

                                  So user's responsibility is to use this this product according to Adobe's EULA, right ?

                                  BUT there is no info that user COULD break EULA by using product as "back end of web service", right?

                                   

                                  There's nothing wrong with InDesign (desktop) using web services. The problem starts when InDesign is used as a web service. If InDesign can be defined as a web service back end, then you need InDesign Server. If it can't be defined as a web service back end, then you are safe. If it's a grey area, ask your lawyer...

                                  So you can't use XML or DataMerge with data from database - both can produce mass files/documents ?

                                  Everything can be defined as anything - money will win better interpretation ...

                                  You can do anyting you want with output data. The question at hand is how is InDesign being used...

                                  So ... can I do something like this - EVERYTHING MANUALLY:

                                  - I'm receiving e-mail from my customer with info about which template he want to use for bussiness cards - he can view example templates on my web site - or in PDF I sent him earlier or PDF he downloaded from my web site, etc.,

                                  - in the same e-mail there is list of names, addresses, phones, etc. to fill chosen template,

                                  - now I'm doing COPY/PASTE from e-mail to InDesign,

                                  - at the end of "donkey job" I have 100 pages InDesign file - now I can create one PDF or bunch of PDF/JPG/EPS files and send him as previews for acceptance,

                                  - when he send me e-mail with info "everything is OK" - I can make finall PDF and send it to printer.

                                   

                                  If I can do all of this MANUALLY - why I can't use SCRIPTING to do the same in automated way ?

                                  Why I need to pay more for product which don't give me anything more - if I have already all what I need - SCRIPTING support ?

                                   

                                  The OP sounds like he wants users on the web do be a able to send requests which drive InDesign to change files, create previews, and produce output. This is a classic case of using InDesign as a web service. This falls quite clearly into the scope of InDesign server. If you have a system where a web user sends requests which makes edits in IDML files and nothing more (i.e. the actual processing would be initiated on a local machine), I believe you would not need ID Server.

                                  Maybe the problem is in definition of "the other end" ?

                                  If it's called USER - it's illegal - but if we call it CUSTOMER - will it be ok ?

                                   

                                  Which one is legal/illegal ?

                                  a)
                                  Mr. Outside uses a web browser, goes to a web page, and clicks 'Make PDF'. That causes a copy of InDesign (desktop version) inside the company to automatically read some data and build a PDF, which Mr. Outside then downloads.

                                  b)

                                  Mr. Outside uses a web browser, goes to a web page, and clicks 'Make PDF'. That causes an e-mail to be sent to Mr. Designer in the company. Mr Designer comes in in the morning, reads his e-mail and builds a PDF for Mr. Outside. Mr Outside then downloads the PDF.

                                  c)
                                  Mr. Outside uses a web browser, goes to a web page, and clicks 'Make PDF'. That causes a database entry to be made. Mr Designer comes in in the morning, checks the database for new job orders, and builds a PDF for Mr. Outside. Mr Outside then downloads the PDF.

                                   

                                  robin

                                  www.adobescripts.co.uk

                                  • 14. Re: Programmatically Modifying InDesign Files
                                    Harbs. Level 6

                                    Robin,

                                     

                                    We've been through this a few times already...

                                     

                                    Usual disclaimers: (I'm not a lawyer, etc...)

                                     

                                    I think it's pretty clear that "a" is illegal, and "b" and "c" are both perfectly legal. In fact, in the case of "c", I think Mr. Inside can run a script which queries the database, and builds PDFs which are sent to the customers.

                                     

                                    Now; what happens if Mr Inside has a CRON script which polls the database every 5 minutes and creates PDFs from new entries? I don't know. This I believe to be a grey area, and I defintely would not take the risk without consulting a lawyer...

                                     

                                    Harbs

                                    • 15. Re: Programmatically Modifying InDesign Files
                                      AdobeScripts Level 3

                                      Harbs. wrote:

                                       

                                      We've been through this a few times already...

                                      I know sorry

                                      I think it's pretty clear that "a" is illegal, and "b" and "c" are both perfectly legal. In fact, in the case of "c", I think Mr. Inside can run a script which queries the database, and builds PDFs which are sent to the customers.

                                      If you think that "c" is OK - then I'm more than happy

                                       

                                      robin

                                      www.adobescripts.co.uk