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

How do I make a page item transparent?

$
0
0
I want to be able to set the opacity on a specified page item. I've tried two approaches, but one of them won't compile and the other gives me link errors.<br /><br />Can anyone tell me why I'm getting these errors? And does anyone know of a way to set transparency? (BTW, I can't use a suite since the page item won't be selected.)<br /><br />Thanks.<br /><br />Bob<br /><br />Approach 1:<br /><br />  // This statement causes the following error in InterfacePtr.h(442):<br />  // error C2440: 'static_cast' : cannot convert from 'IPMUnknown *' <br />  //    to 'IGraphicStyleAttributeBossList *'<br />  InterfacePtr<IGraphicStyleAttributeBossList><br />    attrList(uidRef, IID_IGRAPHICSTYLE_OVERRIDES);<br /><br />  ASSERT(attrList);<br />  Utils<IXPAttributeUtils>()->AddBasicOpacityAttribute(0, attrList);<br />  UIDList items(uidRef);<br />  ErrorCode ec =<br />    Utils<IXPAttributeUtils>()->ApplyBasicTransparencyToPageItems(<br />      attrList, (const UIDList) items);<br /><br />Approach 2:<br /><br />  // This statement causes an unresolved external symbol link error for<br />  // DoCleanup()<br />  IXPAttributeSuite::AttributeList myList;<br /><br />  // This statement causes an unresolved external symbol link error for<br />  // push_back()<br />  myList.push_back(<br />    IXPAttributeSuite::AttributeTypeAndValue(<br />      IXPAttributeSuite::kBSOpacity,<br />      IXPAttributeSuite::AttributeValue(PMReal(0))<br />    )<br />  );<br /><br />  ErrorCode ec =<br />    Utils<IXPAttributeUtils>()->ApplyAttributesToPageItems(<br />      myList, UIDList(uidRef));

How to Add values to dropdown list in runtime

$
0
0
Hi All

I wanted to add the items to the dropdown list in the plugin.

The SDK Example WriteFishPrice shows the items are hard coded in the .fr file.

i am looking for a similar concept, but not adding the items in the .fr file, i wanted to add the items in the .cpp or .h files and add the items to the dropdownlist.

DECLARE_PMID(kWidgetIDSpace, kWFPDropDownListWidgetID, kWFPPrefix + 2)
The declaration is done in WFPID.h file

#define kWFPDropDownItem_1Key kWFPStringPrefix "kWFPDropDownItem_1Key"

defining the string is done in WFPID.h

I wanted to add the items in the same header file, is there any way that i can add the items in the header files instead of adding in .fr file

Please guide me

Thank you

-Srinivas

Native Modal Dialogs?

$
0
0
Hi,

I have existing UI code that is written against a generic UI framework (wxWidgets), but essentially uses platform-native UI frameworks. For many reasons I don't want to recreate the same UI using InDesign widgets and resources.

I can run the code, it basically works, and I can bring up "half" modal dialogs. BUT I do have some event issues because I don't know how to make my dialog truly modal. Panels and Toolbars are still active when my dialog is up, and so they can (and do) cause a lot of trouble - including crashes during and after the dialog display.

So my question basically is: How can I run native dialogs (be it wxWidgets, MFC, or Carbon) from within an InDesign plugin? This surely must be supported somehow?

Thanks for any pointers in the right direction!
Bernd

Sub Menu position at File menu

$
0
0
Hello,

I am facing problem with positioning of the menu which is under file menu option. Its like

File Menu -> Temp1(position:Below PDF Preset or above Export),Which contain sub menu say Temp2.

On click of "Temp2" menu Dialog open.

I had try with setting Path as
#define kTempMenuPath1 "Main:&File:&Temp1"

Menu Def =

kTempActionID,
kTempMenuPath1,
100,
kSDKDefIsNotDynamicMenuFlag,

Action Def =

kTempActionID,
"Temp2",
kOtherActionArea,
kNormalAction,
kDisableIfLowMem,
kInvalidInterfaceID,
kSDKDefVisibleInKBSCEditorFlag,

I am able to create Menu and its Sub menu. But problem with Position, Below PDF Preset or above Export.

Thanks in advance.

InDesign at the Adobe Creative Suite Developer Summit

$
0
0

You may have already heard about the Adobe Creative Suite Developer Summit, but there are several classes that appeal directly to this forum, and that you'll find interesting. I've listed some of them below.

 

Attending the developer summit is easy. You can either attend on-line, or in person. Dates are May 3rd - 6th, 2010 in Seattle Washington. Attendance is free, all you need to cover is your transportation, hotels, and meals.

 

 

If you are going to attend in person, please register here

 

For more details on the conference, go here

 

Interesting classes related to InDesign include:

 

 

Please contact me if you have any questions: mnr@adobe.com

mnr

How to add menu-item inside the menu of another plugin menu

$
0
0

Hello All,

 

I have two plugins which is having a menu with same name.

When I load both the plugins I get two menus created with same name on main menu bar.

I want both the plugins menu items to be displayed under one single menu name.

Is there a way to do this?

Thanks in advance :-)

 

Regards

Madhu

ITOCCmdData problem in TOC Creation

$
0
0

       InterfacePtr<ICommand> myTOCCmd(CmdUtils::CreateCommand(kCreateTOCCmdBoss));
        myTOCCmd->SetItemList(UIDList(myDocRef.GetUID()));
        InterfacePtr<ITOCCmdData> myTOCCmdData(myTOCCmd, IID_ITOCCMDDATA);
        myTOCCmdData->SetTextModelUIDRef(outputTOCStoryUIDRef);
        myTOCCmdData->SetTargetItem(myDocRef);
        myTOCCmdData->SetIncludeOversetFlag(kTrue);
        myTOCCmdData->SetTOCStyleName(PMString("SandT"));
        myTOCCmdData->SetReplaceExistingTOCFlag(kTrue);
        if (CmdUtils::ProcessCommand(myTOCCmd) != kSuccess) {
            CAlert::InformationAlert("Process Command Failed!");
            break;
        }
        else
        {
            CAlert::InformationAlert("Process Command Succeeded!");
        }

Hi, in the above code, CmdUtils::ProcessCommand returns kFailure.

Here, myDocRef refers to the current document in indesign application.

outputTOCStoryUIDRef refers the story UIDRef of current document, where the TOC should be generated.

Would be much helpful if someone helps me in this regard??

 

Best Regards,

[CS3] Menu Path

$
0
0

Hi all,

 

I want to add a menu item in assignment panel right click menu list at 0 position.

 

I am not able to find path for this.

 

Please give me menu path of assignment panel right click menu.

 

 

Thanks,

Aman Alam


Adding std::map or vector type property to object

$
0
0

Hi Friends,

 

I want to add either map or vector type property to my object in c++ code.

So that I can accessed this property from flex side.

 

Regards,

 

Sameer

How to obtain coordinates of each point in a polygon?

$
0
0

How can we obtain the coordinates of each point in a polygon (say 6 sides)?

Using pageitemref I had used GetPathBoundingBox method of IGeometry to get a PMRect as follows:

InterfacePtr<IGeometry> geometry(pageitemRef, UseDefaultIID());

geometry->GetPathBoundingBox(::InnerToPasteboardMatrix(geometry));

 

I am only able to get the leftTop, rightTop, etc. of the frame that contains the polygon.

How to obtain the coordinates of each point in a polygon?

external Loading of joboptions file

$
0
0

HI All,

 

I would like to use joboptions file in PDF export from Indesign via plugin.

I do not want to load it into Indesign, just want to use it for export.

I hope that one of you has experience with the external loading of .joboptions

 

Help me in finding the solution

 

Regards,

Alam

Fonts are not updating in InDesign instantly

$
0
0

Hi,

 

I am working on InDesign 5.5 plugin, which is used to handle missing fonts of document. It Displays a List of missing fonts  in a dialog box and user can Activate the missing font.

 

If user opens a document, which contains missing fonts, then InDesign throws the missing font Information in a Dialog box(Default, provided by In Design).In my plugin,  On opening the document, I fetch the missing font info and activate the missing font (I am doing this work before opening document by using kBeforeCloseDocSignalResponderService signal). But still InDesign shows the missing font Dialog Box on opening the document  however I already activated the missing fonts. I am not getting the reason of why InDesign is behaving like this?

 

If I put a Alert message(with ‘OK’ button) just after activating the font and before opening the document,  Then document is opening properly(without default Missing font info Dialog Box). It means this is behaving correctly. I am not getting why this Alert message is creating a difference. I need this functionality without using any extra alert message

 

Regards,

Harsh

How do I get Texts in a .indd file to a wordpad

$
0
0

I'm running CS6 & developing a pluging for that.

 

Currently I'm reading texts written in a .indd file & print them to a text file using ITextModelClass..

But I can't read texts written as TextVariable & I tried to convert them to strings using

 

ITextVariable*  textVariable,

textVariable->VariableToString(varUIDRef, temp, kTrue);

 

when i run the above code, it returns texts that are not relevant to the current .indd file.

 

when i use "kFalse" instead of kTrue it gives a runtime error & return nothing.

 

So how can i convert "TextVariable " to a readable text.

 

Thanks..

Indesign CC SDK

$
0
0

Hello,

 

Where will I find Indesign CC SDK? Whether Indesign CS6 plugins are compatible to indesign cc?

 

Thanks.

Support languages for Indesign plug-in SDK?

$
0
0

I would like to know what languages you support for adobe indisgn plug-in SDK.

I hope that it allows a lot more languages than knew.

 

I have reported that you only support belows.

Roman, Codepage 1252 

Japanese, Codepage 932 

TradChinese, Codepage 950 

Korean, Codepage 949 

Arabic, Codepage 1256 

Hebrew, Codepage 1255 

Greek, Codepage 1253 

Cyrillic, Codepage 1251 

Thai, Codepage 874

SimpChinese, Codepage 936 

CentralEuroRoman, Codepage 1250 

Vietnamese, Codepage 1258  


How to enable the widgets in Indesign CC..?

$
0
0

Hi,

 

I am working on porting our Indesign CS6 plugin to Indesign CC plugin.I have completed the porting and the plugins has opened in Indesign CC,but i have one problem in design. Three of our Widgets has not opened in Indesign CC.

 

The code is the following,

 

.fr file

 

resource SampleDialogWidget (kSDKDefDialogResourceID + index_enUS)

{

          __FILE__, __LINE__,

          kSampleDialogWidgetID,                    // WidgetID

          kPMRsrcID_None,                                        // RsrcID

          kBindNone,                                                  // Binding

          0, 0, 700,400,                                        // Frame (l,t,r,b)

          kTrue, kTrue,                                        // Visible, Enabled

          kSampleDialogTitleKey,                    // Dialog name

          {

          //<FREDDYWIDGETDEFLISTUS>

 

SamplePrefListBox

                    (

                              SamplePreflistboxWidgetID,

                              kSysOwnerDrawListBoxPMRsrcId,                                                            // WidgetId, RsrcId

                              kBindAll,                                                                                                              // Frame binding

                              Frame(15,15,170,360)                                                                                // Frame

                              kTrue, kTrue,                                                                                                    // Visible, Enabled

                              1,0,                                                                                                                        // List dimensions

                              19,                                                                                                                                  // Cell height

                              1,                                                                                                                                  // Border width

                              kFalse,kTrue,                                                                                                    // Has scroll bar (h,v)

                              kTrue,                                                                                                                        // Multiselection

                              kTrue,                                                                                                                        // List items can be reordered

                              kTrue,                                                                                                                        // Draggable to new/delete buttons

                              kTrue,                                                                                                                        // Drag/Dropable to other windows

                              kTrue,                                                                                                                        // An item always has to be selected

                              kFalse,                                                                                                                        // Don't notify on reselect

                              kSamplePrefListElementRsrcID                                                                      // Fill list box with widgets with this ID (default is 0)

                              {

                                        CellPanelWidget

                                        (

                                                  kCellPanelWidgetID, kPMRsrcID_None,                              // WidgetId, RsrcId

                                                  kBindAll,                                                                                          // Frame binding

                                                  Frame(-1,1,154,340)                    // Frame

                                                  kTrue, kTrue                                                                                // Visible, Enabled

                                                  {

                                                            // ----- This is the CPanelControlData that holds the widgets

                                                            //                     that are items in the list box. They are not persistent

                                                            //

 

                                                  }

                                        ) 

                              },

                    ),

 

 

                    GenericPanelWithBorderWidget

                    (

                SamplePrefGeneralTabWidgetID, kPMRsrcID_None,

                              kBindBottom |kBindRight,

                              Frame(175,10,695,360)                    // Frame

                              kTrue, kTrue,

                              "",

                              {

 

                    StaticTextWidget

                    (

                              kInvalidWidgetID,                                                                                // WidgetId (default=0)

                              kSysStaticTextPMRsrcId,                    // RsrcId

                              kBindNone,                                                            // Frame binding

                              10, 15, 138, 35,                                                  // Frame: left, top, right, bottom.

                              kTrue, kTrue,                                                  // Visible, Enabled

                              kAlignLeft, kEllipsizeEnd,kTrue,                    // Alignment, ellipsize style

                              kSamplePrefProjectPathStringKey,                    // Initial text.

                              kSamplePrefProjectPathTextEditBoxWidgetID          // No associated widget

                    ),

 

 

                    // TextEditBox Widget resource

                    TextEditBoxWidget

                    (

                    kSamplePrefProjectPathTextEditBoxWidgetID, // WidgetId

                    kSysEditBoxPMRsrcId, // RsrcId

                    kBindNone, // Frame binding

                    Frame(140, 15, 420, 35), // Frame (l,t,r,b)

                    kTrue, kTrue // Visible, Enabled

                    0, // Widget id of nudge button (0 so we dont get one)

                    0, 0,// small,large nudge amount

                    0, // max num chars(0 = no limit)

                    kFalse,// is read only

                    kFalse,// should notify each key stroke

                    kFalse,// range checking enabled

                    kFalse,// blank entry allowed

                    0, // Upper bounds

                    0, // Lower bounds

                    "", // Initial text

                    ),

 

                    ButtonWidget

                    (

                              kSampleChooseProjectButtonWidgetID,

                              kSysButtonPMRsrcId,

                              kBindNone,

                              430, 15, 500, 35,

                              kTrue, kTrue,

                              kSampleChooseBtnStringKey,

                    ),

 

GenericPanelWithBorderWidget

                    (

                              SamplePrefFittingTabWidgetID, kPMRsrcID_None,

                              kBindBottom |kBindRight,

                              Frame(175,10,695,360)                    // Frame

                              kTrue, kTrue,

                              "",

                              {

 

                              StaticTextWidget

                                        (

                                                  kInvalidWidgetID,                    // WidgetId

                                                  kSysStaticTextPMRsrcId,                    // RsrcId

                                                  kBindNone,                              // Frame binding

                                                  Frame( 10,15,300,35  ),          // Frame (l,t,r,b)

                                                  kTrue, kTrue, kAlignLeft,          // Visible, Enabled, Alignment

                                                  kDontEllipsize,kTrue,                              //**new element in InDesign 2.0: don't add any ellipses

                                                  "Drag/Drop Operation",                     // Text

                                                  0// WidgetId for associated control for shortcut focus

                                        ),

 

                                        SeparatorWidget

                                        (

                                                  0,

                                                  kPMRsrcID_None,

                                                  kBindNone,

                                                  Frame(10,37,450,38),

                                                  kTrue,kTrue,

                                        ),

 

                                        StaticTextWidget

                                        (

                                                  0,                    // WidgetId

                                                  kSysStaticTextPMRsrcId,                    // RsrcId

                                                  kBindNone,                              // Frame binding

                                                  Frame( 10, 40, 250, 60  ),          // Frame (l,t,r,b)

                                                  kTrue, kTrue, kAlignLeft,          // Visible, Enabled, Alignment

                                                  kDontEllipsize,kTrue,                              //**new element in InDesign 2.0: don't add any ellipses

                                                  kSampleTextOptionsTextKey,                     // Text

                                                  0                    // WidgetId for associated control for shortcut focus

                                        ),

 

                                        CheckBoxWidget

                                        (

                                                  kSampleTextFitCheckBoxWidgetID,                    // WidgetId

                                                  kSysCheckBoxPMRsrcId,                              // RsrcId

                                                  kBindNone,

                                                  Frame(150, 40, 350, 60) //  left, top, right, bottom

                                                  kTrue,                                                                      // Visible

                                                  kTrue,                                                                      // Enabled

                                                  kAlignLeft,                                                            // Alignment

                                                  kSampleTextFitChkBoxTextKey                    // Initial text

                                        ),

 

GenericPanelWithBorderWidget

                    (

                              SamplePrefScriptEventsTabWidgetID, kPMRsrcID_None,

                              kBindBottom |kBindRight,

                              Frame(175,10,695,360)                    // Frame

                              kTrue, kTrue,

                              "",

                              {

 

                                        StaticTextWidget

                                        (

                                                  0,                                                                                // WidgetId (default=0)

                                                  kSysStaticTextPMRsrcId,                    // RsrcId

                                                  kBindNone,                                                            // Frame binding

                                                  10, 10, 200, 30,                                                  // Frame: left, top, right, bottom.

                                                  kTrue, kTrue,                                                  // Visible, Enabled

                                                  kAlignLeft, kEllipsizeEnd,kTrue,                    // Alignment, ellipsize style

                                                  kSampleDropDownEventsTextKey,                    // Initial text.

                                                  0                    // No associated widget

                                        ),

 

SamplePrefListBox

                                        (

                                                   SamplePrefDragDropScriptlistboxWidgetID, kSysOwnerDrawListBoxPMRsrcId,          // WidgetId, RsrcId

                                                  kBindAll,                                                                                                              // Frame binding

                                                  Frame(10, 35, 200, 120)                                                                                          // Frame

                                                  kTrue, kTrue,                                                                                                    // Visible, Enabled

                                                  1,0,                                                                                                                        // List dimensions

                                                  19,                                                                                                                                   // Cell height

                                                  1,                                                                                                                                   // Border width

                                                  kFalse,kTrue,                                                                                                    // Has scroll bar (h,v)

                                                  kTrue,                                                                                                                         // Multiselection

                                                  kTrue,                                                                                                                         // List items can be reordered

                                                  kTrue,                                                                                                                         // Draggable to new/delete buttons

                                                  kFalse,                                                                                                                         // Drag/Dropable to other windows

                                                  kTrue,                                                                                                                         // An item always has to be selected

                                                  kFalse,                                                                                                                         // Don't notify on reselect

                                                  k SamplePrefListElementRsrcID                                                                      // Fill list box with widgets with this ID (default is 0)

                                                  {

                                                            CellPanelWidget

                                                            (

                                                                      kCellPanelWidgetID, kPMRsrcID_None,                              // WidgetId, RsrcId

                                                                      kBindAll,                                                                                          // Frame binding

                                                                      Frame(-1,1,187,243)                    // Frame

                                                                      kTrue, kTrue                                                                                // Visible, Enabled

                                                                      {

                                                                                // ----- This is the CPanelControlData that holds the widgets

                                                                                //                     that are items in the list box. They are not persistent

                                                                                //

 

                                                                      }

                                                            ) 

                                                  },

                                        ),

 

                                        ButtonWidget

                                        (

  SamplePrefDragDropScriptAddBtnWidgetID,

                                        kSysButtonPMRsrcId,

                                        kBindNone,

                                        20, 125, 90, 145,

                                        kTrue, kTrue,

                                        kSampleAddScriptButtonTextKey,

                                        ),

 

                                        ButtonWidget

                                        (

  SamplePrefDragDropScriptRemoveBtnWidgetID,

                                        kSysButtonPMRsrcId,

                                        kBindNone,

                                        100, 125, 180, 145,

                                        kTrue, kTrue,

                                        kSampleRemoveScriptButtonTextKey,

                                        ),

 

Elements added:

 

void SampleDialogController::PopulatePrefListElement()

{

do

{

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

                    ASSERT(iPanelControlData);

                    if(!iPanelControlData) {CAlert::InformationAlert("IPanelControlData err");break;}

 

 

                    SDKListBoxHelper listHelper(iPanelControlData,kSamplePluginID, SamplePreflistboxWidgetID, kSampletDialogWidgetID);

                    IControlView * listBox = listHelper.FindCurrentListBox();

                    if(listBox == nil) {

                    CAlert::InformationAlert("listBox err");

                    break;

                    }

 

 

 

                    listHelper.EmptyCurrentListBox();

 

 

                    InterfacePtr<IListBoxController> listCntl(listBox,IID_ILISTBOXCONTROLLER);          // useDefaultIID() not defined for this interface

                    ASSERT_MSG(listCntl != nil, "listCntl nil");

                    if(listCntl == nil) {

                    CAlert::InformationAlert("IListBoxController err");

                    break;

                    }

 

                    //Addin the string to the listbox

                    const int targetDisplayWidgetId =SamplePrefOptionTextWidgetID;

 

 

                    listHelper.AddElement("General", targetDisplayWidgetId);

                    listHelper.AddElement("Fitting", targetDisplayWidgetId);

                      listHelper.AddElement("Events and Scripts", targetDisplayWidgetId);

 

                    listCntl->DeselectAll();

 

 

}while(0);

}

 

I dont know how to enable these three widgets in Indesign CC.please refer this code and help me if anyone has idea regarding this problem.

 

Thanks in advance,

Vimala L

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!

Where can I get InDesign CC 2015 SDK

$
0
0

Hi all,

Yesterday I got a release of Adobe InDesign CC 2015. But I cannot find an update for InDesign CC 2015 SDK in prerelease.adobe.com!!! I'm afraid that my clients can't use our plugin the the moment they update the 2014 to 2015.

Do you know when will adobe release for us the 2015 SDK?

LINKREWORK Fix on SDKLayoutHelper::PlaceFileInFrame function

$
0
0

In implement of  PlaceFileInFrame function i see comment:

// TODO: LINKREWORK fix.

Everyone knows source code to relink (replace old link to new link)  to input here?

Many thanks.

how to Add custom menu items in the context menu?

$
0
0

how to Add custom menu items in the context menu?

through sdk c++

Viewing all 78596 articles
Browse latest View live


Latest Images

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