XML workflow: auto flow

Dear King of java,

Write a script to import xml and place it in the context of text, but I had my overset text, I know it's just a shift-doubleclick in outport of the text "auto format" text frame, the problem is how can I write in a script? Please help and share with a friend

How to solve this type of problem.

Thanks in advance!

Your document needs two pages with a block of text on each page, and managers must be threaded.

main();
function main(){
//xml -  import options
var myDocument = app.activeDocument;
var myXMLImportPreferences = myDocument.xmlImportPreferences;
myXMLImportPreferences.allowTransform = false;
myXMLImportPreferences.createLinkToXML = true;
myXMLImportPreferences.ignoreUnmatchedIncoming = false;
myXMLImportPreferences.ignoreWhitespace = false;
myXMLImportPreferences.importCALSTables = false;
myXMLImportPreferences.importStyle = XMLImportStyles.appendImport;
myXMLImportPreferences.importTextIntoTables = false;
myXMLImportPreferences.importToSelected = false;
myXMLImportPreferences.removeUnmatchedExisting = false;
myXMLImportPreferences.repeatTextElements = false;

var myFolder= Folder.selectDialog("Select the path...", ""),
    myFiles = myFolder.getFiles("*.xml");
for(var i=0;i 
         

Tags: InDesign

Similar Questions

  • XML workflow - adjust the width of text for images frame

    Kings of expensive java script,

    I was checking writing scripts for based on the xml workflow. Here, I did face the problem, the images do not set in the width of the text (screenshot attached for your reference) frame.


    @ I needed: all images automatically fit to the width of the text frame and the resizing of the images also.

    Width of the text frame: pt 325,984

    Text frame hight: pt 535,748

    This fair to the script?

    Screen Shot 2016-03-17 at 6.04.15 PM.png

    Thanks in advance

    HTH,

    function main(){
      var doc = app.properties.activeDocument,
      rects, rect, n =0, columnWidth, ratio, rectBounds;
    
      if(!doc) return;
    
      rects = doc.stories.everyItem().rectangles.everyItem().getElements();
    
      n = rects.length;
    
      while ( n-- ) {
      rect = rects[n];
      if ( rect.parent.parentTextFrames.length ) {
      columnWidth = rect.parent.parentTextFrames[0].textFramePreferences.textColumnFixedWidth;
      rectBounds = rect.visibleBounds;
      ratio = columnWidth/(Math.abs(rectBounds[3]-rectBounds[1]));
      rect.resize ( CoordinateSpaces.INNER_COORDINATES, AnchorPoint.TOP_LEFT_ANCHOR, ResizeMethods.MULTIPLYING_CURRENT_DIMENSIONS_BY, [ratio,ratio] );
      }
      }
    }
    
    app.doScript( "main();", u,u, UndoModes.ENTIRE_SCRIPT, "Fit images to column" );
    

    Loïc

    www.ozalto.com

  • File Folio XML - workflow tips

    Hello

    I am interested to learn more about the folio.xml file. The file remains in the format .folio

    Y at - it a tip or feature I can use this xml file?

    A tutorial on the workflow with the formats XML and Folio

    Concerning

    Felipe

    There is no documentation, tips or tutorials on this. You really want to go mud autour with the XML inside folios.

    Neil

  • Auto-Flow does not formatting to the master

    I'm placing a Word 2010 document in an InDesign document with facing pages. The text of the Word document up correctly, but the formatting does not work.  For example, if I have three columns in both of my Master pages, "automatic formatting" place in two columns and the top and bottom margins (height) are too high and too low.  Any idea what could go wrong?  Here's the Master pages.

    Masters.JPG

    This is the first release after auto-flux (note two columns):

    1st spread.JPGAnd the second (two columns and margins hurt).

    2nd Spread.JPGThank you!

    Steve and Peter,

    Thank you for having responded (I was expecting a notification by E-mail of responses, otherwise I would have responded earlier).

    It turns out that it seems that something was wrong with my master page. I had a similar master page in the same document, and it auto-coulait the same text Word with no problems, so I made a copy of the master page and used with complete success.

    I deleted (slight) to the original master page, I'd probably not able to recreate the same problem to understand what happened.  In practice, I don't need to know anyway, because everything works well now!

    Thanks again.

  • Exporter .xml workflow - advice needed

    Hi all

    I use Bridge CS6 /Camera Raw (win7 64 bit) to import, set and export aerial imagery for various deliverables clients. I have included using PS CS6 via the bridge to create my final exported files. So far, everything works fine.

    Because it is an 'interim' (used to create something else) step overhead in terms of local storage and archiving becomes too high (1000's of large files) - we need save storage space. So, asked me if it is possible to back up only the setting for each image parameters, I created, so we are not trying to save terabytes of temporary images and still have the ability to create the same exact imagery some time in the future from archived original files and my settings saved.

    I said I can do this, because I sometimes saved a parameter unique .xml in a project such as a seed for other work adjustment. My problem is that I can't understand guidelines to help Bridge to get there. I don't know if it's just me or the convoluted wording of aid is, but here's what I do:

    For all files in directory (all CR by applying adjustments) x I need to save the .xml files each adjustment for these images. This setting export can go to the same directory x or I can direct the app (bridge or CR) to save to a network archive location.

    This should be a simple thing to do. I think I'm too stupid to understand it on my own. Any help will be greatly appreciated!

    PS-I'm a link that the Forum of bridge too because I do not know where I could get my answer...

    Thanks Mike, I think that now I have a script that will restore to their original files xmp data.

    Place the original files and the xmp files in the same folder and run this script on the Tools menu, after it has been installed.

    #target bridge
       if( BridgeTalk.appName == "bridge" ) {
    xmpRestore = MenuElement.create("command", "Restore TIF xmp data", "at the end of Tools","xmpRes");
    }
    xmpRestore.onSelect = function () {
    app.document.deselectAll();
    var sels =app.document.getSelection("xmp");
    for(var a in sels){
    var sourceFile = File(sels[a].spec);
    var destFile = File(sourceFile.toString().replace(/xmp$/i,"tif"));
    if(!destFile.exists) continue;
    updateMetaData(sourceFile,destFile);
        }
    }
    function updateMetaData(sourceFile,destFile){
    if (ExternalObject.AdobeXMPScript == undefined)  ExternalObject.AdobeXMPScript = new ExternalObject("lib:AdobeXMPScript");
    sourceFile =File(sourceFile);
    sourceFile.open('r');
    sourceFile.encoding = "UTF8";
    sourceFile.lineFeed = "unix";
    sourceFile.open("r", "TEXT", "????");
    var xmpStr = sourceFile.read();
    sourceFile.close();
    var source = new XMPMeta( xmpStr );
    destFile = new Thumbnail(File(destFile));
    var md = sourceFile.synchronousMetadata;
    var md2 = destFile.synchronousMetadata;
    var dest = new XMPMeta( md2.serialize() );
    XMPUtils.removeProperties(dest,XMPConst.NS_CAMERA_RAW, "", XMPConst.REMOVE_ALL_PROPERTIES);
    try{
    copySchema( source, dest,XMPConst.NS_CAMERA_RAW,[]);
    var updatedPacket = dest.serialize(XMPConst.SERIALIZE_OMIT_PACKET_WRAPPER | XMPConst.SERIALIZE_USE_COMPACT_FORMAT);
    destFile.metadata = new Metadata(updatedPacket);
    app.document.refresh();
    }catch(e){alert(e+" "+e.line);}
    }
    function copySchema( source, dest, namespace, omitProps ) {
     var propIter = source.iterator(XMPConst.ITERATOR_JUST_CHILDREN | XMPConst.ITERATOR_JUST_LEAF_NAME, namespace, "" );
     var prop = propIter.next();
     var prefix = XMPMeta.getNamespacePrefix( namespace );
     while(prop) {
      var name = prop.path.substring( prefix.length );
       if(omitProps != undefined) var copy = !contains( omitProps, name);
      if( copy ) {
                try{
       XMPUtils.duplicateSubtree( source, dest, namespace, prop.path,namespace, prop.path, 0 );
                }catch(e){}
      }
      prop = propIter.next();
     }
    }
    function contains( arr, member ){
     var r = false;
     for( var i = 0; i < arr.length &! r; ++i  ) {
      r = arr[i] == member;
     }
     return r;
    }
    
  • Auto flow Multi Page PDF

    I wonder if anyone knows how to automatically throw a multi-page PDF in InDesign CS5. I have a 350 PDF page that I need to import, each page of the PDF file in a new page in the document. Something that works like the shift + click with a cursor loaded to word documents? Or a script that allows me to put a PDF file like this?

    Open the actions panel, either in apple or java scripts: find placeMultiPagePdf and double-click: follow and select dialog

    G

  • Text flow auto adjustable upward so that the right column is filled first then the left column, I have 44 000 membership numbered cards to be 10up on A4 (4 400 pages)

    Auto flow text can be set up so that the right column is filled first and then the left column

    I have 44 000 membership numbered cards to be 10up on A4 (4 400 pages)

    Try to manually create blocks of text on the master page, and then screw them in the order you want the text to flow.

    But it's more like a data merge project, that does not use your guides or frames. Why must fill in that order? I guess it will be eventually cut apart.

  • [JDev12c, ADF] How to associate a workflow already existing with a new workflow model

    Hallo,

    When I started at the develop my application, I created some defined the workflow.

    Now, I created a workflow template and I would like to associate it with the workflow created earlier.

    How can I achieve this?

    Thank you

    Federico

    You must enter the code inside the task-flow-definaiion below.

    /Web-INF/task-flow-template.XML

    task-flow model

    Thank you

  • new call taskflow - required child missing in call workflow element

    When you add a new 'call taskflow' to a taskflow, the 'child required missing in call workflow element' warning.

    I don't know how to solve this problem. I have attached the control flow to and from a page fragment.

    Hello

    This refers valid task call flow

        
          /WEB-INF/called-task-flow.xml
          called-task-flow
        
    

    I guess that yours is missing the element

    Frank

  • Passing parameters to a workflow set up as a region within the af: popup

    Hello

    I have a home page which opens a workflow as a region within an af:popup by clicking a command button on the home page.

    + < af:commandButton text = 'analysis of memory ' +.
    partialSubmit = "true" >
    + < af:showPopupBehavior popupId = "mempop" / >.
    + < af:popup id = "mempop" contentDelivery = "lazyUncached" > +.
    + < af:dialog title = 'Analysis of memory' type 'none' = > +.
    + < af:region value = "#{bindings.heapdumptaskflow1.regionModel}" / > + "
    + < / af:dialog > +.
    + < / af:popup > +.
    + < / af:commandButton > +.

    Page def file of this home page looks like this:

    + < taskFlow id = "heapdumptaskflow1" +.
    taskFlowId="/WEB-INF/config/adfc/heapdump-task-flow.xml#heapdump-task-flow".
    Activation = "deferred."
    xmlns = "http://xmlns.oracle.com/adf/controller/binding" >
    + < Parameters > +.
    + < parameter id = "jvmId" +.
    +value="#{viewScope.jvmHistoricalDataManagedBean.jvmId}"/ > +.
    + < parameter id = "startTime" +.
    +value="#{viewScope.filterUtilManagedBean.filterByFromTiming1Date}"/ > +.
    + < parameter id = "endTime" +.
    +value="#{viewScope.filterUtilManagedBean.filterByToTiming1Date}"/ > +.
    + < / Parameter > +.
    + < / taskFlow > +.

    The parameters passed to startTime and endTime are defined in a workflow pageFlowScope bean. These settings can be edited/changed from the home page.
    Issue here is that these parameters are defined in the workflow pageFLowScope bean when the home page is displayed first with their values by default instead of the with the changed values when the workflow is actually started as a popup by clicking the command button.
    This is expected behavior? How can I get the behavior desired in such a case?

    Thanks in advance,
    Ralu

    Try setting Refresh = "ifNeeded' on the task flow binding in the pageDef.

    Pedja

  • How to move the note off structure - structure xml

    Hey King,

    I searched this forum associated with the discussion of XML reference. I need still more clarification/discussion associated with this process.

    I need of maximum input and suggestion on this subject to streamline our processes.

    Our projects have around minimum 50 to 900 notes for each chapter, our customer's requirement is XML workflow.

    The problem is all our notes have attributes, such as [@type = "FN"]. Below my coding and the screenshot also.

    I need to get out the reference in Structure, need for xml structure and an applied also object style. Possible to the script?

    var mydoc = app.activeDocument;  
    var rootElement = mydoc.xmlElements.item(0);  
    var linkElementList = rootElement.evaluateXPathExpression("//footnote[@type='FN']");  
    for(var lp=linkElementList.length-1; lp>=0; lp--){  
            var myElement = linkElementList[lp];  
                    var myTextframe = myElement.placeIntoInlineFrame(["21p9","5p"]);  
                   //you have create the object style in you active document the object style name is "MN";   
                    myTextframe.appliedObjectStyle= mydoc.objectStyles.item("MN");  
        }  
    alert("Proces Completed");
    
    

    Screen Shot 2016-04-18 at 3.54.30 PM.png

    Thank you in advance to all

    myDoc var = app.activeDocument;

    rootElement var = mydoc.xmlElements.item (0);

    [var linkElementList = rootElement.evaluateXPathExpression("//footnote[@type='FN']"); "

    for (var linkElementList.length - 1; lp = lp > = 0; lp-) {}

    var myElement = linkElementList [lp];

    var myTextframe = mydoc.textFrames.add ();       If you want to give geometricbounds for textFrame

    myTextframe.placeXML (myElement);

    you create the style of the object in the current document you the object style name is "MN";

    myTextframe.appliedObjectStyle = mydoc.objectStyles.item ("MN");

    }

    Alert ("process finished");

  • Unable to read the XML of vCO - permission denied

    Hello guys,.

    I was trying to read/write xml workflows vCO files:

    I'm kinda stuck here, and I'd like to see if someone else has already encountered this problem before, and how solve you this problem?

    No details on this issue will be appreciated.

    Thank you

    DH

    Odd.

    What is your use cases? This file should accessible from an external system or not? If this does not store the file in a resource element is a better option.

  • content alert text without any XML tag

    Hi all

    For the XML workflow.

    Need of a content alert or select the content of the text without any xml tag.

    Please help for my XML application.

    Concerning

    Siraj

    Try this,

    var myDoc = app.activeDocument;
    var myPages = myDoc.pages;
    for(i=0; i
    

    Vandy

  • Why I can't import the sidecar.xml more?

    For more than a year, I used generator sidecar.xml to write the titles of the articles and the export/import in all different sizes of each issue of my magazine. For import, I chose "import multiple items" and chose the sidecar.xml folder.

    Now with the last update they seem to no longer works and it is a HUGE problem for me and I think for many others. I've read about this new files sidecar.xml based on the way, but I don't need, I want to use the old method to import my xml which worked well.

    On your release notes: "there are now two different methods for the use of the sidecar.xml files to import the items. "The classic sidecar.xml workflow is always supported - the sidecar.xml format and the workflow remains unchanged." and then why can't I just import more the sidecard generated by sidecar.xml generator?

    One of the DPS teams is currently studying this issue. Until this problem is resolved, one solution is to add a element after the element in the classic sidecar.xml file.

  • run the XML content in a document

    Right now I use the following for a placement of XML workflow. Import XML with a script from the CS5 Scripting Guide. I shoot to the top of the group structure and I drag and drop the root XML element in the document, the document automatically adds pages and inserts the contents of the XML file. That's exactly what I would like to be able to do, but with a script. How can I accomplish this? Also, what would be the term appropriate for this sort of thing? I think that "reinvest the XML content in the document", but I wonder if there is a more precise term.

    Thanks for having an and any assistance provided.

    Pretty much just that, I think:

    var doc = app.activeDocument;
    var frame = doc.masterSpreads[0].textFrames[0].override(doc.pages[0]);
    frame.markup(doc.xmlElements[0]);
    

    (Not tested).

    Jeff

Maybe you are looking for