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

Compile InDesign CC sdk sample by libc++ instead of libstdc++

$
0
0

Hi,

 

my project is integration between InDesign SDK CC & 3rd project

on Windows they are merged, build, run..... ok

on Mac, I'm using Mac os 10.8.5 & Xcode 5.0.2

InDesign SDK is using libstdc++ compiler.

3rd project is using libc++ compiler

I merged them and built on libc++ successfully, but when copy to InDesign to run then error EXC_BAD_ACCESS (code=2, address=0xxxxx) occur.

 

so anyone can guide me to run InDesign plug-in(compiled by libc++ instead of libstdc++)?

I also tried with sdlsample(PanelTreeView), compiled by libc++ instead of libstdc++ successfully, copy plug-in to InDesign and run it but error occurs.

 

Thanks


why FileUtils::CopyFile doesn't work with blank space?

$
0
0

Hi all,

If I have a destination directory with blank space inside, looks like: "C:\Users\Pattrick James\Documents" for Windows or "Macintosh HD:Users:Pattrick James:Documents" for Mac.

Then I want to copy a file to that directory, use FileUtils::CopyFile(src, des). Why it doesn't work?

Can someone please help me to resolve this issue without change my path?

how to replace a Frame level XML element without deleting the child XML elements?

$
0
0

how to replace a Frame level XML element without deleting the child XML elements?

I have a XML element on frame (say having tag name as 'Tag1'), and also there in inline XML elements on text inside frame (say having tag name as 'Tag2' and 'Tag3'). Please see below snapshot for details:

 


Untitled.png

 

Now I need to replace the XML tag on Frame1 with "Tag4". But if I try to delete and create a new element, all the Child element will get removed from it.

If I try to rename the Tag1 to some other Tag name, then it will also get renamed on Frame2.

 

So how can I change the XML element on Frame1 keeping the child Tags intact in the hierarchy??

We can do this in Indesign by clicking on Frame1 and selecting the New tag from Tag hierarchy, I need to know how we can do this using C++.

 

can some one suggest something?

InDesign can't load sample plug-in

$
0
0

Hy,

I posted the same question on StackOverflow, so this could seem a bit like cross posting, but I didn't know this forums existed, and I think I can't get a more qualified audiece to view my question here, so here I go:

It's my first expirience with Adobe SDK's, I'm using InDesign SDK to create my custom plug-in, but I can't even get the sample plug-ins to load into InDesign. I opened up some projects located in \Adobe InDesign CS6 Plugin SDK\build\win\prj, a couple of them I compiled with visual studio 2013 in x64 build configuration. After building succesfully the project i grabbed the \Adobe InDesign CS6 Plugin SDK\build\win\releasex64\sdk and moved the sdk folder to \Plug-Ins, but when I try to open InDesign I receive an error message telling me that:" InDesign could note laod the plugin, please try and reinstall it". I did but nothing happened. I then build some other projects with microsoft visual studio 2010 (as suggested by the getting started guide provided with the Adobe InDesign CS6 Plugin SDK), building them in release x86 configuration (x64 isn't possible with visual studio 2010) but I get the same exact problem... I have InDesign x64 version installed. Have you got some ideas on what is going on?

Need help opening a few files on InDesign (plugin help)

$
0
0

Trying to open up some files from flash drive on InDesign, it says "the document uses one or more plug-ins which are not currently available on this system" and then says "Cannot open...Please upgrade your plugins to latest version or upgrade to newest Adobe InDesign" Any help? Thank

Temporarily disable Assert Unusable in CS4

$
0
0
Dear all:
I added following to disable asset in CS4:
IPlugIn* GetPlugIn()
{
#ifdef _DEBUG
gLogAsserts = kFalse ;
gBreakOnAssert = kFalse;
#endif
return &gPlugIn;
}

but compiler report error that can't find the two indentifiers.
Is CS4 remove them or who can tell how can disable assert in CS4?

Thanks.

wxWidgets in a plugin?

$
0
0

Does anyone use wxWidgets from within their plugins?

 

I have a couple of dialogs that have already been coded using wxWidgets that I'd like to include in my plugin.

 

I setup wxWidgets to run the wxApp in embedded mode from within InDesign on the Mac but when I attempt to display the dialog, the cursor becomes a pinwheel and I can't interact with it.  Anyone have any clues?

 

I've done the exact same thing from a Carbon application and it works perfectly.

Calculating idml Transformation Matrix x y values

$
0
0

Hello all. I am doing some development of idml generation and have a calculation question about the Transformation Matrix.

 

My question relates to rotational matrix and the calculation of the x and y offsets when a rotation is requested.

In the idml specification manual an example is shown on page 80 where a box is transformed by 30 degrees.

 

 

ItemTransform="0.8660254037844387 -0.5000000000000001 0.5000000000000001 0.8660254037844387 158.46925639128065 15.415316289918337"

 

 

Help on how the last 2 values are calculated would be a great help.

Thanks and regards

Mark.


error R32: # Error: Could not open include file VCPlugInHeaders.h

$
0
0

Newbie to Indesign SDK. Help me to get rid out of this following error:

 

     error R32: # Error: Could not open include file VCPlugInHeaders.h

Like this it is listing 22 missing header files error.

 

VS .Net 2005

Indesign CS4

 

Regards,

Suresh

error R32762: # Error: Error looking for resource specification. Need 'resource' or 'type'

$
0
0

I have succesfully ported some of my developments to CS5. I have used the following procedure:

- create new project by using dollyX

- add source code

- fix the errors

 

But now I have encountered an error I can't figure out.

 

Error 1 error R32762: # Error: Error looking for resource specification.  Need 'resource' or 'type'. C:\Program Files\Adobe\CS5\InDesign Product SDK\source\public\interfaces\architecture\IPMUnknown.h 47

 

Any suggestions?

 

Im running a windows7 machine, visual studio 2008

Drop an URL on a InDesign document from a Flex panel

$
0
0

Hi Everyone,

 

I have a Flex panel, in InDesign, from which I drag an URL. If I drop this URL on a text editor or a web browser, it works. But when I try to drop it on my InDesign document, it's a little bit harder.

 

I have implemented a subclass of CDragDropTargetFlavorHelper. The drop works perfectly on Windows. But on mac, I have problems in the method CouldAcceptTypes :

 

DragDrop::TargetResponse

AutocatDNDCustomFlavorHelper::CouldAcceptTypes(constIDragDropTarget* target, DataObjectIterator* dataIter, constIDragDropSource* fromSource, constIDragDropController* controller) const

{

               if (0 != dataIter && 0 != target)

               {

 

            DataExchangeResponse response = dataIter->FlavorExistsWithPriorityInAllObjects(kURLDExternalFlavor);

                              if (response.CanDo())

                              {

           

            }

      }

}

 

The problem is that response.canDo() answers kTrue on Windows, but kFalse on Mac. I tried to explore the content of dataIter, but a call on dataIter->First() returns nil. I tried a controller->GetItemCount(), which returns 1. But if I try a controller->GetDragItem(1), I get a nil pointer. I have the impress there is no item.  Though, the drop works on another app than InDesign, as I said.

 

Is it a problem of internalization ? Or something else ? It let me dry.

 

Thanks in advance

indesign coordinates

$
0
0

Hi,

I'm writing a c++ application using  InDesign CS5.5.Which type of relationship between the textframe coordinate and spread coordinate.I have page's height, width and textframe's height , width. so what would be the formula for obtaining the x, y of texframe.please reply as soon as possible.

Thanks in advance.

How to run an external .exe file from an indesign pluging

$
0
0

Hi,

      Suppose if I have written an separate application in C++ (.exe file) & need to run it from an indesign pluging(as if a service in windows). have you provided that facilities in your SDK? if it's please let me know how to run an external .exe file from a indesign pluging.

 

Thanks,

How to create new page from master page and refer the previous page text frame ref id ?

$
0
0

I have problem to to apply/create item from master page and how to refer the previos page text frame to create page text

 

 

InterfacePtr<IPageSetupPrefs> iPageSetupPrefs(static_cast<IPageSetupPrefs *>(::QueryPreferences(IID_IPAGEPREFERENCES, docRef)));

                    if (iPageSetupPrefs == nil){

                              ASSERT(iPageSetupPrefs);

  break;

                    }

 

 

 

  InterfacePtr<ICommand> iNewPageCmd(CmdUtils::CreateCommand(kNewPageCmdBoss));

                    if (iNewPageCmd == nil){

                              ASSERT(iNewPageCmd);

  break;

                    }

 

  InterfacePtr<IApplyMasterCmdData> iApplyMasterCmdData( iNewPageCmd, IID_IAPPLYMASTERCMDDATA );

                    if (iApplyMasterCmdData == nil){

                              ASSERT(iPageCmdData);

  break;

                    }

 

  InterfacePtr<IPageCmdData> iPageCmdData(iNewPageCmd,UseDefaultIID());

                    if (iPageCmdData == nil){

                              ASSERT(iPageCmdData);

  break;

                    }

 

                    int32 numPagesToInsert = 1;

                    PMRect pageSizeRect = iPageSetupPrefs->GetPageSizePref();

 

 

                    int32 pos = iPageCmdData->GetNewPageInsertPosition();

 

                    InterfacePtr<IGeometry> iSpreadGeometry(spreadList->QueryNthSpread(0));

                    if (iSpreadGeometry == nil){

                              ASSERT(iSpreadGeometry);

  break;

                    }

                    spreadUIDRef = ::GetUIDRef(iSpreadGeometry);

 

                    PMRect dfltPMRectPageSize = iPageSetupPrefs->GetPageSizePref();

 

                    PMReal pageWidth = dfltPMRectPageSize.Right() - dfltPMRectPageSize.Left();

 

                    PMReal pageHeight = dfltPMRectPageSize.Bottom () - dfltPMRectPageSize.Top ();

 

 

                    PMRect usrDefPMRectPageSize(0, 0, pageWidth, pageHeight);

 

                    K2Vector< PMRect> pageBoundingBoxes;

                    for( int32 i = 0; i < numPagesToInsert; ++i){

                              pageBoundingBoxes.push_back( usrDefPMRectPageSize);

                    }

 

 

                    iPageCmdData->SetNewPageCmdData( spreadUIDRef, numPagesToInsert, pos+1, &pageBoundingBoxes, nil);

  //CreateSpreadFromSpread(docRef,spreadUIDRef);

 

  InterfacePtr<IBoolData> iBoolData(iNewPageCmd,UseDefaultIID());

                    if (iBoolData == nil){

                              ASSERT(iBoolData);

  break;

                    }

                    bool16          allowShuffle;

                    if (this->GetShufflePref(allowShuffle,docRef)==kFailure){

  break;

                    }

 

                    iBoolData->Set(allowShuffle);

 

                    CmdUtils::ProcessCommand(iNewPageCmd);

 

Above code, able to create a page but problem in apply master page?

Conversion Indesign (.indd) to pdf file

$
0
0

Is this possible to convert an indesign(.indd) to pdf file

 

If it is please let me how can i achive this..

 

please help me out.


Converting PMString to std::wstring in InDesign CS6

$
0
0

I'd have to get the filepath of a resource of the opened document to a std::wstring.

 

I can easily get the filepath of the resource as a PMString:

InterfacePtr< ILinkResource > pResource( GetDataBase( LinkManager ), ResourceUIDRef.GetUID(), UseDefaultIID() );

PMString ResourceFilepath = pResource->GetLongName( false );

 

The problem is that I'd have to convert the PMString to a std::wstring without losing any of the information. The path may contain special characters like Arabic or Chinese so just converting the string to a std::string with GetPlatformString() won't get the job done.

 

Should I even grab the PMString or should I just use WideString from GetLongName() and somehow get the conversion done for that? StringUtils has a ConvertWideStringToUTF8 but it also seems to give out std::string.

 

So to put the long story short: How to correctly convert PMString to std::wstring?

 

The plug-in will be used in Windows environment.

InDesign CC Mac: "Cannot open resource file" popup message when loading a Nib in my plugin

$
0
0

We have a fairly simple plug-in to InDesign, which we have been maintaining since the pre-CS days.  We’re porting it to CC now.  Everything is working on both Windows and Mac, with one problem.

 

The plug-in shows a File Save dialog, which is customized with a couple of extra controls to get additional information from the user about the file being exported.  As far as I know, there’s no way to do this with the InDesign SDK directly, so we do it with platform-specific code and resources.  On Windows, we do this by calling GetSaveFileName in the Windows API and setting a custom .rc resource and “hook” function with OFN_ENABLETEMPLATE and OFN_ENABLEHOOK.  On Mac, up until InDesign CC, we’ve been calling the Carbon function NavCreatePutFileDialog, with an old-style .r file and an event proc handling kNavCBCustomize et al.  This has all worked great for a long time.

 

However InDesign CC on Mac is 64-bit only, and Carbon won’t work with that.  So, we’ve taken the leap into Cocoa and implemented this with [NSSavePanel setAccessoryView:], where we load a custom NSView from a Nib embedded in our plug-in bundle.  And this works just fine too.  However, when the plug-in code calls [NSNib initWithNibNamed:bundle:], InDesign CC pops up an alert box saying, “Cannot open resource file.”  Yet, the resource (the Nib) is obviously being loaded just fine.  So the user has to dismiss this seemingly spurious alert box before being able to proceed.  Once the alert is dismissed, the NSSavePanel works fine, with our custom NSView.

 

I can tell that the popup alert is coming from InDesign itself, rather than from some underlying Mac subsystem such as Cocoa, because it has the title “Adobe InDesign” and the dark gray background like the rest of InDesign CC, and the OK button has an orange highlight around it.  It’s clearly not a standard Mac thing like an NSAlert.  And if I make the same calls to [NSSavePanel setAccessoryView:] et al in a standalone application, obviously no such popup is shown.

 

It seems that somehow our call to load the Nib file is triggering some kind of hook in InDesign.  My guess is that it’s a hook set up for InDesign to load its own resources, which is erroneously hooking into our plug-in’s functionality. 

 

I’ve tried both of the approaches to loading the Nib file listed here:

http://stackoverflow.com/a/5855561/3207828

And they both work, and the Nib is loaded, and we can get our NSView from it and use it in the NSSavePanel.  But whether we call  [NSNib initWithNibNamed:bundle:], or [NSViewController initWithNibName:bundle:], InDesign CC shows the message box as soon as the call to load the Nib is made.

 

Why is InDesign CC showing the “Cannot open resource file” message, and how can it be prevented?

 

Thanks,

Dan

Still waiting for InDesign Family SDK Access Program approval

$
0
0

Hi,

I requested InDesign Family SDK Access Program approval weeks ago and still haven't heard anything.

I'm in need of the CC2014 SDK and it's becoming increasingly urgent... how do you go about chasing this? There's a post that mentions messaging a guy on Twitter - is there a more official way?!

Thanks

Liz

Background Task Alert

$
0
0

I'm spawning my own threads to do some task. I monitor thread in the idle task at regular intervals, to see if the threads have been completed or not and get an update. Now my problem is,

I want to postpone Indesign quit until my task has been completed. I prevent a user from quitting by throwing a CAlert, which takes away control from my idle task.

 

My question is, is there a background task alert (as mention in programming guide ) on page 127  so that I can keep monitoring my threads and close the dialog once the process is complete?

"

Background threads cannot directly report to the user on progress, success, or errors. These are

presented in the Background Tasks panel. Also, an animation appears in the application bar when

background tasks are in progress, and a Background Task Alert might appear when a background task

needs to convey a message to the user.

"

Such a background task appears when a user tries to exit indesign and is self disposed when the task is complete like this. Is there any such API exposed to third party developers?

Reselection on TreeViewWidgets

$
0
0

Hi all,

 

lately I've been transforming all my listboxes to treeview-widgets - except for minor annoyances, things are going smoothly. One of those small things I'm trying to fix is allowing a reselection of a selected item. Listbox-attributes has a "NotifyOnReselect"-attribute, but i haven't found anything similar for treeview-widgets. Is there anything I'm missing? I'd really appreciate any hint or idea how to solve that issue.

 

Thanks in advance,

 

Bernt

Viewing all 78596 articles
Browse latest View live


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