Quantcast
Channel: Adobe Community : Popular Discussions - InDesign SDK
Viewing all 78596 articles
Browse latest View live

How to bundle resource files with a plugin

$
0
0

Feel like I'm missing something obvious here.

Trying to bundle a zip file in with my (c) plugin, then access it in code.

I've added it to the Resources group of my project in XCode, which has caused to to be copied to the Resources folder of the .InDesignPlugin package.

Is that the correct way to go about it? How do I then access it in code?

Thanks


Resources not getting generated when building plugin for release/debug version of CC 2015

$
0
0

I am trying to generate a release/debug plugin for CC 2015 using the SDK version 11.2, the build succeeds with below message:


merge_res.cmd done.

1>  Deleting old resources...

1>  Could Not Find C:\Users\CS\Documents\GitHub\CS-DTP\IndesignPlugin\CSDTPObserverPlugin\build\releasex64\( CSDTPObserverPlugin.sdk Resources)\*.idrc

1>  0 File(s) copied

1>    Creating library ..\..\..\build\win\objRx64\CSDTPObserverPlugin/CSDTPObserverPlugin.lib and object ..\..\..\build\win\objRx64\CSDTPObserverPlugin/CSDTPObserverPlugin.exp

1>  CSDTPObserverPlugin.vcxproj -> C:\Users\CS\Documents\GitHub\CS-DTP\IndesignPlugin\CSDTPObserverPlugin\build\releasex64\C SDTPObserverPlugin.sdk.pln

1>  restore_res.cmd done.

========== Rebuild All: 1 succeeded, 0 failed, 0 skipped ==========


When trying to load such plugin in InDesign, I am getting below error:

"CSDTPOBSERVERPLUGIN.SDK.PLN" Plug-in is either missing plug-in resource or the Model/UI attribute is not specified in PlugIn Version resource!





How to read dragged image from (Browser to Layout)

$
0
0

When I drag an image from browser into the layout, the external flavor is kPasteboardTypeFileURLPromiseExternalFlavor

Now, I try to handle this external flavor in my flavor helper's ProcessDragDropCommand.

I try to internalize as follows:

 

controller->InternalizeDrag(kNoExternalFlavor, kMyDragDropCustomFlavor);

 

kMyDragDropCustomFlavor is supported via my custom data exchange handler.

Have overridden CanInternalizeData and Internalize data in my data exchange handler.

 

My biggest hurdle: is in reading the dragged item from IPMDataObject as stream.

IPMDataObject::GetStreamForReading never gives me the stream.

 

NOTE: I at least expect to read the URL of the image dragged and not the entire image stream.

When you drag an image from browser to InDesign layout (in Windows version), a text box is created with URL data.

 

I would like to achive the same. I would appreciate if someone can shed light on this.

idrc_VIEW files contain development path

$
0
0

Hi,

 

the idrc-files insode the folder "idrc_VIEW" contain the development path (of the original fr-file).

why is this needed? is there a switch to prevent this?

 

thank you

ProcessDragDropCommand is not invoking after CouldAcceptTypes returned DragDrop::kDropWillCopy

$
0
0

Hi everyone!

 

Here's the sample web browser application from cef:

http://opensource.spotify.com/cefbuilds/cef_binary_3.2704.1432.g60b3718_windows32_client.t ar.bz2

if you have another OS you can get your version from here:

CEF Automated Builds

 

I've modified BasicDragDrop sample from sdk to handle my flavor ("HTML Format")

 

If you'll try to drag the image from it and drop into InDesign then your CouldAcceptTypes function will be invoked but even if you return DragDrop::kDropWillCopy the ProcessDragDropCommand won't be invoked.

 

For Firefox, if you'll drag the same image from the same web page into the same document then after CouldAcceptTypes your ProcessDragDropCommand will be invoked too as expected.

 

I'm returning absolutely same TargetResponse from CouldAcceptTypes in both cases. But with Firefox it works and with cef the ProcessDragDropCommand insn't invoking. Both drops have "HTML Format" flavor. Both of them have valid IPMString with data for that flavor.

 

Does anyone have idea what I'm missing? Thanks!

Having trouble creating an observer for a panel

$
0
0

Hello, I am trying to create a plugin for CS6, and I wanted it to be accessed through a panel, so I created a new project with the panel setting on.  I was able to get the button I wanted on there, but I can't seem to get the observer to work.  I was able to get CMyProjectBtnObs::Update to run, but not anything in the action component  I have been lurking around the forums trying to find what I was doing wrong, and when I added :

InterfacePtr<IPanelControlData> panelControlData(this, UseDefaultIID());

 

 

to my auto-attach function, my program was crashing, saying panelControlData is nil.  What could cause this to be nil?  Is it looking for a member variable in my CMyProjectBtnObs file that I didn't create (There are no member variable in my implementation)?  I have been running into a ton of errors with InterfacePtr with many objects not being successfully created, but until now I have always been able to find a way around it by using different functions.  Thanks a lot for the help!

 

--Jacob

 

this is the full code for my observer function:

#include <CObserver.h>
#include <ISubject.h>
#include <IBooleanControlData.h>
#include <MyProjectID.h>
#include "ISubject.h"
#include <CDialogObserver.h>
#include <fstream>
#include <IControlView.h>
#include <CObserver.h>
#include <IObserver.h>
#include <ITextControlData.h>
#include <IPanelControlData.h>

class CMyProjectBtnObs : public CObserver
{
public:
  /**  Constructor.  @param boss interface ptr from boss object on which this interface is aggregated.  */  CMyProjectBtnObs( IPMUnknown* boss );  /** Destructor  */  virtual ~CMyProjectBtnObs() ;  /**  Initialises widgets and attaches widget observers.  */  void AutoAttach();  /**  Detaches widget observers.  */  void AutoDetach();  /**  Update is called for all registered observers, and is  the method through which changes are broadcast.  @param theChange this is specified by the agent of change; it can be the class ID of the agent,  or it may be some specialised message ID.  @param theSubject this provides a reference to the object which has changed; in this case, the  widget boss objects that are being observed.  @param protocol the protocol along which the change occurred.  @param changedBy this can be used to provide additional information about the change or a reference  to the boss object that caused the change.  */  void Update(const ClassID& theChange, ISubject* theSubject, const PMIID &protocol, void* changedBy);


private:
  /** Attach this observer to the given widget.  @param panelControlData refers to the panel that contains the widget  @param widgetID gives the subject to be observed  @param interfaceID gives the protocol to be observed  */  void AttachWidget(const InterfacePtr<IPanelControlData>& panelControlData, const WidgetID& widgetID, const PMIID& interfaceID);  /** Attach this observer from the given widget.  @param panelControlData refers to the panel that contains the widget  @param widgetID gives the subject being observed  @param interfaceID gives the protocol being observed  */  void DetachWidget(const InterfacePtr<IPanelControlData>& panelControlData, const WidgetID& widgetID, const PMIID& interfaceID);  /** Initialise the dropdown that displays the names of code snippets that  are registered with the framework and available to be run.  @param panelControlData refers to the panel that contains the widget  */  void InitialiseSnippetNames(const InterfacePtr<IPanelControlData>& panelControlData);  /** Initialise the Trace checkbox.  @param panelControlData refers to the panel that contains the widget  */  void InitialiseTrace(const InterfacePtr<IPanelControlData>& panelControlData);  /** Handle the snippet selected in the dropdown widget being changed.  */  void ChangeSnippet();  /** Handle the Trace checkbox widget being checked.  */  void TraceOn();  /** Handle the Trace checkbox widget being unchecked.  */  void TraceOff();  /** Handle the save log button widget being clicked.  */  void SaveLog();  /** Handle the clear log button widget being clicked.  */  void ClearLog();  /** Handle the parameter widget update by saving snippet parameters  to the snippet parameter dictionary (SnipRunParameterDictionary).  */  void SaveParameters();  /** Synchronise the Go button with the name of the snippet to be run.  @param snippetName  */  void UpdateGoButton(const PMString& snippetName);  /** Query the text control data interface of the given widget.  @param widgetID gives the which whose text control data is desired  @return interface pointer to the widget's text control data.  */  InterfacePtr<ITextControlData> QueryTextControlData(const WidgetID& widgetID);  // Snippet parameter dictionary helper.
private:  /** Dictionary helper class that stores key value pairs where the key is  a snippet name and the value is the snippet's parameters. The dictionary  is not persistent.  */

};

CREATE_PMINTERFACE(CMyProjectBtnObs, kMyProjectBtnObsImpl)

CMyProjectBtnObs::CMyProjectBtnObs(IPMUnknown* boss):CObserver(boss)
{

}

CMyProjectBtnObs::~CMyProjectBtnObs()
{

}
 void CMyProjectBtnObs::AttachWidget(const InterfacePtr<IPanelControlData>& panelContgrolData, const WidgetID& widgetID, const PMIID& interfaceID)
{  do  {  InterfacePtr<IPanelControlData> ay(this,UseDefaultIID());  IControlView* controlView = ay->FindWidget(widgetID);  if (controlView == nil)  {  ASSERT_FAIL("controlView invalid");  break;  }  InterfacePtr<ISubject> subject(controlView, UseDefaultIID());  if (subject == nil)  {  ASSERT_FAIL("subject invalid");  break;  }  subject->AttachObserver(this, interfaceID);  }  while (false);
}
void CMyProjectBtnObs::AutoAttach()
{  do{  InterfacePtr<IPanelControlData> panelControlData(this, UseDefaultIID());  if (panelControlData == nil)  {  break;  }          this->AttachWidget(panelControlData, kMyProjectBtnObsImpl, ITextControlData::kDefaultIID);  }while(false);
}


void CMyProjectBtnObs::AutoDetach()
{
  CObserver::AutoDetach();  InterfacePtr<ISubject> theSubject(this, UseDefaultIID());          if(theSubject != nil)                    theSubject->DetachObserver(this, IID_IBOOLEANCONTROLDATA);

}

void CMyProjectBtnObs::Update(const ClassID& theChange, ISubject* theSubject, const PMIID &protocol, void* changedBy)
{    //CObserver::Update(theChange, theSubject, protocol, changedBy);     do{        if(theChange != kTrueStateMessage)  break;  InterfacePtr<IControlView> controlView(theSubject, UseDefaultIID());  WidgetID theSelectedWidget = controlView->GetWidgetID();  printf("\n Update");          } while(kFalse);
}

InDesign CC 2014.0 does not recognise plugins built with CC 2014.0 SDK on Mac

$
0
0

Hi all,

 

I did build plugins for InDesign CC 2015.4 using CC 2015.4 SDK and they worked fine on Mac. I've used Xcode version 7.3.1 (7D1014) and I have OSX 10.8 SDK copied from earlier version of Xcode and have it displayed in Xcode 7.3.1 Base SDKs list. But when I compile the same plugins with the same Xcode version but with CC 2014.0 SDK then InDesign CC 2014.0 displays this alert on startup:

"Adobe InDesign does not recognise MyPlugin.InDesignPlugin" as a valid plug-in. Please reinstall the MyPlugin.InDesignPlugin" plug-in and restart InDesign."

 

The bad thing is that the same message I get even if I build sample plugins from SDK like BasicDialog or BasicPanel. Don't know if this is related to the minor changes I did in the sample projects to make them compile.

 

When I open any sample project from SDK and trying to build it I get error:

"ld: file not found: @executable_path/InDesignModel.framework/Versions/A/InDesignModel for architecture x86_64"

to solve this I've added "InDesignModel.framework" from "<SDK-folder>/build/mac/release_cocoa64/packagefolder/contents/macos" to "Link binary with libraries" list.

 

After that I get another error:

"Undefined symbols for architecture x86_64:

"_objc_readClassPair", referenced from:

__ARCLite__load() in libarclite_macosx.a(arclike.o)"

to solve this one I've switched "Implicitly Link Objective-C Runtime Support" option from "Yes" to "No" as suggested here:

Undefined symbols: "_objc_readClassPair" when o... | Apple Developer Forums

I've changed this option in my CC2015.4 plugins too and InDesign CC2015.4 loaded that plugins fine.

 

After these changes plugin builded successfully, but when I copy that plugin into "/Applications/Adobe InDesign CC 2014/Plug-Ins/SDK" folder then InDesign displays alert above.

 

Does anyone have idea what I'm missing? Thank you very much!

Right align text

$
0
0

I'm inserting text to textframe using InsertText() of SnpTextModelHelper.h , how can right align this text to the right,

Or is there any other API call for this ?


how to dragdrop text of list elements in TextFrame.

$
0
0
hi,
i have a panel with list which implemented using TreeViewWidget. I want to add drapdrop functionality to list elements which are the tree nodes.I have written implementation for "IID_IDRAGDROPSOURCE" for tree node by referring sample "PanelTreeView". But the flavor "kPMTextFlavor" in my case is not working.Also the "IStringData" interfaceptr from dataExchangeHandler is getting zero.
Is anybody tried to drag static text with kPMTextFlavor or is any other flavor should be used and what about IStringData??

How drag and drop a node in a TreeView ?

$
0
0

Hi,

 

I want drag and drop a node in a treeview but i don't know how to get this result. I can drag a page item in a treeview or drag a node in a page item but not a node in another.

Can you help me ?

 

Regards,

 

Damien Fontaine

[CS5.5] Save : No destination file supplied/Readonly

$
0
0

Hi everybody,

 

I'm meeting problems with a document save operation. In 99% of the time, my save is working. In the 1% left, I got an assert/error.

 

 

What I did is :

  • Open the file :
    InterfacePtr<ICommand> iOpenFileCmd (Utils<IDocumentCommands>()->CreateOpenCommand(file,

                                                      kSuppressUI,

                                                      IOpenFileCmdData::kOpenDefault,   // tried kOpenOriginal too

                                                      IOpenFileCmdData::kUseLockFile,    // tried kNotUseLockFile too

                                                       false,                                                   // tried true too

                                                       IDocument::kFullUndoSupport));

  • Make a minor operation (for example, create a frame, or whatever).

  • Save the file (1st way):

        Utils<IDocumentCommands>()->Save(docToSave, kSuppressUI);

I got this assert : SUserFile::SetUserFileMode() Cannot switch mode when original opened read-only

 

 

  • Save the file (2nd way):

Capture d’écran 2013-08-22 à 17.52.18.png


 

Something is telling me I opened the document in a readonly mode, but I can't see how I did it !

Do you know how to resolve such a situation ?

 

Thanks

Another "error PRJ0019: A tool returned an error code from "Performing Custom Build Step""

$
0
0
Hi all

Im having a problem moving a project from my computer to another developers computer. When I try to compile the project on the new computer i get the following result(see below):

----------------------------------------------------------------------
------ Rebuild All started: Project: LectorInDesignPlugin, Configuration: Release Win32 ------

Deleting intermediate files and output files for project 'LectorInDesignPlugin', configuration 'Release|Win32'.

Performing Custom Build Step

e:\LecDoc\trunk\source\client\plugins\IndesignPlugin\src\Lector.fr(26) : error R32: # Error: Could not open include file VCPlugInHeaders.h
e:\LecDoc\trunk\source\client\plugins\IndesignPlugin\src\Lector.fr(28) : error R32: # Error: Could not open include file MenuDef.fh
e:\LecDoc\trunk\source\client\plugins\IndesignPlugin\src\Lector.fr(29) : error R32: # Error: Could not open include file ActionDef.fh
e:\LecDoc\trunk\source\client\plugins\IndesignPlugin\src\Lector.fr(30) : error R32: # Error: Could not open include file ActionDefs.h
e:\LecDoc\trunk\source\client\plugins\IndesignPlugin\src\Lector.fr(31) : error R32: # Error: Could not open include file AdobeMenuPositions.h
e:\LecDoc\trunk\source\client\plugins\IndesignPlugin\src\Lector.fr(32) : error R32: # Error: Could not open include file LocaleIndex.h
e:\LecDoc\trunk\source\client\plugins\IndesignPlugin\src\Lector.fr(33) : error R32: # Error: Could not open include file PMLocaleIds.h
e:\LecDoc\trunk\source\client\plugins\IndesignPlugin\src\Lector.fr(34) : error R32: # Error: Could not open include file StringTable.fh
e:\LecDoc\trunk\source\client\plugins\IndesignPlugin\src\Lector.fr(35) : error R32: # Error: Could not open include file ObjectModelTypes.fh
e:\LecDoc\trunk\source\client\plugins\IndesignPlugin\src\Lector.fr(36) : error R32: # Error: Could not open include file ShuksanID.h
e:\LecDoc\trunk\source\client\plugins\IndesignPlugin\src\Lector.fr(37) : error R32: # Error: Could not open include file ActionID.h
e:\LecDoc\trunk\source\client\plugins\IndesignPlugin\src\Lector.fr(38) : error R32: # Error: Could not open include file CommandID.h
e:\LecDoc\trunk\source\client\plugins\IndesignPlugin\src\Lector.fr(39) : error R32: # Error: Could not open include file WorkspaceID.h
e:\LecDoc\trunk\source\client\plugins\IndesignPlugin\src\Lector.fr(40) : error R32: # Error: Could not open include file WidgetID.h
e:\LecDoc\trunk\source\client\plugins\IndesignPlugin\src\Lector.fr(41) : error R32: # Error: Could not open include file BuildNumber.h
e:\LecDoc\trunk\source\client\plugins\IndesignPlugin\src\Lector.fr(43) : error R32: # Error: Could not open include file PanelList.fh
e:\LecDoc\trunk\source\client\plugins\IndesignPlugin\src\Lector.fr(44) : error R32: # Error: Could not open include file InterfaceColorDefines.h
e:\LecDoc\trunk\source\client\plugins\IndesignPlugin\src\Lector.fr(45) : error R32: # Error: Could not open include file IControlViewDefs.h
e:\LecDoc\trunk\source\client\plugins\IndesignPlugin\src\Lector.fr(46) : error R32: # Error: Could not open include file SysControlIDs.h
e:\LecDoc\trunk\source\client\plugins\IndesignPlugin\src\Lector.fr(47) : error R32: # Error: Could not open include file Widgets.fh
e:\LecDoc\trunk\source\client\plugins\IndesignPlugin\src\Lector.fr(48) : error R32: # Error: Could not open include file ScriptInfoTypes.fh
e:\LecDoc\trunk\source\client\plugins\IndesignPlugin\src\Lector.fr(49) : error R32: # Error: Could not open include file ScriptingID.h
e:\LecDoc\trunk\source\client\plugins\IndesignPlugin\src\Lector.fr(50) : error R32: # Error: Could not open include file DocFrameworkID.h
e:\LecDoc\trunk\source\client\plugins\IndesignPlugin\src\Lector.fr(51) : error R32: # Error: Could not open include file AppFrameworkID.h
e:\LecDoc\trunk\source\client\plugins\IndesignPlugin\src\Lector.fr(52) : error R32: # Error: Could not open include file ImportExportUIID.h
e:\LecDoc\trunk\source\client\plugins\IndesignPlugin\src\Le

[CS3] DragDrop of text only inside a TreeViewWidget?

$
0
0
Hello!

I want to make a DragDrop of simple text only inside a TreeViewWidget from on node to another.

Which kind of flavor should I use?

How to get the data into the IDataExchangeHandler and out of him?

Can anybod help me?

Thanks,
Alois Blaimer

Export Adobe PDF (print ) BasicTextAdornment

$
0
0

Hello,

 

We have a plugin that uses Text Adornments very much like the BasicTextAdornment sample plugin. When we choose to export to PDF our adornments are not being printed, the sample plugin BasicTextAdornment does not print either.

 

Does any one know how we can fix this.

 

Many Thanks.

 

P.

ODFRC compiler problem in Windows

$
0
0

Hi,

 

I have a problem with the odfrc compiler in Windows. When I compile any sample project in the SDK the .fres file generated by the odfrc compiler is empty (size of 0 bytes). The different resource folders are generated with content. The following ConcatRes command failes because the .fres file is not a valid resource file and the generated plug-in will not load.

 

I have the problem i both version 354 and 355 of the SDK and in both Windows7 and WindowsXP.

 

Has anybody else had this problem ? And have you solved it ?


Convert XML to IDML

$
0
0

Hi Experts,

 

I am new to InDesign Development, I was an InDesign(CS2) Template Designer few years before.

We are going to develop XML to IDML from the scratch for the simple journal, Please any one advice me for the below questions:

 

1. Is InDesign SDK tool must for XML to IDML?

2. Will I be able to run Java application developed in Windows Desktop, in Mac as well?

3. What are the Plugins required?

4. Any free library is available?

 

Thanks in advance.

 

Regards

Saran

InDesign cc 2017 sdk

$
0
0

Hello,

 

I am building plug-ins for InDesign and I need to download the newest SDK for cc 2017, where can I download it ?

 

 

br.

Łukasz

How to select text in textframe

$
0
0

HI all,

 

In Insdesign i have a document and place a TextFrame in a page and there are some text displayed in it. I have a dialog ,where i have  button to selected the text displayed in the TextFrame when it is clicked.

I got the ISelectionManger

ISelectionManager* iSelectionManager = Utils<ISelectionUtils>()->GetActiveSelection();

 

Now I need to get the TextFrame interface . How do get it?

 

Thanks

Sakthi

How to say indesign to not to keep cache

$
0
0

I have created a panel. it changes view according to the operations done in InDesign. When indesign is closed/crashes, and started again, the panel tree view has some data cached from previous operations, which are irrelevant to the initial states. Is there a way to tell InDesign, to not to keep caches of a particular UI competent. Or any other way to clear the caches.

Setting up environment in Visual Studio 2015 for building plugins for InDesign CS6

$
0
0

Hello, I am trying to develop plugins for Adobe InDesign CS6, and I am currently using Visual C++ in Visual Studio 2015 and I am having trouble importing Adobe's environment into visual studio, since the guide available is in reference to Visual Studio 2010.  Which directory should I set to go to which parts of the SDK?  Thank you very much.

directories.jpg

Viewing all 78596 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>