Place an element from library to document

I know the name of library and name of element. How can my script place an element from library to document at any location?

You have to go through a bit of a song and dance. First, you must make sure there's no text selection active at the time, then you must move the item from wherever it lands to where you want it.
So, something like this:
app.select(null);
var myObj = theAsset.placeAsset(myDoc)[0];
and then you can move it to the right place on the page (you might even have to move it to the right page first -- although you can probably control that by setting the activePage first:
app.activeWindow.activePage = myPage;
Dave

Similar Messages

  • How can I transfer elements from an old document to a new one?

    Hi everybody,
    I'm quite new to InDesign and not really from this area, so I'm having a tough time learning how to use it. My first project is what I first thought would be simple for a start: a recipe book. So I started using different master pages for different categories - meat, fish, soups, etc. - and had my first problem when finding out it is not a good idea to have text frames in the master page, cause everytime I change something there and apply it to the others, it kind of messes up the existing pages and I get lots of duplicated frames. it got so messed up I figured the best thing would be to start a completely new document (I also found out I had the wrong margins and can use a normal A4 with bleed, and no bigger-sized page, as I'd done).
    Now I decided to start the whole thing over again, but I don't want to start from zero. So how can I:
    1) import my existing gradients?
    2) import my character styles and colors?
    3) import my texts? (I guess this is not very difficult, so I figure I can find out, but please tell me if there are any "tricks", cause I'm thinking of exporting my doc as txt and copy-pasting.)
    I'm sorry if this has already been posted in this forum or can be found in the help-section, but I swear I have looked for it and couldn't find it...
    Thanks already in advance!

    easiest are steps 1) and 2) :)
    make copy of your document, add new blank page on the end, select all pages without last - click delete icon :)
    next - delete all MasterPages
    next - redefine page size, margins, add MasterPages, etc.
    now - you can copy&paste your texts from old document :)
    robin
    www.adobescripts.com

  • How to select specific element from a XML document using JDBC?

    Hi all,
    I have a problem with selecting specific XML element in Oracle 11g release 1 from my java application. Data are stored in object-relational storage.
    My file looks like:
    <students>
    <student id="1">
    </student>
    <student id="2">
    </student>
    <student id="3">
    </student>
    </students>
    I need to select a specific <student> element. I've already tried few ways to achieve my goal but I failed.
    SELECT extract(OBJECT_VALUE,'/students/student') FROM students - works fine, but this selects all <student> elements
    SELECT extract(OBJECT_VALUE,'/students/student[1]') FROM students - which should select first <student> element works too but it causes exception when using JDBC driver returns:
    java.sql.SQLException: Only LOB or String Storage is supported in Thin XMLType
         at oracle.xdb.XMLType.processThin(XMLType.java:2817)
         at oracle.xdb.XMLType.<init>(XMLType.java:1238)
         at oracle.xdb.XMLType.createXML(XMLType.java:698)
         at oracle.xdb.XMLType.createXML(XMLType.java:676)
         at cz.zcu.hruby.data.Select.getStudent(Select.java:45)
    SELECT to_clob(extract(OBJECT_VALUE,'/students/student[1]')) FROM students - in this case I hoped that DB would convert result to CLOB but the element is quite large (definitely more than 4000 Bytes long which I find out from forum is limit). But this exception occurs:
    java.sql.SQLException: ORA-19011: Character string buffer too small
    at oracle.jdbc.driver.SQLStateMapping.newSQLException(SQLStateMapping.java:70)
         at oracle.jdbc.driver.DatabaseError.newSQLException(DatabaseError.java:133)
         at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:206)
         at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:455)
         at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:413)
         at oracle.jdbc.driver.T4C8Oall.receive(T4C8Oall.java:1034)
         at oracle.jdbc.driver.T4CPreparedStatement.doOall8(T4CPreparedStatement.java:194)
         at oracle.jdbc.driver.T4CPreparedStatement.executeForRows(T4CPreparedStatement.java:953)
         at oracle.jdbc.driver.T4CPreparedStatement.executeMaybeDescribe(T4CPreparedStatement.java:897)
         at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1186)
         at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:3387)
         at oracle.jdbc.driver.OraclePreparedStatement.executeQuery(OraclePreparedStatement.java:3431)
         at oracle.jdbc.driver.OraclePreparedStatementWrapper.executeQuery(OraclePreparedStatementWrapper.java:1491)
         at cz.zcu.hruby.data.Select.getStudent(Select.java:40)
    SELECT to_lob(extract(OBJECT_VALUE,'/students/student[1]')) FROM students - I hoped I can convert return value to a LOB value but that doesn't work for me either:
    java.sql.SQLSyntaxErrorException: ORA-00932: inconsistent datatypes: expected -, got -
    at oracle.jdbc.driver.SQLStateMapping.newSQLException(SQLStateMapping.java:91)
         at oracle.jdbc.driver.DatabaseError.newSQLException(DatabaseError.java:133)
         at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:206)
         at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:455)
         at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:413)
         at oracle.jdbc.driver.T4C8Oall.receive(T4C8Oall.java:1034)
         at oracle.jdbc.driver.T4CPreparedStatement.doOall8(T4CPreparedStatement.java:194)
         at oracle.jdbc.driver.T4CPreparedStatement.executeForDescribe(T4CPreparedStatement.java:791)
         at oracle.jdbc.driver.T4CPreparedStatement.executeMaybeDescribe(T4CPreparedStatement.java:866)
         at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1186)
         at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:3387)
         at oracle.jdbc.driver.OraclePreparedStatement.executeQuery(OraclePreparedStatement.java:3431)
         at oracle.jdbc.driver.OraclePreparedStatementWrapper.executeQuery(OraclePreparedStatementWrapper.java:1491)
         at cz.zcu.hruby.data.Select.getStudent(Select.java:40)
    This behaviour raises two questions:
    1) Why SELECT extract(OBJECT_VALUE,'/students/student') FROM students works but SELECT extract(OBJECT_VALUE,'/students/student[1]') FROM students does't ?
    2) Is there any way how I can select specific element (element XPath /students/student[@id="some value"]) and convert it to String?
    Thanks for your responses I would appreciate any suggestion
    Honza

    To be exact my <student> element is a bit complicated and looks like the one at the end of this post (sorry but it's in czech). And I need to select whole xml fragment (all opening and closing tags included) as it is shown. Maybe I used wrong solution and I should use CLOB storage. I discuss this issue here: Which solution for better perfomance?
    Thanks anyway for your response. I would be very grateful if you have any further idea
    <Student RodneCislo="8051015555">
                   <Jmeno>Petra</Jmeno>
                   <Prijmeni>Nováková</Prijmeni>
                   <RodnePrijmeni>Novotná</RodnePrijmeni>
                   <TitulPred>Bc.</TitulPred>
                   <TitulZa>MBA.</TitulZa>
                   <Adresa>
                        <Okres>3702</Okres>
                        <Obec>582786</Obec>
                        <CastObce>11908</CastObce>
                        <Ulice>Nova</Ulice>
                        <UliceCislo>4</UliceCislo>
                        <PSC>60000</PSC>
                        <Stat>203</Stat>
                   </Adresa>
                   <RodinnyStav>1</RodinnyStav>
                   <StredniSkola>000559024</StredniSkola>
                   <RokMatZkousky>2001</RokMatZkousky>
                   <PPStudent DatumVerifikace="2006-08-04">
                        <SoubeznaStudia>1</SoubeznaStudia>
                        <SoubeznaStudiaMaxDelka>2.0</SoubeznaStudiaMaxDelka>
                        <CelkovaDobaStudia>1817</CelkovaDobaStudia>
                   </PPStudent>
                   <Studia>
                        <Studium VSFakulta="14330" StudijniProgram="B1801" ZapisDoStudia="2001-07-10">
                             <DelkaStudia>5.0</DelkaStudia>
                             <NovePrijaty>N</NovePrijaty>
                             <NavazujiciStudProgram>N</NavazujiciStudProgram>
                   <PredchoziVzdelani>K</PredchoziVzdelani>
                             <PocetRocniku>5</PocetRocniku>
                             <AktualniRocnik>5</AktualniRocnik>
                             <UbytovaniVKoleji>3</UbytovaniVKoleji>
                             <UkonceniStudia Datum="2004-06-28" Zpusob="1" UdelenyTitul="Bc."/>
                             <StudiumEtapy>
                                  <StudiumEtapa PlatnostOd="2001-07-10">
                                       <ObcanstviKvalifikator>1</ObcanstviKvalifikator>
                                       <ObcanstviStat>203</ObcanstviStat>
                                       <PobytVCR>A</PobytVCR>
                                       <JazykVyuky>cze</JazykVyuky>
                                       <StudijniObory>
                                            <Obor>1801R001</Obor>
                                            <Obor>1801R005</Obor>
                                       </StudijniObory>
                                       <AprobaceOboru>
                                            <Aprobace>01</Aprobace>
                                       </AprobaceOboru>
                                       <MistoVyuky>582786</MistoVyuky>
                                       <FormaStudia>P</FormaStudia>
                                       <Financovani>1</Financovani>
                                       <PreruseniStudia>S</PreruseniStudia>
                                       <PlatnostDo>2002-04-24</PlatnostDo>
                                  </StudiumEtapa>
                                  <StudiumEtapa PlatnostOd="2002-04-24">
                                       <ObcanstviKvalifikator>1</ObcanstviKvalifikator>
                                       <ObcanstviStat>203</ObcanstviStat>
                                       <PobytVCR>A</PobytVCR>
                                       <StudijniPobyt Forma="V" Program="51" Stat="056"/>
                                       <JazykVyuky>cze</JazykVyuky>
                                       <StudijniObory>
                                            <Obor>1801R001</Obor>
                                            <Obor>1801R005</Obor>
                                       </StudijniObory>
                                       <AprobaceOboru>
                                            <Aprobace>01</Aprobace>
                                       </AprobaceOboru>
                                       <MistoVyuky>582786</MistoVyuky>
                                       <FormaStudia>P</FormaStudia>
                                       <Financovani>1</Financovani>
                                       <PreruseniStudia>S</PreruseniStudia>
                                       <PlatnostDo>2002-09-01</PlatnostDo>
                                  </StudiumEtapa>
                                  <StudiumEtapa PlatnostOd="2002-09-01">
                                       <ObcanstviKvalifikator>1</ObcanstviKvalifikator>
                                       <ObcanstviStat>203</ObcanstviStat>
                                       <PobytVCR>A</PobytVCR>
                                       <JazykVyuky>cze</JazykVyuky>
                                       <StudijniObory>
                                            <Obor>1801R001</Obor>
                                            <Obor>1801R005</Obor>
                                       </StudijniObory>
                                       <AprobaceOboru>
                                            <Aprobace>01</Aprobace>
                                       </AprobaceOboru>
                                       <MistoVyuky>582786</MistoVyuky>
                                       <FormaStudia>P</FormaStudia>
                                       <Financovani>1</Financovani>
                                       <PreruseniStudia>S</PreruseniStudia>
                                       <PlatnostDo>2004-06-28</PlatnostDo>
                                  </StudiumEtapa>
                             </StudiumEtapy>
                        </Studium>
                        <Studium VSFakulta="14330" StudijniProgram="N1802" ZapisDoStudia="2004-06-29">
                             <DelkaStudia>2.0</DelkaStudia>
                             <NovePrijaty>N</NovePrijaty>
                             <NavazujiciStudProgram>A</NavazujiciStudProgram>
                             <PredchoziVzdelani>R</PredchoziVzdelani>
                             <PocetRocniku>2</PocetRocniku>
                             <AktualniRocnik>1</AktualniRocnik>
                             <UbytovaniVKoleji>3</UbytovaniVKoleji>
                             <SocialniStipendia>
                                  <SocialniStipendium NarokOd="2006-01-01">
    <NarokDo>2006-10-30</NarokDo>
                                  </SocialniStipendium>
                             </SocialniStipendia>
                             <UkonceniStudia Datum="" Zpusob="" UdelenyTitul=""/>
                             <PPStudium DatumVerifikace="2006-07-01">
                                  <NovePrijatyVerif>N</NovePrijatyVerif>
                                  <NovePrijatyKvalif>N</NovePrijatyKvalif>
                                  <NavazujiciStudProgramVerif>A</NavazujiciStudProgramVerif>
                                  <UkonceniStudiaVerif/>
                                  <FinancovanoCR>A</FinancovanoCR>
                                  <SberId>38</SberId>
                                  <DobaStudia>
                                       <Cista>733</Cista>
                                       <VcetneNeuspechuDanehoTypu>733</VcetneNeuspechuDanehoTypu>
                                       <VcetneVsechNeuspechu>733</VcetneVsechNeuspechu>
                                  </DobaStudia>
                                  <PrestoupenoKamPosledni VSFakulta="14330" StudijniProgram="N1802" ZapisDoStudia="2004-06-29"/>
                                  <UbytovaciStipendiumKod/>
                             </PPStudium>
                             <StudiumEtapy>
                                  <StudiumEtapa PlatnostOd="2004-06-29">
                                       <ObcanstviKvalifikator>1</ObcanstviKvalifikator>
                                       <ObcanstviStat>203</ObcanstviStat>
                                       <PobytVCR>A</PobytVCR>
                                       <JazykVyuky>eng</JazykVyuky>
                                       <StudijniObory>
                                            <Obor>1801T001</Obor>
                                            <Obor>1801T025</Obor>
                                       </StudijniObory>
                                       <AprobaceOboru>
                                            <Aprobace>01</Aprobace>
                                       </AprobaceOboru>
                                       <MistoVyuky>582786</MistoVyuky>
                                       <FormaStudia>P</FormaStudia>
                                       <Financovani>1</Financovani>
                                       <PreruseniStudia>S</PreruseniStudia>
                                       <PlatnostDo/>
                                       <PPStudiumEtapa DatumVerifikace="2006-07-01">
                                            <FinancovaniVerif>1</FinancovaniVerif>
                                            <StudentRozpoctovy>O</StudentRozpoctovy>
                                            <SberId>38</SberId>
                                       </PPStudiumEtapa>
                                  </StudiumEtapa>
                             </StudiumEtapy>
                        </Studium>
                   </Studia>
              </Student>

  • How to insert Asset from library to Document?

    Hi Guys,
    I am getting crashing issue, when run the below code.
    I am getting GetAssetList() value is 0, how to get the value and insert asset to document
    InterfacePtr<IK2ServiceRegistry> registry(GetExecutionContextSession(), IID_IK2SERVICEREGISTRY);
    InterfacePtr<IK2ServiceProvider> service(registry->QueryDefaultServiceProvider(kLibraryServiceID));
    InterfacePtr<ILibraryService> libraryService(service, IID_ILIBRARYSERVICE);
    PMString styleLibFileName("bx02_left");
    InterfacePtr<ILibrary> PtrLibrary(AssetLibUtils::QueryStyleLibByName(styleLibFileName));//libraryService->QueryNthLibrary(0));
    InterfacePtr<ILibraryCmdData> libraryOpenCommandData(openlibcmd, IID_ILIBRARYCMDDATA);
    AssetIDList assetList = libraryOpenCommandData->GetAssetList();
      if(libSuite && GetExecutionContextSession()->GetActiveContext())
      ErrorCode result = libSuite->DoPlaceLibraryItems(assetList,PtrLibrary,pageItemUIDList,GetExecutionContextSession()->GetActiveContext()->GetContextView());
    Please suggest me, i am new to indesign

    dragondriver wrote:
    Hi all,
      I create a project to compile bunch of VIs as lvlib and only export some libraries as public. I wonder how can I export the public VIs into the function palette? I try [Tools] -> [Advanced] -> [Edit Palette Set], I create a new Palette but when I insert VI by selecting the lvlib, it doesn't import the exported VI. I wonder if there is any way I can import the public VI from a lvlib into the function palette. Thanks.
    After trying for hours, I finally find the solutions.

  • Missing XML Element when using asset from library

    This is not really a scripting question but I seem to be unable to find any regular ID forum and it has something to do with a scripting workflow I established for a customer.
    A script places an asset from a library onto a document and then (amongst other things) imports some XML file.
    The asset in the library consists of a number of textframes and has the structure e.g.:
    article
    box
    box
    Now the customer needs new templates (that is assets in the library) and we cannot produce them anymore. It seems that as of CS 3 5.0.4 Adobe changed the behavior of the library. Dragging e.g. two box-tagged boxes with an article parent XML into the library leads to an asset without the article element. Can someone confirm this? And more important is there a reason to it? Or is there a way to configure the behavior?
    I guess I could create a parent xml element by script after placing the element but then I would need to redo all existing libraries.
    Thank you,
    Ralf

    while( testIterator.hasNext() ) {
       Element testElement = (Element)testIterator.next();
       String code = testElement.getChildTextTrim("code");
        if( null == code ) {
               continue;
       String analysis= testElement.getChildTextTrim("analysis");
       //same for description
    }

  • VBScript - Place asset from library.

    Hi, we currently do something in AppleScript which takes and element from and indesign library (.indl) something like:
    set placedAsset to place asset asset "ElementName" of library "FF1.indl" on myDocument
    select placedAsset
    move to {LocationX, LocationY}
    Does anyone know how to do in vbscript?
    Thanks,
    Joe

    Joe:
      I'm glad you got it working, but your solution is not correct .
    The right way to solve this problem is to place the asset and move the returned page items. What you're doing is throwing away the reference to the returned pageitems and finding them anew on the assumption that they are the top pageitem on the page. Then you are selecting them -- scripts should never touch the selection if they can at all avoid it! Then you are moving them, but your move should not be dependent on the selection at all, so the selection is entirely unnecessary! And as you've noted, this only works if the library asset is grouped. Which is not considered best-practice (though sometimes it can be helpful, sometimes not).
    (Maybe you have another reason for leaving the placed asset selected after you run the script, so the user can interact with it? If so, OK, but only to that small segment.).
    I'm still not a VBScript programmer, but let's run through this. Remember what I said before:
    Asset.placeAsset() returns an array of placed items. So loop over the array and move each page item to its desired location.
    So:
    Dim jLib = myInDesign.Libraries.Item("FF1.indl")   
    Dim jAsset = jLib.assets.item("Daily_News")
    So far so good. But next you should have an array of pageitems returned.
    Dim myPlacedAssets() = jAsset.placeAsset(myDocument)
    then you should loop over them and move them. Or if you like, group them, move them, and ungroup them:
    Dim myGroup = myDocument.Groups.Add(myPlacedAssets)
    myGroup.Move(XY)
    myGroup.Ungroup()
    That probably won't work as written because I'm not a VB person, but that's the correct way to handle this consistent with the InDesign Document Object Model. I suppose it's possible that it won't work in VB because of strict typing issues, but I'm sure there's a way to do it properly....

  • Cannot open document from library or mapped drive.

    When attempting to open a document from a SharePoint library the document hangs cannot open. If I open the library in explorer view I see the file but when trying to open it also hangs.   When I try to download a copy I do get a correlation id
    which I can find in the logs.  
    Current SharePoint 2013 version: 15.0.4571.1502
    Current SQL server: 11.0.5058
    Log output:
    Name=Request (GET:http://dmdbsp:80/it/DB/_layouts/15/download.aspx?SourceUrl=%2Fit%2FDB%2FPublic%20Documents%2FHosting%20Services%2FSQL%20Server%202005%20Installation%2Edocx&FldUrl=&Source=http%3A%2F%2Fdmdbsp%2Fit%2FDB%2FPublic%2520Documents%2FForms%2FAllItems%2Easpx%3FRootFolder%3D%252Fit%252FDB%252FPublic%2520Documents%252FHosting%2520Services%26FolderCTID%3D0x012000EA6B71785500594EBB4FF7FBDCB0BF3E%26View%3D%257BA53719D8%252D0DAB%252D443D%252D9201%252DC147F6DC1DAF%257D%26InitialTabId%3DRibbon%252ERead%26VisibilityContext%3DWSSTabPersistence)
    Non-OAuth request. IsAuthenticated=True, UserIdentityName=0#.w|ccc_nt\xxxxx, ClaimsCount=83
    Site=/
    SPShareByLinkHandler.Initialize : Not a ShareByLink request - missing access token
    Download.OnLoad : This is not a ShareByLink request. Ensure user is authenticated and download the file.
    UserAgent not available, file operations may not be optimized.
        at Microsoft.SharePoint.SPFileStreamManager.CreateCobaltStreamContainer(SPFileStreamStore spfs, ILockBytes ilb, Boolean copyOnFirstWrite, Boolean disposeIlb)
        at Microsoft.SharePoint.SPFileStreamManager.SetInputLockBytes(SPFileInfo& fileInfo, SqlSession session, PrefetchResult prefetchResult)
        at Microsoft.SharePoint.CoordinatedStreamBuffer.SPCoordinatedStreamBufferFactory.CreateFromDocumentRowset(Guid databaseId, SqlSession session, SPFileStreamManager spfstm, Object[] metadataRow, SPRowset contentRowset, SPDocumentBindRequest&
    dbreq, SPDocumentBindResults& dbres)
        at Microsoft.SharePoint.SPSqlClient.GetDocumentContentRow(Int32 rowOrd, Object ospFileStmMgr, SPDocumentBindRequest& dbreq, SPDocumentBindResults& dbres)
        at Microsoft.SharePoint.Library.SPRequestInternalClass.GetFileAsStream(String bstrUrl, String bstrWebRelativeUrl, Boolean bHonorLevel, Byte iLevel, OpenBinaryFlags grfob, String bstrEtagNotMatch, Object punkSPFileMgr, Boolean bHonorCustomIrm,
    IrmProtectionParams fileIrmSettings, UInt32& pdwVirusCheckStatus, String& pVirusCheckMessage, String& pEtagNew, String& pContentTagNew, SPFileInfo& pFileProps)
        at Microsoft.SharePoint.Library.SPRequestInternalClass.GetFileAsStream(String bstrUrl, String bstrWebRelativeUrl, Boolean bHonorLevel, Byte iLevel, OpenBinaryFlags grfob, String bstrEtagNotMatch, Object punkSPFileMgr, Boolean bHonorCustomIrm,
    IrmProtectionParams fileIrmSettings, UInt32& pdwVirusCheckStatus, String& pVirusCheckMessage, String& pEtagNew, String& pContentTagNew, SPFileInfo& pFileProps)
        at Microsoft.SharePoint.Library.SPRequest.GetFileAsStream(String bstrUrl, String bstrWebRelativeUrl, Boolean bHonorLevel, Byte iLevel, OpenBinaryFlags grfob, String bstrEtagNotMatch, Object punkSPFileMgr, Boolean bHonorCustomIrm, IrmProtectionParams
    fileIrmSettings, UInt32& pdwVirusCheckStatus, String& pVirusCheckMessage, String& pEtagNew, String& pContentTagNew, SPFileInfo& pFileProps)
        at Microsoft.SharePoint.SPFile.GetFileStream(SPWeb web, String fileUrl, Boolean honorLevel, SPFileLevel level, OpenBinaryFlags openOptions, String etagNotMatch, SPFileStreamManager spMgr, SPFileRightsManagementSettings rightsManagementSettings,
    Boolean throwOnVirusFound, SPVirusCheckStatus& virusCheckStatus, String& virusCheckMessage, String& etagNew, String& contentTagNew, SPFileInfo& fileprops)
        at Microsoft.SharePoint.SPFile.GetFileStream(OpenBinaryFlags openOptions, String etagNotMatch, String& etagNew, String& contentTagNew)
        at Microsoft.SharePoint.SPFile.OpenBinaryStream(SPOpenBinaryOptions openOptions, String etagNotMatch, String& etagNew)
        at Microsoft.SharePoint.ApplicationPages.Download.WriteFileInternal(String sourceUrl, SPFile file)
        at Microsoft.SharePoint.ApplicationPages.Download.OnLoad(EventArgs e)
        at System.Web.UI.Control.LoadRecursive()
        at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
        at System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
        at System.Web.UI.Page.ProcessRequest()
        at System.Web.UI.Page.ProcessRequest(HttpContext context)
        at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
        at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)
        at System.Web.HttpApplication.PipelineStepManager.ResumeSteps(Exception error)
        at System.Web.HttpApplication.BeginProcessRequestNotification(HttpContext context, AsyncCallback cb)
        at System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest wr, HttpContext context)
        at System.Web.Hosting.PipelineRuntime.ProcessRequestNotificationHelper(IntPtr rootedObjectsPointer, IntPtr nativeRequestContext, IntPtr moduleData, Int32 flags)
        at System.Web.Hosting.PipelineRuntime.ProcessRequestNotification(IntPtr rootedObjectsPointer, IntPtr nativeRequestContext, IntPtr moduleData, Int32 flags)
        at System.Web.Hosting.UnsafeIISMethods.MgdIndicateCompletion(IntPtr pHandler, RequestNotificationStatus& notificationStatus)
        at System.Web.Hosting.UnsafeIISMethods.MgdIndicateCompletion(IntPtr pHandler, RequestNotificationStatus& notificationStatus)
        at System.Web.Hosting.PipelineRuntime.ProcessRequestNotificationHelper(IntPtr rootedObjectsPointer, IntPtr nativeRequestContext, IntPtr moduleData, Int32 flags)
        at System.Web.Hosting.PipelineRuntime.ProcessRequestNotification(IntPtr rootedObjectsPointer, IntPtr nativeRequestContext, IntPtr moduleData, Int32 flags)
    Spent 0 ms to bind 7106053 byte file stream
    UserAgent not available, file operations may not be optimized.
        at Microsoft.SharePoint.SPFileStreamManager.CreateCobaltStreamContainer(SPFileStreamStore spfs, ILockBytes ilb, Boolean copyOnFirstWrite, Boolean disposeIlb)
        at Microsoft.SharePoint.SPFileStreamManager.SetInputLockBytes(SPFileInfo& fileInfo, SqlSession session, PrefetchResult prefetchResult)
        at Microsoft.SharePoint.CoordinatedStreamBuffer.SPCoordinatedStreamBufferFactory.CreateFromDocumentRowset(Guid databaseId, SqlSession session, SPFileStreamManager spfstm, Object[] metadataRow, SPRowset contentRowset, SPDocumentBindRequest&
    dbreq, SPDocumentBindResults& dbres)
        at Microsoft.SharePoint.SPSqlClient.GetDocumentContentRow(Int32 rowOrd, Object ospFileStmMgr, SPDocumentBindRequest& dbreq, SPDocumentBindResults& dbres)
        at Microsoft.SharePoint.Library.SPRequestInternalClass.GetFileAsStream(String bstrUrl, String bstrWebRelativeUrl, Boolean bHonorLevel, Byte iLevel, OpenBinaryFlags grfob, String bstrEtagNotMatch, Object punkSPFileMgr, Boolean bHonorCustomIrm,
    IrmProtectionParams fileIrmSettings, UInt32& pdwVirusCheckStatus, String& pVirusCheckMessage, String& pEtagNew, String& pContentTagNew, SPFileInfo& pFileProps)
        at Microsoft.SharePoint.Library.SPRequestInternalClass.GetFileAsStream(String bstrUrl, String bstrWebRelativeUrl, Boolean bHonorLevel, Byte iLevel, OpenBinaryFlags grfob, String bstrEtagNotMatch, Object punkSPFileMgr, Boolean bHonorCustomIrm,
    IrmProtectionParams fileIrmSettings, UInt32& pdwVirusCheckStatus, String& pVirusCheckMessage, String& pEtagNew, String& pContentTagNew, SPFileInfo& pFileProps)
        at Microsoft.SharePoint.Library.SPRequest.GetFileAsStream(String bstrUrl, String bstrWebRelativeUrl, Boolean bHonorLevel, Byte iLevel, OpenBinaryFlags grfob, String bstrEtagNotMatch, Object punkSPFileMgr, Boolean bHonorCustomIrm, IrmProtectionParams
    fileIrmSettings, UInt32& pdwVirusCheckStatus, String& pVirusCheckMessage, String& pEtagNew, String& pContentTagNew, SPFileInfo& pFileProps)
        at Microsoft.SharePoint.SPFile.GetFileStream(SPWeb web, String fileUrl, Boolean honorLevel, SPFileLevel level, OpenBinaryFlags openOptions, String etagNotMatch, SPFileStreamManager spMgr, SPFileRightsManagementSettings rightsManagementSettings,
    Boolean throwOnVirusFound, SPVirusCheckStatus& virusCheckStatus, String& virusCheckMessage, String& etagNew, String& contentTagNew, SPFileInfo& fileprops)
        at Microsoft.SharePoint.SPFile.GetFileStream(OpenBinaryFlags openOptions, String etagNotMatch, String& etagNew, String& contentTagNew)
        at Microsoft.SharePoint.SPFile.OpenBinaryStream(SPOpenBinaryOptions openOptions, String etagNotMatch, String& etagNew)
        at Microsoft.SharePoint.ApplicationPages.Download.WriteFileInternal(String sourceUrl, SPFile file)
        at Microsoft.SharePoint.ApplicationPages.Download.OnLoad(EventArgs e)
        at System.Web.UI.Control.LoadRecursive()
        at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
        at System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
        at System.Web.UI.Page.ProcessRequest()
        at System.Web.UI.Page.ProcessRequest(HttpContext context)
        at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
        at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)
        at System.Web.HttpApplication.PipelineStepManager.ResumeSteps(Exception error)
        at System.Web.HttpApplication.BeginProcessRequestNotification(HttpContext context, AsyncCallback cb)
        at System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest wr, HttpContext context)
        at System.Web.Hosting.PipelineRuntime.ProcessRequestNotificationHelper(IntPtr rootedObjectsPointer, IntPtr nativeRequestContext, IntPtr moduleData, Int32 flags)
        at System.Web.Hosting.PipelineRuntime.ProcessRequestNotification(IntPtr rootedObjectsPointer, IntPtr nativeRequestContext, IntPtr moduleData, Int32 flags)
        at System.Web.Hosting.UnsafeIISMethods.MgdIndicateCompletion(IntPtr pHandler, RequestNotificationStatus& notificationStatus)
        at System.Web.Hosting.UnsafeIISMethods.MgdIndicateCompletion(IntPtr pHandler, RequestNotificationStatus& notificationStatus)
        at System.Web.Hosting.PipelineRuntime.ProcessRequestNotificationHelper(IntPtr rootedObjectsPointer, IntPtr nativeRequestContext, IntPtr moduleData, Int32 flags)
        at System.Web.Hosting.PipelineRuntime.ProcessRequestNotification(IntPtr rootedObjectsPointer, IntPtr nativeRequestContext, IntPtr moduleData, Int32 flags)

    Hi,
    Based on the error message, I recommend to verify the things below:
    1.  Check the permission of your account on the documents and the library.
    2.  Check if the library has set the Information Rights Management(IRM).
    Please go to the library settings > Information Rights Management under Permissions for Management.
    https://support.office.microsoft.com/en-us/article/Apply-Information-Rights-Management-to-a-list-or-library-3bdb5c4e-94fc-4741-b02f-4e7cc3c54aa1?CorrelationId=77e3484e-beb9-4d73-9e06-90bea5206f0d&ui=en-US&rs=en-US&ad=US
    3.  Does this issue occur with all the libraries and documents in the site? Please add your account as site collection administrator and then check the results.
    Thanks,
    Victoria
    Forum Support
    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact
    [email protected]
    Victoria Xia
    TechNet Community Support

  • How to extract elements from a document

    I'm new to Java and I'm using JDOM in a JSP page. I've a document like this:
    <OFFERTA>
    <FACOLTA idFacolta="F1">
    <CORSO value="xxx"/>
    <CORSO value="yyy"/>
    </FACOLTA>
    <FACOLTA idFacolta="F2">
    <CORSO value="zzz"/>
    </FACOLTA>
    <FACOLTA idFacolta="F3">
    </FACOLTA>
    <FACOLTA idFacolta="F4">
    </FACOLTA>
    </OFFERTA>
    I'd like to get a document with the same structure but with the only FACOLTA elements that match a requested value for the idFacolta attribute.
    For example, if the requested idFacolta is "F2", I'd like to get:
    <OFFERTA>
    <FACOLTA idFacolta="F2">
    <CORSO value="zzz"/>
    </FACOLTA>
    </OFFERTA>
    I check in a loop if the element matches the idFacolta requested but when I find and try to delete it I get:
    java.util.ConcurrentModificationException
         at org.jdom.ContentList$FilterListIterator.checkConcurrentModification(ContentList.java:1230)
         at org.jdom.ContentList$FilterListIterator.hasNext(ContentList.java:942)
    Here's my code:
    Document doc = builder.build(file);
    Element root = doc.getRootElement();
    List children = root.getChildren();
    Iterator facoltaIterator = children.iterator();
    // Check if there's a request
    if (id!=null) {
         while (facoltaIterator.hasNext()) {
              Element facolta = (Element) facoltaIterator.next();
              if (!facolta.getAttribute("idFacolta").getValue().equalsIgnoreCase(id)) {
                   // Delete
                   root.removeContent(facolta);
    All seems to be right, except the line
    root.removeContent(facolta);
    So, I tried to make a new document for the results, adding the element facolta:
    Document doc = builder.build(file);
    Element root = doc.getRootElement();
    // Create a new document with the same root
    Element rootRisultati = new Element("OFFERTA");
    Document docRisultati = new Document(rootRisultati);
    List children = root.getChildren();
    Iterator facoltaIterator = children.iterator();
    if (id!=null) {
         while (facoltaIterator.hasNext()) {
              Element facolta = (Element) facoltaIterator.next();
              if (facolta.getAttribute("idFacolta").getValue().equalsIgnoreCase(id)) {
                   // Add the element to the new document
                   rootRisultati.addContent(facolta);
    but this causes a different exception:
    org.jdom.IllegalAddException: The element already has an existing parent "OFFERTA"
         at org.jdom.ContentList.add(ContentList.java:190)
         at org.jdom.ContentList.add(ContentList.java:146)
         at java.util.AbstractList.add(AbstractList.java:84)
         at org.jdom.Element.addContent(Element.java:1062)
    I'm not able to find a solution.
    There's a commonly used procedure to select elements maintaing the structure of the document?
    Can anyone help please? Thanks in advance.
    Stefano

    maybe you could try posting this in a JDOM forum? JDOM is not a standard XML tool from Sun / for Java... therefore out of the scope of this forum!

  • I have just added an album to my iTunes from a CD. But the tracks are now displayed in 2 places in my iTunes library. How do I consolidate them into a single album?

    I have just added an album to my iTunes from a CD. But the tracks are now displayed in 2 places in my iTunes library -- as if I had downloaded 2 seperate albums. How do I consolidate them into a single album in my iTunes?

    Did you use the same method to add each of the six albums to your library?  With some of iTunes configuration options, some imports (CDs, Store purchase, use of the Automatically add to iTunes folder) will go into the standard media folder location, but the other methods to add media files already on your PC (Add File to Library..., Add Folder to Library..., drag and drop) will leave the files in their original spot.
    The other factor that may influence where iTunes locates media files is the setting of the "part of a compilation" flag in the media metadata.  When this flag is set iTunes (when configured to organize your media and copy all additions to the media folders) will place files in iTunes Media\Music\Compilations\album_title rather than iTunes Media\Music\artist_name\album_title.

  • Question on Document Download from Library: wopi.ashx vs download.aspx

    I just got curious with this behavior, hence thought of posting this here. I was monitoring RequestUsage table to check the entries SharePoint makes when a user downloads a document. I downloaded two documents from Library. One document was downloaded using
    the ribbon "Download a copy" option. Another document was downloaded using ECB menu.
    When I observed in RequestUsage table, DocumentPath column was "/_layouts/15/download.aspx" and QueryString column was pointing to the document URL. This was smilar for both documents.
    When the similar download activity was done from "other machine", DocumentPath column was "/_vti_bin/wopi.ashx/files/ec1a5b7d6e92497aaaf69ac3044c6912" and QueryString column was "?access_token=[lengthy characters]".
    Both machines were using Windows 7 and this test were done from Chrome browser. My question is, why this difference in the way document gets downloaded? Basically what differentiates to call download.aspx or wopi.ashx? Any pointers please?

    Hi Suresh,
    When you click Download a Copy, it will redirect you to
    http://site/_layouts/download.aspx?SourceUrl=urlofdocumentinlibrary If you are using IE browser, please download a document, then go to IE settings icon, and view downloads, right click the documents and copy download link. Then paste in a notebook, 
    you will find the link is in type of the link above.
    As for the "/_vti_bin/wopi.ashx/files”, it is related to Office Web App. We access document via Office Web App, and it will use the url like that. The access token is a token passed between SharePoint and the Office Web Apps servers.
    For reference:
    http://blogs.technet.com/b/speschka/archive/2012/07/23/configuring-office-web-apps-in-sharepoint-2013.aspx?pi47623=2
    http://blogs.msdn.com/b/fabdulwahab/archive/2013/10/30/office-web-apps-with-sharepoint-2013-issues.aspx
    http://blogs.msdn.com/b/officedevdocs/archive/2013/03/20/introducing-wopi.aspx
    http://blogs.technet.com/b/speschka/archive/2012/07/23/configuring-office-web-apps-in-sharepoint-2013.aspx
    Regards,
    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact
    [email protected] .
    Rebecca Tu
    TechNet Community Support

  • If I'm copying text and/or vector elements from Indesign to Photoshop how come their pixel sizes change even though I opened the same sized document and my indesign file is a web file?

    If I'm copying text and/or vector elements from Indesign to Photoshop how come their pixel sizes change even though I opened the same sized document and my indesign file is a web file?

    >my indesign file is a web file
    Pardon?
    Or do you mean that, when you created a new document, you choose Web as intent maybe?

  • How top Open a Excel Document from share point document library using jquery

    How top Open a Excel Document  from share point document library using jquery

    Hi,
    According to your post, my understanding is that you want to open excel file via JQuery.
    To open excel file, we can use the following code.
    <script type="text/javascript">
    function openExcel(strFilePath) {
    var yourSite = "http://www.yoursite.com";
    openExcelDocPath(yourSite + strFilePath, false);
    function openExcelDocPath(strLocation, boolReadOnly) {
    var objExcel;
    objExcel = new ActiveXObject("Excel.Application");
    objExcel.Visible = true;
    objExcel.Workbooks.Open(strLocation, false, boolReadOnly);
    </script>
    For more reference:
    http://www.kavoir.com/2009/01/using-javascript-to-open-excel-and-word-files-in-html.html
    http://www.dotnetspider.com/resources/43453-Open-Word-Excel-files-using-Javascript.aspx
    Thanks & Regards,
    Jason
    Jason Guo
    TechNet Community Support

  • Populate WBS Elements from GR/IR to FI document

    Would like to know how to populate WBS element from Material Document - MIGO (PO document with account assignment = 'P') to FI document?
    Message was edited by:
            Peck Har Poh
    Message was edited by:
            Peck Har Poh
    Edited by: Peck Har Poh on Nov 19, 2009 6:28 AM

    hi
    if ur problem is to find the document number only, then go to tcode me23n and give ur PO number and click on PO history tab on item details.
    hope it works.award if useful.

  • Download files from Shared Point document library using SSIS packages

    Dear All,
            Can you please help me on how can I download excel/CSV files from share point document library to local machine using SSIS packages.
    Regads,
    Praveen C
    Regards, Praveen

    Hi Praveen,
    You can also implement
    custom component or try third party custom component such as SharePoint List Adapters:
    https://sqlsrvintegrationsrv.codeplex.com/releases/view/17652
    Regards,
    Mike Yin
    TechNet Community Support

  • While editing the document template from library settings

    
    I am facing this warning while editing the document template from library settings. Actually i have changed the password 2 days before. I need solution to clear this 

    Hello
    Please check this
    http://support.microsoft.com/kb/286282/en-us
    Open the Office template in the original Office program where it was created.
    On the File menu, click Save As.
    In the Save as Type list, click Word Document (*.doc) if you are in Microsoft Word, Microsoft Excel Workbook (*.xls)if you are in Microsoft Excel,
    or Presentation (*.ppt) if you are in Microsoft PowerPoint.
    Give the file a name, and then save it in the Web that contains the Document Library.
    Click Save.
    Browse to your Document Library, and then click Modify columns and settings.
    Click Change general settings.
    In the Template URL edit box, type the full path and file name to the file that you saved in step 4.
    Please remember to click 'Mark as Answer' on the answer if it helps you

Maybe you are looking for

  • Error in XI Configuration

    I am not able to perform Role Assignment step in J2EE Visual Administrator. I am following XI installation Guide pdf. This error comes while performing the following step. Assign Application Roles to User Groups 1. Start the J2EE Engine Visual Admini

  • Using dual display with DVD Player

    I like to use the dual screen mode in my lectures using Keynote. Occasionally, I like to include a short DVD in my lectures. Is there a way to set DVD Player so that it plays in the dual screen mode so that I don't have to switch to the mirror screen

  • Java iview htmlb & jco question

    hello all, I am writing an Java iView to pull some data from an R/3 table & displaying that as a LINE chart. I've already got the portion of getting data from R/3 by creating a shim function that returns the table. Now i want to display that using ht

  • Lost mozilla symbol on startup.Can'tgo to website. HELP

    the symbol on the startup,that you click to go to the website is suddenly gone and I can't figure out how to get the symbol back.Thanks for any help

  • Different price at PO from contract according to date

    Hello everyone, I am trying to find a solution for contract that there where changes at the prices. The desirable outcome is that the price that will appear at the PO will be determined based on the item "Required on" field. Is there a way to do it?