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

InDesign CS5 Debug : Where do I get trace files?

$
0
0

Hello folks,

 

I know trace files are created in QA folder which is under Applications folder. I want to trace all commands processed and I am using following steps

 

  • Started Adobe InDesign CS5 Debug application
  • Enabled "SpyOnCommand" and "SpyDebugLog" option which is available under Test->Spy->Spy Preferences...
  • Checked the option Test->TRACE->Diagnostics.
  • Selected Test->Diagnostics->Command->Trace All Commands->On

 

After doing all above steps I am expecting that traced log will be saved under QA/Logs/InDesign folder. I found there were only three files as "QueryGetUIObjectsInCmdCheck.txt", "WaxWorld.txt" and "PluginLoadLog.txt".

 

I didn't see any traced information in any of these files. Please let me know if someone knows how to generate trace logs?

 

Regards,

Praveen


[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

bind plug-in to Adobe InDesign CC version?

$
0
0

Hello community,

 

we want to develop and sell a plug-in for Adobe InDesign.

 

Some questions: It is possible to bind the plug-in for a Adobe InDesign CC version (I suppose Adobe CC is still 9.0). If a newer internal version (maybe 10.0) is available, the plugin must be licensed again. If Yes: how often (probably) does Adobe release a new internal Adobe InDesign CC version?

 

Is there any information about this on the Adobe website?

 

thanks

 

regards,

Raymond

long to int32 conversion issues in Xcode 5.0.2 when building plugin for Indesign CC 2014

$
0
0

Hi, I am trying to build one of the sample plugin WriteFishPrice from the SDK on mac System

I am using Xcode 5.0.2 as per the documentation, but I am encountering the below errors during compilation.

 

In UnicodeSavvyString.h

 

template <class FwdIterator>
inline void UnicodeSavvyString::assign_impl(FwdIterator b, FwdIterator e, size_type nCodePoints, std::forward_iterator_tag)
{  const difference_type nCodeValues = std::distance(b, e);  ASSERT(nCodeValues >= 0);

 // Make room for the chars
  code_value* buffer = GetBufferForWriting(nCodeValues);  // <----Implicit conversion loses integer precision long to int

 // Copy them into the buffer
  std::copy(b, e, buffer);

 // Ensure terminating null
  buffer[nCodeValues] = code_value();  fUTF16BufferLength = nCodeValues;                         // <----Implicit conversion loses integer precision long to int

 // Calculate how many code points we will have at the end
  if (nCodePoints == 0 && nCodeValues)  {  fNumChars = CountCharsUtil(buffer, nCodeValues);          // <----Implicit conversion loses integer precision long to int           }
 else  {  ASSERT((size_type)CountCharsUtil(buffer, nCodeValues) == nCodePoints);  fNumChars = nCodePoints;  }
}

 

And similar errors are coming in WideString.h.

 

Can some one tell me what is wrong with the new SDK? Or if I need to make some changes in these files which surely is not advisable.

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

Re-establishing dialog focus after child dialog is opened/closed

$
0
0

I have a dialog that is used to initiate a process querying a database. During this process the user is prompted with a Save dialog allowing them to specify a name and location for the resulting data file. After the Save dialog is closed my queries begin. At this point I want to update various text fields in the dialog reflecting current status and results as the queries progress. But nothing updates in my dialog until my queries are finished because its focus went away when the child Save dialog was opened and didn't return after closing until my process completed.

 

I was able to solve this on my Windows version by attaching an IID_IBOOLDATA observer to the dialog and sending a messageID to the dialog through this IID_IBOOLDATA. During the observer update function I obtain the dialog's widget, get its view control and do a ForceRedraw(). This works great on Windows but has no effect on the Mac.

 

On the Mac, it appears that it won't update unless the dialog has focus and the focus doesn't return until my process is completed. If the child dialog hadn't been opened, the focus would have remained on my dialog and the status updates will work fine. But once any child dialog is opened, focus leaves and doesn't return until my process completes.

 

Does anyone have a suggestion on how to force the focus back to a dialog in order to update/refresh some fields for the Mac?

 

Thanks

 

Bob

Minimum page size ... again

$
0
0
I would like to know, if there is a minimum size for an InDesign page.

When trying to create a document smaller than 30x30mm InDesign keeps complaining, that the "Specified margin and column setup does not fit within specified page size". Margin and gutter is set to zero. The page has one column.

I've searched the whole forum but did not find any suitable information on this. Referenced threads are not found any more.

I'd be happy if someone could give me a small hint.

Tanks,

Marko

Event Handler for the Combo Box

$
0
0

Hi,

 

I have TextComboBoxWidget, I want to trap the return key event. For each key press the update function in Observer get exectued but I found the difference in only ClassID when the focus is lost,

 

I tried to write the event handler,

code in  .fr file is as

Class
    {
        kMyComboBoxWidgetBoss,
        kTextComboBoxWidgetBoss,
        {
            IID_IEVENTHANDLER,  kMyComboBoxEHImpl,
            IID_IMYCOMBOEVENTHANDLER,  kComboBoxEventHandlerImpl ,
        }
    },

type MyTextComboBoxWidget(kViewRsrcType) : TextComboBoxWidget(ClassID = kMyComboBoxWidgetBoss){};

 

In factory.h the class is registered.

 

And kMyComboBoxEHImpl is inherited from the CEventHandler, as

class EditBoxEH2 : public CEventHandler

 

but, when I press any then the control is not comming in the constructor of the event handler, I am not getting what's going wrong?  Please help.

 

Thanks,

Praveen


InDesign CS5 Debug's Serial Number doesn't fetch from...

$
0
0

Hi, everyone!

In advance Thanks!!

 

I can't get InDesign CS5 Debug's Serial number from Solution Partner Software Downloads.

it says that serail number will appear upon initiating download, but error fetching serial number.

How can I do?

Prevent Document Close by Close(X)

$
0
0

Hi,


     Im Developing a Indeisgn SDK to control the Indesign QuitInDesign option & Close(X) Option.

I need to control the document close by the cloe(X) option of the document.I have already disabled the indesign file->close option.

Now,I need to control the close(x)option of the document which is present in the top right corner of the document.

Whenever i click the close(x)option of the document the document must be saved & den closed.The same way when i select InDesign

QuitInDesign option,the document must be saved & den the Indesign quit action to be performed.Tell me how to develop a Indesign

SDK for my requirement.

How to insert Asset from library to Document?

$
0
0

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())

  ErrorCoderesult = libSuite->DoPlaceLibraryItems(assetList,PtrLibrary,pageItemUIDList,GetExecutionContextSession()->GetActiveContext()->GetContextView());

 

Please suggest me, i am new to indesign

How to dynamically populate IDropDownListController

$
0
0

Hi!

My question is how can I dynamically populate the IDropDownListController widget? In the sample project WriteFishPrice the entries are all static, but I need to add or remove entries in the list. Thanks for any pointers!

How to replace a existing XML tag with a new XML tag?

$
0
0

Hi,

I have a Text frame with some text inside it.

 

I have XML tag, tagging some text inside the frame. Now I want to replace this XML tag with some new XML

tag so that my text is now tagged with the new tag.

 

How Can I do that?

InDesign Plugins Development using C# or Java

$
0
0

Dear All,

I would like to know the below questions all answers are welcome:

  1. Is it possible to develope InDesign plugins using C#/Java? If yes, then please let me know how.
  2. Is it possible to develop cross-platform plugins (Mac & Windows) using any languages?
  3. Why InDesign SDK is having limitation for using VC++?

 

I am going to work on InDesign CS4 plugins development and the challenges infornt of me is cross-platform & VC++.

 

Regards,

Rajeev Kumar

CS3-CS6 UI: Prevent widget from losing focus

$
0
0

Hi Folks,

 

I can't seem to find a way to prevent a text edit field from losing keyboard focus when another widget is clicked--I hope I'm just overlooking the solution.

 

Here is the situation:

 

Suppose that there are two text edit widgets (TE1 and TE2) on a dialog box.

 

The current behavior:

 

1. User enters some text in TE1.

 

2. User clicks in the TE2 field.

 

3. TE1's update handler code handles the kEditBoxGiveUpKeyFocusMessage that was triggered when TE2 was clicked.

 

4. The handler, notices that TE1 contains an invalid text value.

 

5. The handler displays a warning stating the problem.

 

6. TE2 gets the keyboard focus because it was clicked.

 

 

The desired behavior is to have Step 6 change to:

 

6. [DESIRED] Due to its bad data, TE1 keeps the keyboard focus (the click on TE2 is ignored).

 

Thanks in advance for any help!!

 

Cheers!

 

-- Jim


[CS6] [InDesign SDK] Any way to export SWF without a memory leak?

$
0
0

I'm using part of a code sample found in the sample file SnpExportDynamicDocument.cpp that goes:

 

ErrorCode SnpExportDynamicDocument::ExportSWF(const UIDRef & documentUIDRef, IDFile& swfFileName)
{
ErrorCode status = kFailure;
InterfacePtr<IPMStream> outStream(StreamUtil::CreateFileStreamWriteLazy(swfFileName, kOpenOut | kOpenTrunc));

SDKFileHelper fileHelper(swfFileName);
if (fileHelper.GetPath().empty())
{
  ASSERT_FAIL("Invalid or missing filename.");
  return kFailure;
}

// create the SWF export action command
InterfacePtr<ICommand> swfExportCmd(CmdUtils::CreateCommand(kSWFExportCommandBoss));
if (swfExportCmd == nil)
{
  ASSERT(swfExportCmd);
  return kFailure;;
}

// Set Target
UIDList items(documentUIDRef.GetDataBase());
InterfacePtr<IPageList const> pageList(documentUIDRef, UseDefaultIID());
for (int32 pageIndex = 0, pageCount = pageList->GetPageCount(); pageIndex < pageCount; ++pageIndex)
  items.Append(pageList->GetNthPageUID(pageIndex));
swfExportCmd->SetItemList(items);


// Set cmd data
// IID_IDYNDOCSEXPORTCOMMANDDATA
InterfacePtr<IDynamicDocumentsExportCommandData> dynamicDocsCmdData(swfExportCmd, UseDefaultIID());
dynamicDocsCmdData->SetStream(outStream);
dynamicDocsCmdData->SetUIFlags(kSuppressUI);

// IID_ISWFEXPORTPREFERENCES
InterfacePtr<ISWFExportPreferences> swfCmdData(swfExportCmd, UseDefaultIID());
InterfacePtr<IWorkspace> iAppWS(GetExecutionContextSession()->QueryWorkspace());
InterfacePtr<ISWFExportPreferences> iSWFExportPrefs(iAppWS, UseDefaultIID());
swfCmdData->Copy(iSWFExportPrefs);


// process the command
return CmdUtils::ProcessCommand(swfExportCmd);

}

 

It leaks on the very last line. That is, if I remove the ProcessCommand() then there's no memory leak.

There appear to be "2 leaks, 130072 bytes" leaked every time I call the above.

 

I'm just pasting sample code that comes with CS6 SDK, so I can't see what the problem is.

I've checked the code in

 

Any suggestions?

Winows 32 and 64 bit

$
0
0

Hello,

 

Do 32 bit plugins work in a 64 bit InDesign? The version of ID are 5.5, 6 and CC.

 

P

Where to download InDesign CC debug version?

$
0
0

After finally having access to the InDesign CC SDK I am now presented with the problem of debugging a built plugin. Where can i get the InDesign CC (9.2 specifically) debug version?

Activate Panel from right-click menu

$
0
0

Hi,

 

I'm developing a PlugIn with InDesign SDK CS6 and need to activate (?, not really sure if this is the right term) the panel from somewhere else (right-click menu [RtMouseDefault]). Basically, like the Mini Bridge panel is activated when you right-click on a picture->Graphics->Show in Mini Bridge.

 

I played around a bit but wasn't able to find a solution (guess I need to do something with my instance of the class PalettePanelView (?)), so would be glad if somebody could point me in the right direction.

 

 

Thanks, kind regards

is it change font loading path in indesign?

$
0
0

Hi,

 

Anyone know, how to change the font loading path in indesign using sdk?

 

Thanks in advance,

Rjv.

Viewing all 78596 articles
Browse latest View live