How to copy-paste frames from one document to other with there respective layers intact?
Hi All,
I am facing an issue while copy paste frames from one document to other. I have a 3 frames in first documents each one on different layer. First document has 3 layers. The second document too have 3 layers , I am copying frames from first document to scrapdata using 'ICopyCmdData ' and 'kCopyCmdBoss'. I have 'Paste Remembers Layers' menu 'Checked' on Layer panel. I am using following function to copy frames to scrapdata.
bool16 copyStencilsFromTheTemplateDocumentIntoScrapData(PMString & templateFilePath)
bool16 result = kFalse;
do
SDKLayoutHelper sdklhelp;
PMString filePathItemsToBeCopiedFrom(templateFilePath); //("c:\\test\\aa.indt");
IDFile templateIDFile(filePathItemsToBeCopiedFrom);
UIDRef templateDocUIDRef = sdklhelp.OpenDocument(templateIDFile);
if(templateDocUIDRef == UIDRef ::gNull)
break;
ErrorCode err = sdklhelp.OpenLayoutWindow(templateDocUIDRef);
if(err == kFailure)
break;
InterfacePtr<IDocument> templatedoc(templateDocUIDRef,UseDefaultIID());
if(templatedoc == nil)
break;
InterfacePtr<ISpreadList>templateSpreadUIDList(templatedoc,UseDefaultIID());
if(templateSpreadUIDList == nil)
break;
IDataBase * templateDocDatabase = templateDocUIDRef.GetDataBase();
if(templateDocDatabase == nil)
break;
UIDRef templateDocFirstSpreadUIDRef(templateDocDatabase, templateSpreadUIDList->GetNthSpreadUID(0));
InterfacePtr<ISpread> templateSpread(templateDocFirstSpreadUIDRef, IID_ISPREAD);
if(templateSpread == nil)
break;
UIDList templateFrameUIDList(templateDocDatabase);
if(templateSpread->GetNthPageUID(0)== kInvalidUID)
break;
templateSpread->GetItemsOnPage(0,&templateFrameUIDList,kFalse,kTrue);
InterfacePtr<ICommand> copyStencilsCMD(CmdUtils::CreateCommand(kCopyCmdBoss));
if(copyStencilsCMD == nil)
break;
InterfacePtr<ICopyCmdData> cmdData(copyStencilsCMD, IID_ICOPYCMDDATA);
if(cmdData == nil)
break;
// Copy cmd will own this list
UIDList* listCopy = new UIDList(templateFrameUIDList);
InterfacePtr<IClipboardController> clipboardController(gSession,UseDefaultIID());
if(clipboardController == nil)
break;
ErrorCode status = clipboardController->PrepareForCopy();
if(status == kFailure)
break;
InterfacePtr<IDataExchangeHandler> scrapHandler(clipboardController->QueryHandler(kPageItemFlavor));
if(scrapHandler == nil)
break;
clipboardController->SetActiveScrapHandler(scrapHandler);
InterfacePtr<IPageItemScrapData> scrapData(scrapHandler, UseDefaultIID());
if(scrapData== nil)
break;
UIDRef parent = scrapData->GetRootNode();
cmdData->Set(copyStencilsCMD, listCopy, parent, scrapHandler);
if(templateFrameUIDList.Length() == 0)
return kFalse;
else
status = CmdUtils::ProcessCommand(copyStencilsCMD);
if(status != kFailure)
result = kTrue;
sdklhelp.CloseDocument(templateDocUIDRef,kFalse,K2::kSuppressUI, kFalse);
}while(kFalse);
return result;
After this I need to close first document. Now I am opening the second document from indt file which has same number of layers as first document. I am trying to paste frames from scrap data to second document using '' 'ICopyCmdData ' and 'kPasteCmdBoss' as shown in follwoing function
bool16 pasteTheItemsFromScrapDataOntoOpenDocument(UIDRef &documentDocUIDRef )
bool16 result = kFalse;
do
InterfacePtr<IClipboardController> clipboardController(gSession,UseDefaultIID());
if(clipboardController == nil)
break;
InterfacePtr<IDataExchangeHandler> scrapHandler(clipboardController->QueryHandler(kPageItemFlavor));
if(scrapHandler == nil)
break;
InterfacePtr<IPageItemScrapData> scrapData(scrapHandler, UseDefaultIID());
if(scrapData == nil)
break;
//This will give the list of items present on the scrap
UIDList* scrapContents = scrapData->CreateUIDList();
if (scrapContents->Length() >= 1)
InterfacePtr<IDocument> dataToBeSprayedDocument(documentDocUIDRef,UseDefaultIID());
if(dataToBeSprayedDocument == nil)
break;
InterfacePtr<ISpreadList>dataToBeSprayedDocumentSpreadList(dataToBeSprayedDocument,UseDef aultIID());
if(dataToBeSprayedDocumentSpreadList == nil)
break;
IDataBase * dataToBeSprayedDocDatabase = documentDocUIDRef.GetDataBase();
if(dataToBeSprayedDocDatabase == nil)
break;
UIDRef spreadUIDRef(dataToBeSprayedDocDatabase, dataToBeSprayedDocumentSpreadList->GetNthSpreadUID(0));
SDKLayoutHelper sdklhelp;
UIDRef parentLayerUIDRef = sdklhelp.GetSpreadLayerRef(spreadUIDRef);
InterfacePtr<IPageItemScrapData> localScrapData(scrapHandler, UseDefaultIID());
if(localScrapData == nil)
break;
if(parentLayerUIDRef.GetUID() == kInvalidUID)
break;
InterfacePtr<ICommand> pasteToClipBoardCMD (CmdUtils::CreateCommand(kPasteCmdBoss));
if(pasteToClipBoardCMD == nil)
break;
InterfacePtr<ICopyCmdData> cmdData(pasteToClipBoardCMD, UseDefaultIID());
if(cmdData == nil)
break;
if(scrapContents == nil)
break;
PMPoint offset(0.0, 0.0);
cmdData->SetOffset(offset);
cmdData->Set(pasteToClipBoardCMD, scrapContents, parentLayerUIDRef );
ErrorCode status = CmdUtils::ProcessCommand(pasteToClipBoardCMD);
if(status == kSuccess)
CA("result = kTrue");
result = kTrue;
}//end if (scrapContents->Length() >= 1)
}while(kFalse);
return result;
Here in above function its required to set Parent Layer UIDRef and because of this all frames are getting paste in one layer.
Is there any way we can paste frame in there respective layers?
Also I need to work this code with CS4 server and desktop indesign.
Thanks in advance,
Rahul Dalvi
Try,
// dstDoc must be FrontDocument
InterfacePtr<ILayoutControlData> layoutData(Utils<ILayoutUIUtils>()->QueryFrontLayoutData());
InterfacePtr<ICommand> createMasterFromMasterCmd(CmdUtils::CreateCommand(kCreateMasterFromMasterCmdBoss));
createMasterFromMasterCmd->SetItemList(UIDList(srcMasterSpreadUIDRef));
InterfacePtr<ILayoutCmdData> layoutCmdData(createMasterFromMasterCmd, UseDefaultIID());
layoutCmdData->Set(::GetUIDRef(layoutData->GetDocument()), layoutData);
CmdUtils::ProcessCommand(createMasterFromMasterCmd);
Similar Messages
-
How to copy master spread from one document to other
I've used kNewMasterSpreadCmdBoss command and IMasterSpreadCmdData interface but it copies master spread with empty master page.
Should I setup some additional parameters for command? Or should I use different mechanism?Try,
// dstDoc must be FrontDocument
InterfacePtr<ILayoutControlData> layoutData(Utils<ILayoutUIUtils>()->QueryFrontLayoutData());
InterfacePtr<ICommand> createMasterFromMasterCmd(CmdUtils::CreateCommand(kCreateMasterFromMasterCmdBoss));
createMasterFromMasterCmd->SetItemList(UIDList(srcMasterSpreadUIDRef));
InterfacePtr<ILayoutCmdData> layoutCmdData(createMasterFromMasterCmd, UseDefaultIID());
layoutCmdData->Set(::GetUIDRef(layoutData->GetDocument()), layoutData);
CmdUtils::ProcessCommand(createMasterFromMasterCmd); -
How to copy a folder from one document library to another document library ?
How to copy a folder from one document library to another document library by programmtically?
Samarendra Swain
Team Sharepoint
www.manuhsolutions.comYou can use the SPFolder.CopyTo method.
public static void CopyFolder()
SPFolder folder = null;
using (SPSite site = new SPSite("http://basesmcdev2/sites/tester1"))
using (SPWeb web = site.OpenWeb())
folder = web.GetFolder("shared%20documents/newfolder");
folder.CopyTo("tester4/newfolder");
http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.spfolder.copyto.aspx
certdev.com -
How to best take sections from one document to merge with another Indesign document
I am looking for most efficient way to take a section from one document to merge with a section from another document? We have a book that needs updating, taking a section from one document to merge into another. We have typically copied and paste each page, but there are 20+ pages involved. Does anyone have a better way?
Open both documents.
With source document active, In pages panel, select pages that are to be copied to the destination document
Right Click (or use panel menu) and select Move Pages ...
Double check that correct page range is noted
Select destination document
select where in document pages should appear (beginning, end, after or before page X) -
How to copy a plugin from one application to another, is there an export possibility?
I am using Apex 4.2.2 with 10g and OHS.
There is a Gantt chart plugin in the Sample Calendar packaged application. I couldn't find that plugin for download.
When I open it (Application Builder>Application 76373>Shared Components>Plug-ins>Create / Edit)
it states:
*Name (Value Required) Gantt Chart
*Internal Name (Value Required) COM.ORACLE.APEX.GANTT_CHART
Reference Master Plug-in From: 65708911358321918
It refreshes without an error when I press the 'Refresh Plugin' button.
I can copy the SQL code, can dowload the .css file, etc., but I guess it is not enough.
The Information section brings me the http://apex.oracle.com/plugins page, but there is no Gannt plugin.
Is there any possibility to use this plugin in the same workspace in another application?
Or sharing it? Or export and then import it?
Thanks in advance.Hi,
In Application Builder -> Application XXXX -> Shared Components -> Plug-ins, click on plug-in name which will take you to plug-in details page. Here, on right hand side, you should see "Export Plug-in" under "Tasks". Click this link and follow the wizard.
Regards,
Hari -
How to copy the variants from one user to other user?
Hi all,
I have a list of variants(nearly 10 variants) for a report named 'ZONEORDER'. I need to copy all the variants to another user. Is it possible?
If so, could anyone suggest the solution?
Thanks in advance.
Regards,
Vijay.Hello Vijay,
I need to copy all the variants to another user.
What does " copy to another user" mean?
You can attach the variant to a Transport through prog. RSTRANSP and move to subsequent systems.
BR,
Suhas -
I gave my 2yr old my 16gb ipad 2 when I upgraded to a 64gb ipad 3. They are on the same account so that I can share certain apps between them, but because they consider themselves one in the same I can't use airplay or face chat with my daughters ipad. How do I do these things?
Airplay doesn't work between two iPads so you don't need to worry about that, however, you can change the name of an iPad in Settings > General > About > Name.
-
How to copy a node from one dom document to another?
I have one dom document that I have to split up into multiple dom documents. I am able to get the inividual nodes that I want to put into seperate documents.
My problem occurs when I create a new dom document and try to add the node from the parent document. I get an exception saying (copied from api: WRONG_DOCUMENT_ERR: Raised if newChild was created from a different document than the one that created this node. )
How can I make it so that I can copy a node from one document and add it to another.Have you checked out the API called importNode in the DOM Document. It lets you move nodes between different documents.
This api lets you simply copy the existing node from one document into another. without creating any new nodes for it.
I have done a small example please have a look.
Book.xml
<?xml version="1.0"?>
<books>
<book>
<name>Inside Corba</name>
</book>
<book>
<name>Inside RMI</name>
</book>
</books>------------------------
Book2.xml
<?xml version="1.0"?>
<books>
<book>
<name>Core Java </name>
</book>
<book>
<name>Core JINI</name>
</book>
</books>-------------------
MoveNode.java (copies nodes from doc2 into doc1)
import java.io.*;
import javax.xml.parsers.*;
// structures
import org.w3c.dom.*;
import org.xml.sax.*;
public class MoveNode
public static void main(String[] args)
// step1. create a factory and configure it
DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
// step2. set various configurations
factory.setValidating(false); // do not need validation at this time.
factory.setIgnoringComments(false); // do not ignore comments
factory.setIgnoringElementContentWhitespace(false); // do not ignore element content whitespace.
factory.setCoalescing(false);
factory.setExpandEntityReferences(true);
// step 3 create a document builder
DocumentBuilder builder = null;
try
builder = factory.newDocumentBuilder();
catch(ParserConfigurationException e)
e.printStackTrace();
try
Document doc1 = builder.parse(new File("book.xml"));
Document doc2 = builder.parse(new File("book2.xml"));
if (doc1 == null || doc2 == null)
System.out.println("doc1 is null or doc2 is null");
System.exit(1);
} // if
// fetch books from doc2
NodeList list = doc2.getElementsByTagName("book");
System.out.println("number of books found " + list.getLength());
Node node1 = list.item(0);
Node node2 = list.item(1);
// get the root node of doc1
Node root = (Node) doc1.getDocumentElement();
root.appendChild(doc1.importNode(node1, false));
root.appendChild(doc1.importNode(node2, false));
//now doc1 should have 4 nodes
System.out.println(doc1.getElementsByTagName("book").getLength());
} // try
catch(SAXException se)
se.printStackTrace();
catch(IOException ie)
ie.printStackTrace();
hope this helps.
regards,
Abhishek. -
Unable to paste frame from one animation into another
Hi, I'm currently working to make a set of GIFs. I'm using PS CS6 64-bit on a Windows 7 PC. This is my first time encountering this error. I am attempting to select a batch of frames from one animation (in the frame animation mode) then select "Copy Frames" in the drop down window of the workflow menu, then move to the other animation, which is also in frame animation mode. However, when I go to that animation's drop down menu I'm unable to select "Paste Frame" - it's grayed out. I've attempted to rest my tools and preferences, and reopened PS several times, but still can't copy and paste frames from one animation to another. (I'm still able to copy and paste frames within a single animation.) As I said, this is my first time encountering this error after making numerous GIF sets this way -- any troubleshooting tips?
That copy and paste you describe does not work in ASO -- it does in BSO. AFAIK, it has been that way forever.
Sorry, because it is a very nice bit of functionality in BSO.
Regards,
Cameron Lackpour -
Copy a page from one Document to another
Can anyone help
In Pages '08 we had the ability to copy a page from one document to another.
In Pages '09 this does not seem possible.
Does anyone have anwser....
Thanks
Message was edited by: AJCUR
OK my bad
I just realized that I was in Word Processing in one document and Page Layout in another and you cannot do the copy between the two. Changed the Blank documentto word processing and voila it worked.I think this might help. Go to the document you want to copy the page from and go to the "View" menu and choose "page thumbnail" so you can see the thumbnails on the side of the document. Right click (or control click) on the thumbnail of the page you want to copy and choose "copy.
Go to the document you want to paste the page into and make sure you have the "View thumbnail" option turned on. If you already have some pages click on the page you want the new page to follow and then right click and paste the page where you want it. (you have to do this in the thumbnail view area, not in the actual document itself.) If you have inserted the page in the wrong spot, just drag it to the right location. note: I have tried dragging the thumbnail from one document to another and it does not work. Too bad because it works that way with a PDF documents in "Preview" app. -
Copy/Move Layerset From One Document To Another Without Flattening
Hello,
Does anyone know how to move a layerset from one document to another using JavaScript ExtendScript, but without having to flatten the layers first as I still need to edit them after the move.
Many Thanks,
JamesThis requires that you have the the two documents open the first document open is the one you are copying from with the layer/layers selected.
activeDocument=documents[0];
dupLayers();
function dupLayers() {
var desc15 = new ActionDescriptor();
var ref12 = new ActionReference();
ref12.putEnumerated( charIDToTypeID('Lyr '), charIDToTypeID('Ordn'), charIDToTypeID('Trgt') );
desc15.putReference( charIDToTypeID('null'), ref12 );
var ref13 = new ActionReference();
ref13.putName( charIDToTypeID('Dcmn'), documents[1].name );
desc15.putReference( charIDToTypeID('T '), ref13 );
desc15.putInteger( charIDToTypeID('Vrsn'), 2 );
executeAction( charIDToTypeID('Dplc'), desc15, DialogModes.NO ); -
How to copy OVD configuration from one machine to another?
We have two machines with OVD servers on them. The configurations should be identical from one machine to the other. We suspect there is a problem with the configuration on one of them. We need to know how to copy OVD configuration from one machine to another.
Can you tell us how to do that?well i have this in mind which may help you.
You would need to have a public ip address to the machine you have consoled to and on internet.
Download the tftp software from below link.
http://tftpd32.jounin.net/
This software does not only act as the tftp server but also you can select the interface of you ethernet card as tftp server ip address.
For ex if you are connected to a console and have a wireless card which is connected to internet also you connect you eth lan card to the eth or fast eth of the router.
you can select which ever interface you want to act as the tftp server.
you will need to add ip addres for you lan card and also config the router port as same if needed. -
How to copy List item from one list to another using SPD workflow using HTTP call web service
Hi,
How to copy List item from one list to another using SPD workflow using HTTP call web service.
Both the Lists are in different Web applications.
Regards, Shreyas R SHi Shreyas,
From your post, it seems that you are using SharePoint 2013 workflow platform in SPD.
If that is the case, we can use Call HTTP web service action to get the item data, but we cannot use Call HTTP web service to create a new item in the list in another web application with these data.
As my test, we would get Unauthorized error when using Call HTTP web service action to create a new item in a list in another web application.
So I recommend to achieve this goal programmatically.
More references:
https://msdn.microsoft.com/en-us/library/office/jj164022.aspx
https://msdn.microsoft.com/en-us/library/office/dn292552.aspx?f=255&MSPPError=-2147217396
Thanks,
Victoria
TechNet Community Support
Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact
[email protected] -
HOW TO COPY A FORM FROM ONE TO ANOTHER CLIENT
HOW TO COPY A FORM FROM ONE TO ANOTHER CLIENT
Hi Tina,
To copy either a Script or a Smartform fron one client to another client i.e from reference client 000 to any client say 010 follow instructions as given below:
Go to Tcode SE71->Give Form name MEDRUCK then go to Menu path Utilities->Copy From Client, give
Form Name: MEDRUCK
SOURCE:000 (it will be already there)
Target Form: Zmedruck(here give ur form zname)
Execute
It will be copied into all languages.
Then come back to SE71
Give your form name Zmedruck
Language:: de then goto change mode
then menu path->utilities->convert original languge to En and enter you will get a message original language of form zmedruck converted from de to en,
now change language de to en in se71 main screen and then do what ever changes you want to do , this is how you can copy a script or smartform from one client to another client.
If this answer is useful reward points any queries revert me back. -
How to move BCS data from one box to other
Hello Expert,
Dose any one know how to move BCS data from one box to other box ?
Thanks & Regards,1) The best is to do the test. In my case, my customer was just doing this transfer (in full) to perform tests on the BEX reportings. Actually, they never raised any issue regarding document number when they did additional postings in test system... I would also say that during the transfer, the number counter in Qual gets not synchronized with the one in Prod. So, I think the system will just take the next number available in Qual. Should not be an issue.
2) As explained in answer 1), in my case, the purpose was not to perform data migration from one system to the other one. Thus, my customer never performed a subsequent consolidation in the target system. But, basically, the transfer copies all data : posting levels 00 to 30, for all periods you have selected + Additional financial data and sequence of activities. Thus, for me, everyhting is available in the target system, including COI documents. In other words, the "picture" regarding the data should be exactly the same between both system. The only thing you need to pay attention to is the customizing : it must be the same in Qual and Prod (example : date of acquisition and divestiture, structure of the group, etc...).
Another very important thing, is that your export data source must not be enriched due to the BCS Delta load scenario. If it is the case, the system will write the consolidation logic (i-e the consolidation group + reporting mode) when transferring the data from the source Real Time Infocube to the Target Real time infocube, which will lead to inconsistent data in the target system.
Maybe you are looking for
-
My iPhone contacts won't sync to exchange
Hi guys, I am trying to sync my iPhone contacts to Google contacts through exchange so that I can unify my contacts. I followed these directions: http://support.google.com/a/users/bin/answer.py?hl=en&answer=138740 But I don't see my contacts in Googl
-
How do I get an album from Itunes that I have already downloaded to show the complete album again. After the last update it only shows one song. I tried to re purchase the whole album but it will not let me cause I already purchased it. Pease help
-
My site won't display correctly on android
I'm stumped. Built my site. Displays well on ipad and laptop. Android phone, it appears to not load the entire home page. Any experts on android here? http://skeeterz71.com Thanks
-
10.2.0.1 (Linux) DB will not cache rows from large IOT
Hi I have a 1.6gig IOT, I'll call "mytable" that I'm trying to get the DB to cache rows from. I have done an alter table mytable storage(buffer_pool keep); and when I query the IOT index from dba_indexes it says KEEP for buffer_pool. My db_keep_cache
-
Need to apply labels to a list of files
I have a list of filenames that I have exported from FileMaker Pro and I want to label them in Finder so that I can collect them and send them to a client. Is there a way to automate this process? Ideally, what I would like to do is to create a list