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

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 change pasteboard size

$
0
0

I'm trying to change the size of the pasteboard in code, in the same way that a user would change it via Guides and Pasteboard Preferences.

 

The code I have at the moment seems to change the values displayed in the preferences dialog for "Horizontal margins" and "Vertical margins", but doesn't actually change the visible pasteboard.

Any ideas on what I'm doing wrong?

 

IDocument* doc = Utils<ILayoutUIUtils>()->GetFrontDocument();

InterfacePtr<IPasteboardPrefs> pasteboardPrefs(static_cast<IPasteboardPrefs>(::QueryPreferences(IID_IPASTEBOARDPREFERENC ES, doc)));

pasteboardPrefs->SetPasteboardBorder(newXVal, newYVal);

 

I've also tried an "apply" command I found, in follow up to the above code, but it made no difference:

 

InterfacePtr<ICommand> setPasteboardCmd(CmdUtils::CreateCommand(kSetPasteboardPrefsCmdBoss));

if (setPasteboardCmd) {

    CmdUtils::ProcessCommand(setPasteboardCmd);

}


Thanks in advance

In Indesign CS6 I export an artboard to TIFF with the sdk's funtion SnapshotUtilsEx->ExportImageToTIFF(iStream) and, the resulting file is one pixel too large in the X, leaving a transparent strip on one edge. Any idea if there is a bug in the sdk?

$
0
0

In Indesign CS6 I export an artboard to  TIFF with the sdk's funtion SnapshotUtilsEx->ExportImageToTIFF(iStream) and, the resulting file is one pixel too large in the X, leaving a transparent strip on one edge. Any idea if there is a bug in the sdk?

[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?

Getting incorrect values for linkQueryResult (ILinkManager) while debugging our plugin in Adobe InDesign CC debug

$
0
0

Hi,

 

We have added some functionalities in PanelTreeView sample source. In that, we are getting incorrect values for linkQueryResult (ILinkManager) while using InDesign CC debug. But in release version we are getting the correct values for linkQueryResult (ILinkManager). So when debugging our plugin InDesign CC debugger has stopped working. Please find the below source,

 

IDocument* document = Utils<ILayoutUIUtils>()->GetFrontDocument();

  if(document == nil)

  {

  //CAlert::InformationAlert("Doc Interface Not Created");

  break;

  }

  IDataBase *db = ::GetDataBase(document);

  InterfacePtr<ILinkManager> linkmanager(document, UseDefaultIID());

  if(linkmanager == nil)

  {

  //CAlert::InformationAlert("linkmanager Interface Not Created");

  break;

  }

  LinkQuery Query;

  ILinkManager::QueryResult linkQueryResult;

  linkmanager -> QueryLinks(Query, linkQueryResult);

  for (ILinkManager::QueryResult::const_iterator iter(linkQueryResult.begin()), end(linkQueryResult.end()); iter != end; ++iter)

  {

  InterfacePtr<ILink> iLink(db, *iter, UseDefaultIID());

  if ( iLink )

  {

  InterfacePtr<ILinkResource> resource(linkmanager->QueryResourceByUID(iLink -> GetResource()));

  ILinkResource::ResourceState rs = resource->GetState();

  PMString fileName = resource -> GetLongName(kTrue); //gets full path

  CharCounter lc=fileName.LastIndexOfCharacter('.');

  PMString *exten = fileName.Substring(lc+1,3);

  if((*exten).Compare(kFalse,"xml")==0)

  {

  xmlDataLinkName = fileName;

  }

  }

  }

 

Kindly help us if anyone has idea regarding this issue.

 

Thanks,

VIMALA L

Plugin generated with CC SDK is not working with InDesign CC 10.0

$
0
0

Hello all,

 

when I compile a plugin with the CC Sdk and try to open it with InDesign I get the error that the plugin was created for InDesign 9.2. However, the latest InDesign has version 10.0.

Is there a way to fix it or do we simply have to wait for the proper version of the SDK to be released?

 

Thank you!

 

Best regards

Problem with native Cocoa control widget like NSComboBox

$
0
0

Native cocoa control like NSComboBox are not working correctly.In my case if I add native cocoa XIB having NSPanal with NSComboBox for some UI in indesign Plugin than NSComboBox drop down is expanding but collapsing immediately without giving a chance to choose different entry from drop down. May be nobody have such requirement to use native cocoa widget but my plugin have dependency on some external framework which use native cocoa control widget for UI. earlier I have doubt that there is some problem in this framework implementation but than I edit BasicDialog sample plugin to add native XIB with NSpanal & NSComboBox to create same situation and same problem with NSComboBox.

Hi InDesign CC 32bit / 64 bit in one Package?

$
0
0

Hi everybody,

 

I am using the manual bundling tool which includes the manifest file. I have windows builds for 32 and 64 bit, but I do not understand how to create a bundle that contains both and that only copies the files that are labelled with the proper architecture.

 

Does anyone have experience with this?

 

 

Thank you!


Convert IPMStream to PMString or char *

$
0
0
Hellow,
Im new in In Design SDK , i need to convert a IPMStream to PMString
can some one help me
thanks in advance

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

CS 3 samples not getting compiled on mac10.6 with XCode 3.2

$
0
0

Hi,

 

I am trying to build the InDesign CS 3 SDK Samples with the latest sdk of CS 3(i.e., adobe_indesign_cs3_products_sdk_504mac.dmg) and Base SDK 10.5 or 10.6 on mac snow leopard with XCode 3.2. But I'm getting compile time error as

 

error: conflicting declaration 'typedef long unsigned int uint32

error: 'uint32' has a previous declaration as 'typedef uint32_t uint32

error: 'EndpointRef' does not name a type

 

How could I fix this error?

 

Thanks!

CS5 / Win: How can I detect an key in a text edit box

$
0
0

Hi

 

I like to detect a key (an input) in a text edit box. I suppose I have to install an observer.

 

- Is that right?

- Sample?

 

I installed an observer for the dialog and attached the text edit box. But there is no call (in ::Update) if I do an input into the text edit box.

 

Thanks

Hans

InDesign: How to replace an implementation of interface of another plug-in's boss?

$
0
0

Is it possibly to replace an exsisting implementation  by my own one (with ODFRC),  if it is on a boss from another plug-in?

I know it's IID and ImplementationID.

Thanks in advance

IPMUnknown.h generate error

$
0
0

Hi

I want to create Indesign using SDK.

I do not Know how use SDK to create indesign document.

I read solutions.pdf and start using visual studio 2008 (vc++) to create indesign application.

To create Application refernce(instance) i am try below code

 

    #include "ISession.h"

    #include "IApplication.h"

 

    virtual IApplication *  QueryApplication()=0 ;

    ISession *  GetExecutionContextSession();

    IApplication application(GetExecutionContextSession()->QueryApplication());

when I compile my code it give many error related to  IPMUnknown.h, IDFactory.h,ShuksanID.h file like

 

\ipmunknown.h(57) : error C2061: syntax error : identifier 'PMIID'

\idfactory.h(78) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int

\idfactory.h(81) : error C2061: syntax error : identifier 'PluginID'

\shuksanid.h(83) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int

 

I include these .h file in my project from SDK.

I do not understand why these file give error and How remove these type error.

 

How use full SDK in my vc++ project instead of copy these .h file one by one in project ?

 

 

Thanks.

ETA for InDesign 10 (2014) Debug version?

$
0
0

Hello Adobe!

So apparently the new InDesign breaks plugin compatibility and requires a new Debug version of InDesign 10 (2014).

Since we're in the middle of developing an InDesign plugin and we'd like to make it available on the newest version of InDesign, when will the InDesign 10 Debug version be put online to download from the Adobe Partners Portal?


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?

InsertLabel and ExtractLabel of selected frame in indesign cc sdk using c++

$
0
0

Please answer

now i am using IScriptManager for it. but i want to do this with a right solution.

Compiling CS3 plugins on Xcode 5 or 6

$
0
0

I read in other discussion threads that you can compile CS3-CS4 plugins (the samples to begin with) in Xcode 6 DP now released. What changes are needed in the version of the odfrc-cmd that comes with CS3 SDK? Can I use the compiler from CS5?

I always get the "..odfrc-cmd: Bad CPU type in executable" because it's a PowerPC binary and it can't be run in 10.8 or 10.9 due to their lack of support for this type of executables (rosetta).

Thanks for your tips!

IDML to INDD conversion

$
0
0

Is there any way programatically using Indesign SDK/any other tool to convert IDML XML archive to a binary INDD file?

 

yes ofcourse, IDML can be directly opened in indesign. I want to create IDML dynamically and present it as INDD.

 

Looking forward for some advice on this...

 

Thanks...

Compiling CS4 Plugin on OSX 10.6

$
0
0

I'm trying to compile the example plugin "BasicMenu.sdk" from the CS4 Product SDK on MAC OSX 10.6 and get the following errors

 

ProcessPCH++ build/SharedPrecompiledHeaders/Debug/PluginPrefix-exydmmemjwdofncaglhoxitwbokx/PluginPref ix.pch.gch ../../../source/precomp/gcc/PluginPrefix.pch normal i386 c++ com.apple.compilers.gcc.4_2
cd "/Adobe InDesign Products SDK CS4/build/mac/prj"
setenv LANG en_US.US-ASCII
/Developer/usr/bin/gcc-4.2 -x c++-header -arch i386 -fmessage-length=0 -pipe -Wno-trigraphs -fno-exceptions -fpascal-strings -fasm-blocks -O0 -Werror -Wmissing-prototypes -Wreturn-type -Woverloaded-virtual -Wmissing-braces -Wparentheses -Wunused-function -Wunused-label -Wunused-value -Wshadow -DMACINTOSH -DBIB_NO_THROW -DDEBUG -isysroot /Developer/SDKs/MacOSX10.6.sdk -fvisibility=hidden -fvisibility-inlines-hidden -fno-threadsafe-statics -Wno-deprecated-declarations -mmacosx-version-min=10.4 -gdwarf-2 "-I/Adobe InDesign Products SDK CS4/build/mac/prj/build/BasicMenu.sdk.build/Default/Debug.build/BasicMenu.sdk.hmap" -DMACTEL_SKIP -Wchar-subscripts -Wimplicit -Wsequence-point -Winit-self -Wmissing-field-initializers -Wpointer-arith -Wcast-align -Wpacked "-F/Adobe InDesign Products SDK CS4/build/mac/prj/../Debug/SDK" -F../debug/packagefolder/contents/macos -F../debug/packagefolder/contents/Frameworks "-I/Adobe InDesign Products SDK CS4/build/mac/prj/../Debug/SDK/include" -I/Developer/SDKs/MacOSX10.6.sdk/Developer/Headers/FlatCarbon -I../../../external/asl/boost_libraries -I../../../external/afl/includes -I../../../source/precomp/common -I../../../source/precomp/msvc -I../../../source/public/includes -I../../../source/public/interfaces/architecture -I../../../source/public/includes/utils -I../../../source/public/interfaces/utils -I../../../source/public/interfaces/xmedia -I../../../source/public/libs/widgetbin/includes -I../../../source/precomp/msvc -I../../../source/public/interfaces/xmedia -I../../../source/public/interfaces/ui -I../../../source/public/interfaces/tables -I../../../source/public/interfaces/text -I../../../source/public/interfaces/graphics -I../../../source/public/components/widgetbin/includes -I../../../source/public/interfaces/workgroup -I../../../source/public/interfaces/interactive -I../../../source/public/interfaces/interactive/ui -I../../../source/public/interfaces/colormgmt -I../../../source/public/interfaces/utils -I../../../source/public/interfaces/incopy -I../../../source/public/interfaces/layout -I../../../source/public/interfaces/architecture -I../../../source/public/interfaces/cjk -I../../../source/public/facades/graphics -I../../../source/public/facades/text -I../../../source/public/facades/layout -I../../../source/precomp/common -I../../../source/public/includes -I../../../source/public/components/publiclib/plugins -I../../../source/public/components/publiclib/files -I../../../source/public/components/publiclib/objectmodel -I../../../source/sdksamples/common -I../../../external/afl/includes "-I/Adobe InDesign Products SDK CS4/build/mac/prj/build/BasicMenu.sdk.build/Default/Debug.build/DerivedSources/i386" "-I/Adobe InDesign Products SDK CS4/build/mac/prj/build/BasicMenu.sdk.build/Default/Debug.build/DerivedSources" -c "/Adobe InDesign Products SDK CS4/build/mac/prj/../../../source/precomp/gcc/PluginPrefix.pch" -o "/Adobe InDesign Products SDK CS4/build/mac/prj/build/SharedPrecompiledHeaders/Debug/PluginPrefix-exydmmemjwdofncaglhox itwbokx/PluginPrefix.pch.gch"

 

In file included from /Adobe InDesign Products SDK CS4/build/mac/prj/../../../source/precomp/gcc/PluginPrefix.pch:40:
../../../source/public/includes/AnsiBasedTypes.h:38: error: conflicting declaration 'typedef long unsigned int uint32'
/Developer/SDKs/MacOSX10.6.sdk/System/Library/Frameworks/Security.framework/Headers/cssmco nfig.h:69: error: 'uint32' has a previous declaration as 'typedef uint32_t uint32'
In file included from ../../../source/public/includes/PMTypes.h:36,
                 from ../../../source/precomp/common/ShukHeaders.cp:41,
                 from /Adobe InDesign Products SDK CS4/build/mac/prj/../../../source/precomp/gcc/PluginPrefix.pch:41:
../../../source/public/includes/MSysType.h:215: error: 'EndpointRef' does not name a type
In file included from ../../../external/afl/includes/APathComponent.h:30,
                 from ../../../external/afl/includes/APath.h:30,
                 from ../../../external/afl/includes/AFile.h:31,
                 from ../../../source/public/includes/IDFile.h:34,
                 from ../../../source/public/interfaces/architecture/IDataBase.h:37,
                 from ../../../source/public/includes/InterfacePtr.h:76,
                 from ../../../source/precomp/common/ShukHeaders.cp:48,
                 from /Adobe InDesign Products SDK CS4/build/mac/prj/../../../source/precomp/gcc/PluginPrefix.pch:41:
../../../external/afl/includes/AString.h:51: error: explicit instantiation of 'class std::basic_string<char, std::char_traits<char>, adobe::afl::AFLAllocator<char> >' in namespace 'adobe::afl' (which does not enclose namespace 'std')
../../../external/afl/includes/AString.h:51: error: explicit instantiation of 'struct std::basic_string<char, std::char_traits<char>, adobe::afl::AFLAllocator<char> >::_Alloc_hider' in namespace 'adobe::afl' (which does not enclose namespace 'std')
../../../external/afl/includes/AString.h:51: error: explicit instantiation of 'struct std::basic_string<char, std::char_traits<char>, adobe::afl::AFLAllocator<char> >::_Rep' in namespace 'adobe::afl' (which does not enclose namespace 'std')
../../../external/afl/includes/AString.h:51: error: explicit instantiation of 'struct std::basic_string<char, std::char_traits<char>, adobe::afl::AFLAllocator<char> >::_Rep_base' in namespace 'adobe::afl' (which does not enclose namespace 'std')

 

Is there anything I have to change to make it work or is it not possible any more to compile CS4 plugins on OSX 10.6?

Thanks

Viewing all 78596 articles
Browse latest View live


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