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

How to change color (and/or font) of a TextWidget dynamically?

$
0
0
Hi!

I tried to find a answer to this question, but found nothing usefull...

I know I have to implement IUIColorSpec in the .fr file but how do I change the color in, let's say, MyObserver.cpp, at button press?

Let's be more specific:
I want to change the color of the current selected TextWidget inside a Listbox to red or green if I press a button. Is this possible? And how?

Thanks!

BIB_T_MT::CBIBError sometime after deleting text

$
0
0
I have a CS3 plug-in that allows the user to insert text that is highlighted with a character attribute defined by the plug-in. I need to be able to delete all occurrences of such text programmatically, which I do in a loop that finds each occurrence, gets the start position and the length of the run, and puts it in a RangeData which it passes to an ITextModelCmds::DeleteCmd.

The command executes without error, and I can continue processing with no problem, but when I reach the end of the loop (either via a continue statement or when I reach the "}" delineating the end of the loop) and try to step to the next instruction, I get a crash.

If I modify the range passed to the DeleteCmd such that one too few or one too many characters are deleted, I have no problem, but if I try to delete the number of characters I want to delete, I get a crash.

Here's what it says in the error window that Visual Sudio 2005 pops up: "Unhandled exception at 0x1e4eaa10 (MyPlugin.pln) in InDesign.exe: 0xC0000005: Access violation reading location 0xfeeeff06."

According to the Output window in Visual Sudio, I've got a BIB_T_MT::CBIBError, but I have no idea what that is or how to debug it. Can someone help? For reference, I've included the contents of the Output window below.

Thanks.

Bob

First-chance exception at 0x7630b09e in InDesign.exe: Microsoft C++ exception: BIB_T_MT::CBIBError at memory location 0x001269e8..
First-chance exception at 0x7630b09e in InDesign.exe: Microsoft C++ exception: [rethrow] at memory location 0x00000000..
First-chance exception at 0x7630b09e in InDesign.exe: Microsoft C++ exception: [rethrow] at memory location 0x00000000..
First-chance exception at 0x7630b09e in InDesign.exe: Microsoft C++ exception: [rethrow] at memory location 0x00000000..
First-chance exception at 0x7630b09e in InDesign.exe: Microsoft C++ exception: BIB_T_MT::CBIBError at memory location 0x0012638c..
First-chance exception at 0x7630b09e in InDesign.exe: Microsoft C++ exception: BIB_T_NMT::CBIBError at memory location 0x00128444..
First-chance exception at 0x7630b09e in InDesign.exe: Microsoft C++ exception: BIB_T_MT::CBIBError at memory location 0x001269bc..
First-chance exception at 0x7630b09e in InDesign.exe: Microsoft C++ exception: [rethrow] at memory location 0x00000000..
First-chance exception at 0x7630b09e in InDesign.exe: Microsoft C++ exception: [rethrow] at memory location 0x00000000..
First-chance exception at 0x7630b09e in InDesign.exe: Microsoft C++ exception: [rethrow] at memory location 0x00000000..
First-chance exception at 0x7630b09e in InDesign.exe: Microsoft C++ exception: BIB_T_MT::CBIBError at memory location 0x00126360..
First-chance exception at 0x7630b09e in InDesign.exe: Microsoft C++ exception: BIB_T_NMT::CBIBError at memory location 0x00128418..
First-chance exception at 0x7630b09e in InDesign.exe: Microsoft C++ exception: BIB_T_MT::CBIBError at memory location 0x001269bc..
First-chance exception at 0x7630b09e in InDesign.exe: Microsoft C++ exception: [rethrow] at memory location 0x00000000..
First-chance exception at 0x7630b09e in InDesign.exe: Microsoft C++ exception: [rethrow] at memory location 0x00000000..
First-chance exception at 0x7630b09e in InDesign.exe: Microsoft C++ exception: [rethrow] at memory location 0x00000000..
First-chance exception at 0x7630b09e in InDesign.exe: Microsoft C++ exception: BIB_T_MT::CBIBError at memory location 0x00126360..
First-chance exception at 0x7630b09e in InDesign.exe: Microsoft C++ exception: BIB_T_NMT::CBIBError at memory location 0x00128418..
First-chance exception at 0x1e4eaa10 (MyPlugin.pln) in InDesign.exe: 0xC0000005: Access violation reading location 0xfeeeff06.
Unhandled exception at 0x1e4eaa10 (MyPlugin.pln) in InDesign.exe: 0xC0000005: Access violation reading location 0xfeeeff06.

[ID CS2 MAC]crash of ID during placed EPS without preview

$
0
0
Hi,
has somebody encounter problem with placing EPS without preview into frame?
If you run ID CS2 on MAC (intel MAC in my case) from terminal you could see outputs from ID like this:

Adobe InDesign CS2(602,0xa000eca0) malloc: *** vm_allocate(size=184320) failed (error code=3)
Adobe InDesign CS2(602,0xa000eca0) malloc: *** error: can't allocate region
Adobe InDesign CS2(602,0xa000eca0) malloc: *** set a breakpoint in szone_error to debug


I thought that there was something wrong with my plugin but then I tried placed that EPS without preview manually and without my plugin but with the same result.

ID is unstable after that message.

//pyso

Indesign CS5 plugin not dectecting valid extension

$
0
0

I wrote a plugin for Indeisign CS4 with Visual Studio 2008. I then ported the code successfully to Inesign CS3.

 

Everything is working. Yes, it is possible to develop Indesign CS3 and CS4 Plugins with visual studio 2008 whitout any problem!

 

But then i ported the code to CS5. The code for CS is compiling successfully but when i start Indesign it alerts "adobe indesign does not recognize the xy.pln as valid plug-in. Please reinstall xy.pln."

 

The same happens whit CS5 SDK samples i compile and copy to the plugin folder or link over the reference folder in users windows profile.

 

This may be an IDE setting...

 

Any suggestions?

How can I add an adornment to a table model?

$
0
0

Hi

 

- Is it possible to add an adornment to a table model?

-  If yes how can I do that? Interface? Sample?

 

Thanks for any hint

Hans

Can't find IID_IAPPSTARTUPSHUTDOWN in CS5

$
0
0

Hi,

 

I've been searching for a while why my .fr could not compile since I'd try to add a startup/shutdown service, adding

 

Class
{
kMyStartupShutdownBoss,
kInvalidClass,
{
    IID_IAPPSTARTUPSHUTDOWN, kMyStartupShutdownImpl,
    IID_IK2SERVICEPROVIDER, kCStartupShutdownProviderImpl,
}
}

 

as documentation said.

 

ODFRC had a problem, it didn't find IID_IAPPSTARTUPSHUTDOWN...

 

I've finally discovered it has been changed for IID_ISTARTUPSHUTDOWN (maybe due do multi-threading) but documentation is obsolete.

 

HTH,

 

J.

How to highlight text of the TextFrame

$
0
0

Hi,

 

I want to know how to highlight text of the textframe as spell checking of Indesign does. When performing the spell check in InDesign it's hightlights the current text.

How could I do this same for the text in textFrame. Which class is responsible for this. Is its related with the text focus or something else.

 

Thanks!

How to know the name of paragraph style group being deleted from InDesign?

$
0
0

Hi.

 

I am working on a plugin and need to know the name of paragraph style group being deleted from InDesign.

 

I have implemented a document observer and attached IID_IPARASTYLEGROUPMANAGER. With this I can get the notification whenever any paragraph style group is deleted. The value of "theChange" is kDeleteParaStyleGroupCmdBoss.

 

Now i tried to get the pointer to IUIDData for this command but I got Null pointer. This must be because the group has already been deleted by then.

 

Is there any way to get the name of style group when it is deleted?


How use SDK to insert text in indesign using c++

$
0
0

 

Hello All

 

I want to  use Indesign CS5.5 SDK  in my  c++ project first to create Indesign Document then insert text in textframe.

How include SDK in my project ?

Is it right method to create indesign Application using SDK.

 

#include "IApplication.h"

#include "ISession.h"

# include "IDocumentCommands.h"

 

virtual IApplication *  QueryApplication()=0 ;

ISession *  GetExecutionContextSession();

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

 

It required so many .h file, first I copy .h file from SDK and put in Project directory but it give some error after including these .h file in project.

There are so many directory(source,build,docs, etc.) in SDK.How include and use this SDK in my project to create Indesign Document.

How include so many  .h file in my project ?

I have already included SDK path in VisualStudio2008 ->Tools->Option->ProjectSolutions->vc++Directories

 

Thanks.

Strange behavior of kMoveStoryRangeCmdBoss and kCopyStoryRangeCmdBoss

$
0
0

Hi All,

 

I use ITextUtils::QueryMoveStoryCommand with ignoreAttributes = kFalse to move text between text frames, while preserving text formating.

But there were some cases when  text formatting was not preserved. I have tryed ITextUtils::QueryCopyStoryCommand on these frames and everything worked ok.

 

Any help will be of great value!

 

Regards,

Oleg

InDesign cs6 document created alias

$
0
0

Dear Friends,

 

When i working in Indesign CS6 some times created "Alias" in working document. Kindly suggest how to avoid in this problem.

 

Please see below the "File handling" option in my indesign preference. Kindly advice.

 

Screen shot 2014-06-13 at 2.25.22 PM.png

 

Thanks in advance,

Kanaga kumar. k

Error while reading indesign(.indd) file through COM object in c#

$
0
0

I want to read InDesign(.indd) file in c#. I have installed adobe InDesignCS6.

I have added COM reference of 'Adobe InDesign CS6 Type Library' in my c# application.

Code snippet is as follows.

 

        [STAThread]

        static void Main(string[] args)

        {

            InDesign.Application app = (InDesign.Application)COMCreateObject("InDesign.Application");

            Document doc = app.ActiveDocument;

            Page page = doc.Pages[1];

            TextFrame frame = page.TextFrames[1];

            Console.WriteLine(frame.Contents.ToString());

        }

 

        public static object COMCreateObject(string sProgID)

        {

            // We get the type using just the ProgID

            Type oType = Type.GetTypeFromProgID(sProgID);

            if (oType != null)

            {

                return Activator.CreateInstance(oType);

            }

 

            return null;

        }

 

But the first line itself throwing an following error while type casting output of COMCreateObject method into InDesign.Application type.

 

Error :

Unable to cast COM object of type 'System.__ComObject' to interface type 'InDesign.Application'. This operation failed because the QueryInterface call on the COM component for the interface with IID '{ABD4CBB2-0CFE-11D1-801D-0060B03C02E4}' failed due to the following error: No such interface supported (Exception from HRESULT: 0x80004002 (E_NOINTERFACE)).

 

Kindly help me. Its urgent.

Where can download Indesign CC SDK

$
0
0

Hi everyone,

 

I'm really disappointment with adobe tech support team

waste day-long for chating & calling but they don't know where can download InDesign CC SDK for plug-in development.

many support staff of adobe can't determine the difference between InDesign CC product & InDesign CC SDK and InDesign CS & InDesign CC when send me the link to download is CS version.

also my account(calvin.nguyen@niteco.se) is partner Development and paid money for adobe but can't login to this forum but can login by free-account(trung,vu@niteco.se).

According to the InDesign Developer Center | Adobe Developer Connection then CC SDK is moved to https://prerelease.adobe.com/

to download CC SDK I have to register information and wait 2 days, but I registered over 2day and now I can't access to https://prerelease.adobe.com/ at section "InDesign SDK Access Program"
for CC SDK download.

when I bing all this information to ask Tech support team then they don't known about this process !!!! disappointment!

 

So anyone can let me known where can download InDesign CC SDK??

anyone on the forum, if keeping InDesign CC SDK pls give me a copy, thanks so much

 

Thanks

Error : Library not found for -lc++

$
0
0

Hi,

 

We have run our CS6 plugins in Xcode 6.1 version. I am getting the below mentioned error

 

Apple Mach-O Linker (Id) Error

Id: Library not found for -lc++

clang:error:linker command failed with exit code 1(use -v to see invocation)

 

Please help us if anyone has idea regarding this.

 

Thanks

Suganthi B

java.io.FileNotFoundException access denied

$
0
0

Windows 7 sp(current)

InDesign SDK - just downloaded and installed, set path and environment var, installed Apache Ant, and JSE - OK!

When I run package.bat -i file.idml, it creates a directory (_idmltools_temp_dir_1105289130008938886_) in the same directory from which the package.bat file runs (good), and expands the first level file.idml items into that directory (good), but fails to expand the contents of the XML directory with an message:

java.io.FileNotFoundException: FullPathTo the _idmltools_temp_dir_1105289130008938886_\XML directory (access denied).

When I look at the properties of the newly created XML folder Read Only (applies only to files in folder) is checked.

So the package inspector is running, but failing on OS privileges assigned to a folder it creates. (bad)

How do I get beyond this to use idmltools.jar to validate my idml package?

Thanks for your help!


testing inDesign CC 2015 with c# : InvalidCastException error

$
0
0

Hi

I try to use testing inDesign CC 2015 version with this C# asp.net code

 

protected void Page_Load(object sender, EventArgs e)

{

     InDesign.Application app = (InDesign.Application)COMCreateObject("InDesign.Application");

 

     // other code

     ...

}

 

public static object COMCreateObject(string sProgID)

{

     Type oType = Type.GetTypeFromProgID(sProgID);

     if (oType != null)

     {

          return Activator.CreateInstance(oType);

     }

 

     return null;

}

 

When i run this, i receive an InvalidCastException

I try some of different cast sequence but the result is always the same, i can't recover the com object.

InDesign was launch succefully, the object was create, but i can't use it.

 

I search on different topic and forum, try lot of solution but none of them work.

 

Any help?

 

ps : sorry for my bad english, i am french (no, no, don't throw stone at me )

 

Nymau

Shared Libraries Example

$
0
0

Hi

 

Chapter 7 of the Javascript tools guide talks about using external shared libraries.

Direct access to library calls through the ExternalObject instance — Use the direct-access style

for C-language libraries. For each function defined in the C library, there is a corresponding method in

the ExternalObject object. You can pass data to these methods and receive the return value directly.

For example:

mylib = new ExternalObject ("lib:" + samplelib); // load the library

It also states

"Indirect access to library calls through JavaScript classes — Use the indirect style to access classes defined in a C++ library. For each C++ class defined in the library, a corresponding JavaScript class is automatically defined, and you can access the properties and methods through an instance of that

class."

 

Does anyone have a sample (source code) of an external library preferably both for direct and indirect access that can be access using the new ExternalObject ("lib:" + samplelib); method?

 

TIA

 

Trevor

InDesign SDK Plug-in development on Mac OS X Sierra (10.12)

$
0
0

I have been developing InDesign plug-ins for many years using XCode 5.0.2 as recommended, but had stopped upgrading at CC2014, leaving my Mac at OS X Mountain Lion (10.8.5).  We have now decided to push forward with CC2015 and CC2017.  I understand that XCode 5.0.2 is still the recommended development platform, but I cannot get it to run on new Macs running either Sierra or El Capitan (10.11).

 

What is the current modern set of software to use with newer Macs? 

 

Has anyone discovered a solution to use either XCode 5.0.2 on OS X 10.11 or 10.12?

 

How about using XCode 8.3 to compile plug-ins?

 

If none of those ideas work, has anyone discovered a solution to use some other version of XCode which is compatible with OS X 10.11 or 10.12?

 

Thanks for your help.

[CS3 Mac]: Loading of plugin fails?

$
0
0
Hello!

I have a plugin.

The build process with XCode succeeds.

But when the plugin is loaded in Adobe InDesign CS3 Debug there are coming two error messages:
"CFBundleLoadExecutable failed for plugin ..."
"GetPlugIn returned nil for plugin ..."

My system:
Mac OS X 10.5.4
XCode 3.0
Adobe InDesign Debug Version 5.0.3

My question:
How can I find out more why the loading of the plugin fails?

Thanks,
Alois Blaimer

PDF export: spread as single page

$
0
0
Hi,<br /><br />I'm doing an export of some (or all) pages of a document to a PDF file.<br />There is an option to put each InDesign spread to a single PDF page, but unfortunately it doesn't work.<br /><br />My code:<br />InterfacePtr<ICommand> piPDFExportCmd(CmdUtils::CreateCommand(kPDFExportCmdBoss));<br /><br />InterfacePtr<IPDFExportPrefs> piPDFExportPrefs(piPDFExportCmd, UseDefaultIID());<br />piPDFExportPrefs->SetPDFExReaderSpreads(printSpreads);<br />piPDFExportPrefs->SetPDFExCompressColorImages(pdfKomprimierung);<br />piPDFExportPrefs->SetPDFExColorSpace(pdfFarbraum);<br /><br />InterfacePtr<ISysFileData> piFileData(piPDFExportCmd, UseDefaultIID());<br />piFileData->Set(pdfFile);<br />UIDList pageUIDList(documentUIDRef.GetDataBase());<br />for (int32 i = vonSeite; i < bisSeite; i++)<br />{<br />     UID uidPage = pageList->GetNthPageUID(i);<br />     pageUIDList.Append(uidPage);<br />}<br />InterfacePtr<IOutputPages> piOutputPages(piPDFExportCmd, UseDefaultIID());<br />piOutputPages->InitializeFrom(pageUIDList, kFalse);<br />CmdUtils::ProcessCommand(piPDFExportCmd);<br /><br />It is the "SetPDFExReaderSpreads" that does not take any effect on the created PDF file, there is always a single PDF page for each InDesign page.<br />If doing the export manually within InDesign it works correct.<br />Any ideas what I'm doing wrong here ?<br /><br />Thanks, Daniel
Viewing all 78596 articles
Browse latest View live


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