Reaching variables in template / indesign cs4

I've never really done any scripting in indesign earlier and I thougth everything was going alright. Up and until I moved from a test file to the designed template.
The scripting relies on two columns of text (labeled right / left) which supplies information to a couple of text areas with unique labels.
The two columns gets the text properly, but the other text areas isn't reachable by the code, or even selectable.
So I was wondering, what is the difference between the text areas in the template and the ones I make "outside" of the template?

There is no difference assuming you did the same in document and template.
Dave

Similar Messages

  • Create document from template without launching Adobe Bridge (InDesign CS4)

    When I select "New Document from Template...  while using InDesign CS4, Adobe Bridge launches instead of a search menu.
    It's much harder for me to navigate through Bridge than it is with a standard New menu. How can I get InDesign NOT to launch Bridge when this happens?

    Just use File > Open... and navigate to the template you want to use.

  • Importing xml with xslt in InDesign CS4

    Hello All,
    i need someone's help who's an expert at xml and xslt features of InDesign CS4.
    i work in publication, besides our magazines we produce yearbooks with lots of repetative information fields in them. we get the data in xml fromat which we flow in to InDesign. the xml files are very simple, here's an example:
    <?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
    <Root>
    <Story>
          <Country> Afganistan </Country>
    <Company_ID>
       <Company_Name> Kam Air </Company_Name>
       <Company_Code> 1 </Company_Code>
       <Address_text> 1205 Qalla Fatuha </Address_text>
       <Address_text> P.O.Box 456 </Address_text>
       <Address_text> Kabul </Address_text>
       <Address_text> 22004 </Address_text>
       <Address_text> Afganistan </Address_text>
       <Telephone_text> Telephone: +93 20 2200 108 </Telephone_text>
       <Fax_text> Fax: +93 20 2200 110 </Fax_text>
       <Email_text> E-mail: [email protected] </Email_text>
       <Website_text> Website: www.flykamair.com </Website_text>
       <Personel_text> Abdul Raquib, chief Executive <Personel_text>
       <Personelmail_text> ([email protected]) </Personelmail_text>
       <Job_code> A1 </Job_code>
    </Company_ID>
         <Country> Albania </Country>
    etc.
    </Story>
    </Root>
    the problem is we don't want <Company_Code> and <Job_code> elements displayed in the InDesign file.
    so we created an xslt file that shoud get rid of these two unwanted elements (obviously the xml file above was pointed to this xslt file)
    <?xml version="1.0" ?>
    <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
    <xsl:template match="/">
    <Root>
    <Story>
      <Country>
    <xsl:for-each select="Company_ID">
       <Company_ID>
          <xsl:value-of select="Company_Name"/>
          <xsl:value-of select="Address"/>
          <xsl:value-of select="Telephone_text"/>
          <xsl:values-of select="Fax_tex"/>
          <xsl:value-of select=Email_text"/>
          <xsl:value-of select="Website_text"/>
          <xsl:value-of select="Personel_text"/>
          <xsl:value-of select="Pesronelmail_text"/>
       </Company_ID>
      </xsl:for-each>
    </Story>
    </Root>
    </xsl:template>
    </xsl:stylesheet>
    but it doesn't work. could someone tell me what's wrong with the xslt file? or what would the correct xslt file look like?
    Thanks everyone!

    Here's the sort of thing I mean in more detail.
    First, the XML file:
    <?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
    <?xml-stylesheet type="text/xsl" href="transform2.xsl"?>
    <Root>
    <Country>
    <Country_name>Afganistan</Country_name>
    <Company_ID>
       <Company_Name> Kam Air </Company_Name>
       <Company_Code> 1 </Company_Code>
       <Address_text> 1205 Qalla Fatuha </Address_text>
       <Address_text> P.O.Box 456 </Address_text>
       <Address_text> Kabul </Address_text>
       <Address_text> 22004 </Address_text>
       <Address_text> Afganistan </Address_text>
       <Telephone_text> Telephone: +93 20 2200 108 </Telephone_text>
       <Fax_text> Fax: +93 20 2200 110 </Fax_text>
       <Email_text> E-mail: [email protected] </Email_text>
       <Website_text> Website: www.flykamair.com </Website_text>
       <Personel_text> Abdul Raquib, chief Executive </Personel_text>
       <Personelmail_text> ([email protected]) </Personelmail_text>
       <Job_code> A1 </Job_code>
    </Company_ID>
    <Company_ID>
       <Company_Name> Another Company </Company_Name>
       <Company_Code> 2 </Company_Code>
       <Address_text> Elswhere</Address_text>
       <Address_text> P.O.Box 123</Address_text>
       <Address_text>Another City</Address_text>
       <Address_text> 22005 </Address_text>
       <Address_text> Afganistan </Address_text>
       <Telephone_text> Telephone: +12345678 </Telephone_text>
       <Fax_text> Fax: +12345678 </Fax_text>
       <Email_text> E-mail: [email protected] </Email_text>
       <Website_text> Website: www.dfhdfh.com </Website_text>
       <Personel_text> dfhdfhdfhdfhdfh</Personel_text>
       <Personelmail_text>dfhdfhdfhdfh</Personelmail_text>
       <Job_code> A2 </Job_code>
    </Company_ID>
    </Country>
         <Country>
    <Country_name>Albania</Country_name>
    <Company_ID>
       <Company_Name> Number 3 </Company_Name>
       <Company_Code>3</Company_Code>
       <Address_text>Somewhere in Albania</Address_text>
       <Address_text>Freedonia Avenue</Address_text>
       <Address_text>Whatever the captial of Albania is called</Address_text>
       <Address_text> 88888</Address_text>
       <Address_text> Albania </Address_text>
       <Telephone_text> Telephone: + 666 666 666 666 </Telephone_text>
       <Fax_text> Fax: + 777 777 777 777</Fax_text>
       <Email_text> E-mail: [email protected] </Email_text>
       <Website_text> Website: www.albaniar.com </Website_text>
       <Personel_text>Ludwig Wittgenstein, chief Executive </Personel_text>
       <Personelmail_text> ([email protected]) </Personelmail_text>
       <Job_code> A1 </Job_code>
    </Company_ID>
    </Country>
    </Root>
    Note that I have renamed the XSL file "transform2.xsl". I have got rid of the "Story" tag, and I have nested the tags more appropriately, with a new tag "Country_name". Here's the XSL:
    <?xml version="1.0" ?>
    <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
    <xsl:template match="/">
    <Root>
    <xsl:for-each select="/Root/Country">
    <Country>
    <Country_name><xsl:value-of select="Country_name"/></Country_name>
    <xsl:for-each select="Company_ID">
    <Company_Name><xsl:value-of select="Company_Name"/></Company_Name>
    <Address_text><xsl:value-of select="Address_text"/></Address_text>
    <Telephone_text><xsl:value-of select="Telephone_text"/></Telephone_text>
    <Fax_text><xsl:value-of select="Fax_text"/></Fax_text>
    <Email_text><xsl:value-of select="Email_text"/></Email_text>
    <Website_text><xsl:value-of select="Website_text"/></Website_text>
    <Personel_text><xsl:value-of select="Personel_text"/></Personel_text>
    <Personelmail_text><xsl:value-of select="Personelmail_text"/></Personelmail_text>
    </xsl:for-each>
    </Country>
    </xsl:for-each>
    </Root>
    </xsl:template>
    </xsl:stylesheet>
    (That file should be saved as "transform2.xsl" to match the link on line 2 of the XML.)
    Hope that works -- Jeremy

  • [Ann] QR Code for InDesign CS4 and up

    Ever needed to create a QR code? There are literally hundreds of free QR code generators on the web, but they all have the same drawbacks:
    1. They typically deliver a PNG, either 'click here to download', or you have to drag it somewhere yourself.
    2. It's typically an RGB image, so the cautious designer will start up Photoshop to convert it to a monochrome image.
    3. .. so you get a file to store somewhere ..
    4. ... and after seeing four of them you cannot remember which QR code said what ...
    5. .... and, you cannot use such site in a batched environment (well, maybe some people can by building a proper URL, call the website, wait for a response, etc. I bet it's difficult for your average scripter.)
    So I had a go on converting one of the existing Javascript solutions -- Patrick Wied's, in case you're curious -- into a construction fit for InDesign. All you have to do is download the zip: http://www.jongware.com/binaries/jw_qrcode.zip -- unpack it, and save the file "QRCode.jsxbin" in your local User Script folder. It ought to be compatible with InDesign CS4 and upwards, for both Mac and Windows.
    When it appears in your Script Panel, you can double-click to run and
    1. with nothing selected, it prompts for text and error recovery settings, and will place a proper monochrome TIFF bitmap of (approximately) a useful dimension in the center of your current page.
    2. with an empty rectangle selected, the new QR code will be placed inside it.
    3. with some text selected, the text field will be pre-filled with this.
    4. With a QR Code selected which you created earlier using this same tool, the text field will contain the original text, and the quality setting will be retrieved. You can cancel the dialog if you only wanted to know what it said, or change the text or quality.
    5. You can call this script from another script to perform batch operations. It accepts two required arguments, and one optional, in this order: text, Error Correction level (1-4), and optionally a destination rectangle to place it in:
    app.doScript(new File(app.activeScript.path+'/qrcode.jsxbin'), ScriptLanguage.JAVASCRIPT, ["hello", 1, app.selection[0]], UndoModes.ENTIRE_SCRIPT, "Call QR Code");
    6. Since it's a monochrome bitmap TIFF with enough resolution (at its default size it's 200 dpi), you can use the swatches palette to change the white or black parts to another color, or even make one transparent.
    7. It's just a small file, and so I decided to always have it automatically embed. That way you can never loose it. The image first has to be created in a temporary file (default location: (Temp)/qrcode.tiff, where (Temp) is your local Temporary Files folder). If this fails for some of you (there always seem to be overly prudent IT professionals who seem to despise users storing files willy-nilly), I'll have to think of something else.
    Note: this version only supports plain text mode, not numeric, alphanumeric, or Kanji. Text is converted to UTF-8; for the most common purpose -- web pages -- it should work normally.
    Enjoy!
    Based entirely on Patrick Wied's implementation of a basic QR Code generator. Patrick Wied dutifully notes
    I do not guarantee any resulting QR code generations or detections, use this application at your own risk! - this project is just a study project (non commercial).
    and so I advise to always check your generated code using a good QR Code reader.

    To give back to community, here is the script to generate QR codes for business cards created by data merge
    It reads text frames starting with MECARD:, empties them and places QRcode rotated 15 degrees counterclockwise. Enjoy!
    var _d = app.documents[0];
    var _allStories = _d.stories;
    for(var nx=_allStories.length-1;nx>=0;nx--){
        var _storyAllTextFrames = _allStories[nx].textContainers;
        for(var mx=_storyAllTextFrames.length-1;mx>=0;mx--){
             _storyAllTextFrames[mx].select(); // change page
             if(_storyAllTextFrames[mx].contents.indexOf('MECARD:')==0){
                 var obj = app.doScript(new File(app.activeScript.path+'/qrcode.jsxbin'), ScriptLanguage.JAVASCRIPT, [_storyAllTextFrames[mx].contents]);
                 _storyAllTextFrames[mx].contents = "";
                var myScaleMatrix = app.transformationMatrices.add({horizontalScaleFactor:.7,
                    verticalScaleFactor:.7,counterclockwiseRotationAngle:15});
                obj.transform(CoordinateSpaces.pasteboardCoordinates,AnchorPoint.centerAnchor, myScaleMatrix);            
                 //obj.move ([_x,_y]);
    here is a MECARD template for you:
    MECARD:
    N:<<Last>>,<<First>>;
    TEL:<<Direct>>;
    TEL:<<Mobile>>;
    EMAIL:<<E-mail>>;
    NOTE:<<Position>> at <<Company>>;
    http://www.nttdocomo.co.jp/english/service/developer/make/content/barcode/function/applica tion/addressbook/index.html

  • Generating a pdf using InDesign CS4

    Hi there
    I am having problems generating a pdf using version CS4 - I have done this hundreds of times but on this occasion after selecting the preset I want, the file begins to generate / export and once the last page is reached - I get the message Adobe InDesign CS4 has stopped working - A problem caused the program to stop working correctly  and so no saved pdf !
    I tried doing the same thing using InDesign CS3 version at home and alas this works!
    I have tried exporting the file to a Interchange file and then attempted to export the file this way but again the same message appears. V frustrating!
    I have used the same exporting / preset for months and never had a problem before.
    Any ideas? The file is quite large in size - around 80mb but not sure this would cause a problem when trying to generate a high res pdf.
    All thoughts / suggestions welcome!
    Thanks

    Sometimes this is caused by insufficient system resources. In such cases exporting in chunks and combining in Acrobat generally will work.
    If that 's not it, it's most ikley an object on a page that is damaged or otherwise non-cooperative. You can isloate the page by trying  to export half at a time, then half of each section that fails. Once you've isolated the page you can do the same withthe objects on the page.

  • InDesign CS4  Varying page sizes one spread

    Is there a way to create a spread using two different page widths in inDesign CS4?
    Looking to make a doc for a gatefold where one panel (page) width would be a 1/4" shorter.  Is this possible to do in one document so I can print as spread and it will print as one page or do I need to make separate documents and put spec together by hand?

    Hi,
    Sorry to say that variable page widths are not available in InDesign CS4, they were introduced in CS5. The work around before CS5 was to make one page that was the combined width of both pages and manually add in guides and your own fold marks.
    Regards
    Paul

  • Opening InDesign 2.0 document in InDesign CS4 - is it possible?

    Someone sent me an InDesign 2.0 document and I cannot open it using InDesign CS4, which is the version I have. The error message I get reads: "Cannot open [filename]. The document was edited by a pre-release version of InDesign."
    Is there any way to open these documents?
    Thank you.

    No.
    This is not a Version 2/Version 6 (your version) issue. The user had a prerelease version of InDesign which saved in a format incompatible with the release version, as a form of copy protection for beta users. If the person providing the file was a legitimate user of the prerelease version of InDesign 2, then they might be able to contact Adobe to solve this problem, but I highly doubt it.
    Anyone who would have been a legitimate user of a prerelease version of InDesign is not likely to never have upgraded in over six years. The supplier of the file is likely a severe cheapskate using a bootleg copy.
    Your best option may be to ask for a PDF and a packaged copy (with all linked files), then use that as a template to recreate the file.

  • Exporting Quark 7 to InDesign CS4

    I am using Windows XP, latest updates. I have a batch of about 500 Quark 6.0 and 7.0 files that need to be converted to InDesign CS4. I've read that you can export from Quark to an .indd or .inx file, but there is no such option in my Quark 7.0 file> export menu. Do I have to have Quark 8 to do this? What other options are there other than creating a new template in InDesign and cutting & pasting text, then re-importing the graphics?

    http://www.markzware.com/q2id/
    Indesign by itself will open Quark 4 files. So without Q2ID, you would
    have to open each Quark 7 file, save down to Quark 6, open in Quark 6,
    save down to Quark 5, open in Quark 5, save down to Quark 4, then open
    in Indesign.
    Quark cannot save to Indesign or Indesign Interchange format.
    Kenneth Benson
    Pegasus Type, Inc.
    www.pegtype.com

  • How to convert InDesign CS4 doc to MS Word?

    As a graphic designer, I always design brand stationery elements in InDesign CS4. Often a two colour pantone printing job for my customer to match envelopes and cards, etc.
    Now I've got a young engineering customer who doesn't want hard copies. He wants a template(?) for his letterhead and contracts to be able to email. He uses MS Word. How best do I take an InDesign design and convert it to Word? (I hate the thought!)
    I offered a PDF file he could print, but he can't use that on the road.
    My design for him uses 2 Pantone colours; uses two fonts he doesn't have; and a tiff graphic as a tint in the background that bleeds to the edge.
    Anyone done this before?
    Will it look the same as my graphic?
    Thanks for your advice! :-)

    One of the major problems with Microsoft Office products is their inability to allow import/placement of either EPS (properly - for screen display at all or for printing to non-PostScript devices) or PDF (simply not supported).
    When faced with the issue of please prepare us some letterhead or provide us with a letterhead template (they just want the logo and the other material), my approach has been to do the design in InDesign and export PDF. The Word user creates their document on a blank page (leaving room for the stationery's logo, footer, etc.) and when done, saves as a PDF file. In Acrobat, they then use the Background or Watermark feature to add the stationery PDF to whatever pages of the document need that content. Foolproof and maintains the full graphic quality of the stationery as produced in InDesign, including if so desired, spot colors.
              - Dov

  • Making an E-Book In InDesign CS4

    New To Indesign. I want to create an a new E book. When I click the Ebook icon in the creat new box it brings up the  box for me to browse files on my computer. I want to create a fresh new template (ebook) in InDesign CS4. I also do not see where to insert photos from my files to a new document.
    When I even try to test with a word file to import it in, it will not let me and the drop down menu give me a book extention option option only and there are no files I have like that of course.

    We don't know much about iPad in this forum so we are not aware what might be happening. Have you posed the question in the iPad forum? There is a forum for iWork on iPad.

  • Can't Place a specific Word 2010 docx into InDesign CS4

    I'm trying to use the Place command to bring the text from a specific Word 2010 docx into InDesign CS4.
    I've successfully brought in several Word 2010 documents (docx extention) to InDesign CS4 documents using the place command.
    I have one specific 30 page document (which is no loarger than others which have been successful), and when I use the place command with this file, nothing happens (and no text gets loaded onto the cursor for placement.
    I've tried re-saving the word doc, even pasted its contents into a new Word doc and still can't get the Place command to work.
    THere's nothing particularly unique about the file - doesn't have any odd embedded content, just a 30 page text document writtin in word.
    Any ideas what could be going wrong or how to fix it?
    I've tried restarting both Word and InDesign without any change (and the rest of my word files can be Placed without problem, so I imagine it's something specific to that file.
    NOTE - re-saving in RTF format lets the Place command work but leaves a bunch of empty squares/boxes (not sure if these were for tabs or empty spaces or what really??)
    Can work around this for now, but would like to know how to get the place command working with decent size Word Docs( docx for word 2010 if that matters).
    Thanks for any help.

    It turned out that for at least one particular document the OP had used some blank paragraphs as spacers at the start of the text, and that the style assigned to the second paragraph used a combination of left and right paragraph indents that was more than the width of the document page, sending the entire document (except for the empty first paragraph) into overset. I can't say for sure, but I think the Word styles might have been mapped to ID styles because I found no trace of the indents in the Word file itself, only in the ID document, and I had no trouble placing that Word file in my own ID test document. I did have some trouble placing another .docx file supplied by the OP in CS4, but not in later versions, and conversion to .doc solved that problem.

  • Button issue in InDesign CS4

    I need to add text using interactive -->  button option in InDesign CS4. This particular text has to appear when I  mouse the text in PDF after generating from InDesign CS4. I don't want  to add those text in PDF itself.
    Indesign CS3 has  button options to add text but InDesign CS4 does have that option to add  text. Please guide me how to add text using Button in ID CS4.
    What  I did was: I have created a button and add text using button option and  save it. When exporting PDF from ID CS3, I have enabled the option  Interactive elements. After generating PDF from ID CS3 I have mouse over  the text, whatever text I was inserted in button it appeared in PDF  well.
    But this option is not available in InDesign CS4. I hope you understand it clear now.
    I  have taken the screenshot below from InDesign CS3 and attached the same  for your reference. This option does have in InDesign CS4. Please help  me out in this regard.

    I've answered this in the other thread where you asked the question.
    Steve

  • Urgent - help with Text direction in InDesign CS4

    Hello,
    I use InDesign CS4 on Windows 7. It's a standard version (without options for right-to-left languages).
    Whenever I make a new text frame, it seems to have a right-to-left "logic" of the text. The text types left to right, but the period in the end would go all the way right.
    It also mixes up tabs. It looks like this:
    Instead of:
    Usually I get around it by pasting another correctly formatted text-frame or text, and it works.
    Now I'm trying to create a new document with master frame (in order to be able to easily change the layout successively of a many-paged document), where I need to insert existing (formatted) text. But this text take this "right to left logic", whether I past the text, or even a whole text frame.
    I could find nothing in the character/paragraph options to get rid of this.
    I would greatly appreciate if you could help me.
    with respect,
    Jerusalem Nun.

    This behaviour is normal. Changing the default property of any style, when no document is open, changes the style for every new document, but not for existing document.
    Take a look what is your basic style where all other styles are build up on it, in your case, go to the paragraph style and look what is the basic style which was used.
    If the default style was used (it is the one in brackets), you have always a problem. You should not use it in any case.
    Because you don't have a ME version of InDesign you can't change direction directly, but you can create a new document with the default settings and the same paragraph (and character, table and cell styles) in a new document without RTL styles. Save this document, no content is required.
    Go to the 'infected' document, open the paragraph style panel and in the panel menu take "Load all text styles", select the new document and overwrite with the incoming styles.
    If necessary you might repeat it with the Table, Cell, Character and Object Styles, as all of them have some kind of direction settings.
    I don't know how good your styles were created, you have to adjust your document. And I would strongly recommend—I repeat—I strongly recommend to work always with styles.

  • Text wrap type syntax is not supported in Indesign CS4

    Dear all,
    Text wrap type syntax is not supported in Indesign CS4. How to set the text wrap type in indesign CS4

    Hey!
    app.selection[0].textWrapPreferences.textWrapMode = TextWrapModes.CONTOUR;
    TextWrapModes.BOUNDING_BOX_TEXT_WRAP
    Wraps text around the object's bounding box.
    1651729523 = 'bsds'
    TextWrapModes.CONTOUR
    Wraps text around the object following the specified contour options.
    1835233134 = 'mcon'
    TextWrapModes.JUMP_OBJECT_TEXT_WRAP
    Forces text to jump above or below the object, so that no text appears on  the object's right or left.
    1650552420 = 'band'
    TextWrapModes.NEXT_COLUMN_TEXT_WRAP
    Forces text to jump to the next available column.
    1853384306 = 'nxfr'
    TextWrapModes.NONE
    No text wrap.
    1852796517 = 'none'
    tomaxxi

  • What is the best way to work with Word documents in The InDesign CS4???

    I work in Microsoft Word 2007 and all my documents have *.doc format.
    What is the best way to work with Word documents in InDesign CS4???
    David Blatner says to avoid copying and pasting text from Word instead of placing it (Ctrl+D).
    How about pasting RTF or Text Document???
    I want to make book's layout in ID CS4 and its main feature is that there is the left page with text and the right - with graphics.
    So, as I understand to place the text on each page I must create for example 70 Word documents and place each item on 70 left pages???
    It loks like wasting time. I sthere another way of making such layout???  What kind????

    It's best to place any text.
    You can have all of your text in one file and use auto-flow to add threaded text frames and pages as required (Hold down the Shift key when you click the loaded text cursor), but it's a little non-standard to have the thread only on one side of the spread from the auto-flow perspective, so you'll have to set up properly.
    This is one case where a master text frame will work to your advantage. On your master page spread, add a text frame to the left page, but not to the right (or at least not threaded to one on the right -- for some other project you might actually want two independent text threads). Hold the loaded cursor over a frame on the left side of a document page and auto-flow. ID will add new spreads as necessary, but only put the text on the left side.
    Peter

Maybe you are looking for