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

CS5 Embedded Image Access

$
0
0

I'm trying to save the embedded image of a frame to a file. (usually, I have access to the linked file, but sometimes, they aren't available to the user, so I have to use the embedded image instead)

 

When I ported my CS4 plugin to CS5, the functionality was removed from the interface I was using.

 

I've tried

     Utils<ILinkUtils>()->CreateFileFromEmbedded(uidRef, idFile);

but it fails.

 

I assume that I've got the wrong uidRef- I know that idFile is correct.

 

Has anybody done this in CS5?


Using PDFSharp in InDesign plug-in

$
0
0

Hello

 

Has any body been successful using the PDFSharp.dll in InDesign plug-ins

 

Thank you in advance,

 

 

import pdf files

$
0
0

Hi,

 

i want to import pdf file in to indesign CS5.5 that have multiple page. how to import it.

does indesign file have complete data for all the pages of a pdf file. please reply me as soon as possible.

 

Thanks in advance...

how to get exact positon of the text?

$
0
0

Hi try below code, i am not getting exact position of the text.

 

InterfacePtr< ITextModel> textModel( Utils< IXMLUtils>()->QueryTextModel( inXMLElement ) );

                    InterfacePtr< IFrameList> frameList( textModel->QueryFrameList() );

                    TextIndex start_pos, end_pos;

                    Utils< IXMLUtils>()->GetElementIndices(inXMLElement,&start_pos,&end_pos);

 

                    int32 fidx;

                    InterfacePtr<ITextFrameColumn> textFrameColumn(frameList->QueryFrameContaining(start_pos, &fidx));

                    UIDRef focusedText = ::GetUIDRef(textFrameColumn);

 

                    unsignedint current_page = GetPageNumberFromUIDRef(focusedText);

 

                    UID pageUID;

                    UIDRef spreadUIDRef = GetPageSpreadUIDRef(current_page,pageUID);

 

                    PMRect PageCoords = GetPagePasteBoardPos(UIDRef(db,pageUID));

 

  InterfacePtr<IWaxStrand> waxStrandFrame(((IWaxStrand*)textModel->QueryStrand(kFrameListBoss, IID_IWAXSTRAND)));

 

                    if (waxStrandFrame == nil)break;

                    K2::scoped_ptr<IWaxIterator> waxIterator(waxStrandFrame->NewWaxIterator());

 

                    PMReal yposition = 0;

                    if (waxIterator == nil)break;

                    IWaxLine* waxLine = waxIterator->GetFirstWaxLine(start_pos);

                    yposition = waxLine->GetYPosition();

 

 

Can you any one suggest solution for above problem.

Copying formatted text from InDesign

$
0
0

Hi All,

 

What I need?

I need to copy text in InDesign to a WYSIWYG editor by preserving formatting.

 

 

What I did?

If I copy the formatted text in InDesign document to a WYSIWYG editor then it gets pasted as plain text.

However, if I copy the text to OpenOffice/MSWord document, then the formatting is retained.

Moreover, if I copy the same text from OpenOffice/MSWord document to WYSIWYG editor then formatting is retained.

 

 

Question:

Is there a way to copy-paste text with formatting directly from InDesign to WYSIWYG editor?

 

 

I would appreciate it if anyone can help.

How to unembed links?

$
0
0

Hi,

 

I have indesign document with embeded links in it. The links don't have any physical existance on drive. I need to unembed all embeded links programaticaly into a specific folder.This is possible manualy in indesign.

 

Following is the my sample code:

 

PMString sImagePath;

sImagePath.Append("C:\\Documents and Settings\\Administrator\\Desktop\\test\\") ;

 

sImagePath.Append(sLinkName);   // name of image file

 

IDFile sysFile;

URI tmpURI;

FileUtils::PMStringToIDFile(sImagePath, sysFile);

 

Utils<IURIUtils>()->IDFileToURI(sysFile, tmpURI);

 

ErrorCode ErrLink = Utils<Facade::ILinkFacade>()->UnembedLinks (LinkList, tmpURI, kMinimalUI);  //LinkList is UIDlist of links

if(ErrLink != kSuccess)

{

       PMString ShowError = ErrorUtils::PMGetErrorString(ErrLink);

       CAlert::WarningAlert("ErrLink != kSuccess"+ ShowError);

 

       break;

}

 

 

I am getting "ErrLink != kSuccess" and ErrorCode ShowError is blank.

 

Is the above API correct or is there another function to do the same.

 

If anyone has done this please do let me know.

 

Thank you all in advance.

 

Priyanka

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?

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


ProcessDragDropCommand is not invoking after CouldAcceptTypes returned DragDrop::kDropWillCopy

$
0
0

Hi everyone!

 

Here's the sample web browser application from cef:

http://opensource.spotify.com/cefbuilds/cef_binary_3.2704.1432.g60b3718_windows32_client.t ar.bz2

if you have another OS you can get your version from here:

CEF Automated Builds

 

I've modified BasicDragDrop sample from sdk to handle my flavor ("HTML Format")

 

If you'll try to drag the image from it and drop into InDesign then your CouldAcceptTypes function will be invoked but even if you return DragDrop::kDropWillCopy the ProcessDragDropCommand won't be invoked.

 

For Firefox, if you'll drag the same image from the same web page into the same document then after CouldAcceptTypes your ProcessDragDropCommand will be invoked too as expected.

 

I'm returning absolutely same TargetResponse from CouldAcceptTypes in both cases. But with Firefox it works and with cef the ProcessDragDropCommand insn't invoking. Both drops have "HTML Format" flavor. Both of them have valid IPMString with data for that flavor.

 

Does anyone have idea what I'm missing? Thanks!

load PDF export presets

$
0
0
How can i load PDF export presets from file (.joboptions or .pdfs)?

External Flavor Drag&Drop

$
0
0

Hi all,

 

I'm implementing a to Drag & Drop from an external application(Desktop) on to a panel widget.

In the Function "CouldAcceptTypes", it accepted successfully, but in the function "ProcessDragDropCommand", InternalizeDrag always returns kFailure.

 

I am stuck at this point. I could not find any helpful references.

Pls kindly help me out from this problem.

 

Many thanks in advance.

Kimmex

 

 


#define dropTgtFlavor PMFlavor(kDesktopExternalFlavor)


myDropTarget::ProcessDragDropCommand( IDragDropController* controller, DragDrop::eCommandType action)


{

     bool16 returnCode = kFailure;

 

     do

     {

 

 

          if (controller->InternalizeDrag(dropTgtFlavor, dropTgtFlavor) != kSuccess) // always fail.

          {

               break;

          }

          ....

     }while(false);

}

Export as pdf, causing random crash

$
0
0

I have a template document, I have modify the document from some other piece of code & tried to export template as pdf
My code is

 

bool16 ExportAsPDF(PMString pdfPath, UIDRef docRef)

{

     bool16 result = kFalse;

     do

     {

          std::cout << "Export As PDF" << std::endl;

          InterfacePtr<IDocument> doc(docRef, UseDefaultIID());

          ASSERT(doc);

          if(!doc)

               break;

 

          InterfacePtr<IWorkspace> workspace(GetExecutionContextSession()->QueryWorkspace());

          if( !workspace )

               break;

 

          InterfacePtr<IPDFExptStyleListMgr> listPDFStyles(workspace, UseDefaultIID());

          if( !listPDFStyles )

               break;

 

          // Get style index

          int32 styleIndex = listPDFStyles->GetStyleIndexByName("[PDF/X-1a:2001]");

          UIDRef styleRef = listPDFStyles->GetNthStyleRef(styleIndex);

 

          InterfacePtr<IPDFExportPrefs> appExportPrefs(styleRef, UseDefaultIID());

          if(!appExportPrefs)

               break;

 

          // Create pdf export cmd

          InterfacePtr<ICommand> pdfExportCmd(CmdUtils::CreateCommand(kPDFExportCmdBoss));

          if(!pdfExportCmd)

               break;

 

          InterfacePtr<IPDFExportPrefs> cmdExportPrefs(pdfExportCmd, UseDefaultIID());

          if(!cmdExportPrefs)

               break;

 

          cmdExportPrefs->CopyPrefs(appExportPrefs);

 

          InterfacePtr<ISysFileData> cmdSysFileData(pdfExportCmd, UseDefaultIID());

          if(!cmdSysFileData)

               break;

 

          cmdSysFileData->Set(FileUtils::PMStringToSysFile(pdfPath));

 

          InterfacePtr<IUIFlagData> cmdUIFlagData(pdfExportCmd, UseDefaultIID());

          if(!cmdUIFlagData)

               break;

 

          cmdUIFlagData->Set(kSuppressUI);

 

          UIDList outputList(::GetDataBase(doc));

 

          if(cmdExportPrefs->GetPDFExReaderSpreads() != IPDFExportPrefs::kExportReaderSpreadsON)

          {

               InterfacePtr<IPageList> pageList(doc, UseDefaultIID());

               for( int32 i = 0; i < pageList->GetPageCount(); ++i )

               outputList.Append(pageList->GetNthPageUID(i));

          }

          else

          {

               InterfacePtr<ISpreadList> spreadList(doc, UseDefaultIID());

               for(int32 i = 0; i < spreadList->GetSpreadCount(); ++i)

               outputList.Append(spreadList->GetNthSpreadUID(i));

          }

 

          InterfacePtr<IOutputPages> cmdOutputPages(pdfExportCmd, UseDefaultIID());

          if(!cmdOutputPages)

          break;

 

          cmdOutputPages->Clear();

          cmdOutputPages->SetMasterDataBase(::GetDataBase(doc));

          cmdOutputPages->SetIsSpreads(kFalse);

          cmdOutputPages->InitializeFrom(outputList, kFalse);

 

          UIDRef docRef = ::GetUIDRef(doc);

 

          ErrorCode errCode = CmdUtils::ProcessCommand(pdfExportCmd);

          if (errCode != kSuccess)

          {

               ErrorUtils::PMSetGlobalErrorCode( kSuccess );

          }

          else

          result = kTrue;

     }while(false);

     return result;

}

 

It is crashing randomly for some documents. I can't figure out the problem.

 

If some one can suggest some other way of exporting the document ( other than using service registry, I have that also) please tell

Or if  someone can point me out for my mistake in this code please tell.

Please help

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

Problem with resizable dialog in CC ...

$
0
0

Hi,

 

I’m having a problem with a resizable dialog that contains a treeview in an EVEGenericPanelWithBorderWidget.  I have changed our code to open the dialog with the resize flag set to true and made the items in the fr file ’BindAll’ and while everything appears to resize correctly, I can’t click on any items in the treeview that are not visible when the dialog is at its minimum size.  So, even though I can see all nodes in the treeview, I can’t click on anything below the 6th node.  Is there a setting somewhere to change this behaviour?

 

Here's a cut down version of our fr file if anyone can spot a mistake!

 

Class

{

    kSetPriceListDialogBoss,

    kResizeDialogBoss,

    {

        // Provides management and control over the dialog.

        IID_IDIALOGCONTROLLER, kSetPriceListDialogControllerImpl,

 

        // Allows dynamic processing of dialog changes.

        IID_IOBSERVER, kSetPriceListDialogObserverImpl,

    }

},

 

Class

{

    kSetPriceListTreeViewWidgetBoss,

    kTreeViewWidgetBoss,

    {

        // Furnishes application framework with widgets as needed.

        IID_ITREEVIEWWIDGETMGR,    kSetPriceListTreeViewWidgetMgrImpl,

       

        // Adapts our data model to the needs of the application framework.

        IID_ITREEVIEWHIERARCHYADAPTER, kSetPriceListTreeViewAdapterImpl,

       

        // Implements the observer that receives the messages from the

        // application when the user clicks in the list box.

        //IID_IOBSERVER, kSetPriceListListBoxObserverImpl,

    }

},

   

resource LocaleIndex(kSetPriceListDialogResourceID)

{

    kViewRsrcType,

    {

        kWildFS, k_Wild, kSetPriceListDialogResourceID + index_enUS

    }

};

 

type SetPriceListDialogWidget(kViewRsrcType) : ResizeDialogWidget(ClassID = kSetPriceListDialogBoss) //PUB-249

{

    WidgetEveInfo;

};

 

type SetPriceListTreeViewWidget(kViewRsrcType) : TreeViewWidget(ClassID = kSetPriceListTreeViewWidgetBoss)

{

    WidgetEveInfo;

};

 

resource SetPriceListDialogWidget(kSetPriceListDialogResourceID + index_enUS)

{

    __FILE__, __LINE__,

    kSetPriceListDialogWidgetID,                        // WidgetID

    kPMRsrcID_None,                                        // RsrcID

    kBindAll,                                            // Binding

    Frame(0,0,241,233),                                    // Frame(l,t,r,b)

    kTrue, kTrue,                                        // Visible, Enabled

    kFalse, kInvalidInterfaceColor,

    kSetPriceListDialogTitleKey,

    {

        EVEGenericPanelWidget

        (

            kInvalidWidgetID,        // WidgetId

            0                        // RsrcId

            0,                        // Widget EVE Info

            kBindAll,                // Frame binding

            Frame(0,0,232,149)        // Frame

            kTrue,                    // Visible

            kTrue,                    // Enabled

            kEVEAlignFill | kEVERegularSpaceAfter | kEVEArrangeChildrenInRow,

           

            {

                EVEGenericPanelWithBorderWidget

                (

                    // CControlView properties

                    kInvalidWidgetID,

                    kPMRsrcID_None,                                // PMRsrc ID

                    kBindAll,                                    // Frame binding

                    Frame(0,0,210,135)                            // Frame (l,t,r,b)

                    kTrue,                                        // Visible

                    kTrue,                                        // Enabled

                    // CTextControlData properties

                    "",                                            // Control label

                    {

                        SetPriceListTreeViewWidget

                        (

                            kSetPriceListTreeViewWidgetID,        // WidgetID

                            kPMRsrcID_None,                        // RsrcId

                            kBindAll,

                            Frame(0,0,209,134)                    // Frame (l,t,r,b)

                            kTrue, kTrue,                        // Visible, Enabled

                            kTrue,                                // EraseBeforeDraw

                            kInterfacePaletteFill,

                            "",

                            kHideRootNode,                        // Options

                            kFalse,                                // Use H Scroll bar

                            kTrue,                                // Use V Scroll bar

                            20,                                    // Vertical Scroll button increment

                            20,                                    // Vertical Thumb Scroll increment

                            0,                                    // Horizontal Scroll button increment

                            0,                                    // Horizontal Thumb scroll button increment

                            1,                                    // Items selectable, 0 = No Selection, 1 = Single Selection, 2 = Multiple Selection

                            kFalse,                                // Allow children from multiple parents to be selected

                            kFalse,

                            {

                            }

                            kEVENoSpaceAfter,

                        ),

                    }

                    kEVERegularSpaceAfter,

                ),

            }

        ),

    }

    kEVEArrangeChildrenInColumn | kEVESmallMargin,

}

 

type SetPriceListTreeNodeWidget(kViewRsrcType) : PrimaryResourcePanelWidget(ClassID = kTreeNodeWidgetBoss)

{

    WidgetEveInfo;

};

 

resource SetPriceListTreeNodeWidget(kPriceListElementResourceID)

{

    __FILE__, __LINE__,

    kSetPriceListTreeNodeWidgetID,                    // WidgetID

    kPMRsrcID_None,                                    // RsrcId

    kBindLeft | kBindRight,                            // Frame binding

    Frame(0,0,208,20),                                // Frame

    kTrue, kTrue,                                    // Visible, Enabled

    "",                                                // Panel name

    {

        EVEInfoStaticTextWidget

        (

            kSetPriceListTreeNodeNameWidgetID        // WidgetID

            kSysStaticTextPMRsrcId,                    // RsrcId

            kBindNone,                                // Frame binding

            Frame(2,0,189,18)                        // Frame NOTE: This has to be slightly smaller than

                                                    // the enclosing widget to get the white list item

                                                    // separator line to appear.           

            kTrue, kTrue,                            // Visible, Enabled

            kAlignLeft,                                // Alignment

            kDontEllipsize, kFalse,                    // Ellipsize style

            "",

            0,

            kPaletteWindowSystemScriptFontId,

            kPaletteWindowSystemScriptHiliteFontId,

            kEVENoSpaceAfter,

        ),

    }

 

    kEVEArrangeChildrenInColumn| kEVESmallMargin,

};

 

Thanks,

Dan Tate

How to export PDF using named PDF preset

$
0
0

I have got PDF export of pages working (using kPDFExportCmdBoss), but I can't see how to export using one of the named PDF Presets (e.g. PDF/X-1a:2001).

 

 

I want to be able to set up a custom named PDF export preset, and then just export PDFs using that preset, so that if the output PDF needs different settings at some point in the future, this can be done by just editing the named preset.

 

 

Any advice on whether this is possible, and if so, how best to do it, will be much appreciated.

 

A snippet from my current code:

 

 

// get the export command
InterfacePtr<ICommand> pdfExportCmd(CmdUtils::CreateCommand(kPDFExportCmdBoss));

// get the export prefs interface
InterfacePtr<IPDFExportPrefs> iPDFExportPrefs(pdfExportCmd, IID_IPDFEXPORTPREFS);

// get the pages to export interface
InterfacePtr<IOutputPages> iOutputPages(pdfExportCmd, IID_IOUTPUTPAGES);

// get the output file interface
InterfacePtr<ISysFileData> iOutputFileData(pdfExportCmd, IID_ISYSFILEDATA);

// get the page UID
UID pageUID = iPageList->GetNthPageUID(fromPage-1); // zero for first page

// set the outputfile
iOutputFileData->Set(pageFile);

// set the page
iOutputPages->AppendOutputPageUIDRef(UIDRef(db,pageUID));

// set the preset in preferences
/**** This is the bit I can't see how to do *****/
   
// run the command
if (CmdUtils::ProcessCommand(pdfExportCmd) != kSuccess) {
ASSERT_FAIL("kPDFExportCmdBoss failed");
break;
}


Drag'n'Drop working in CS, not in CC

$
0
0

Hi everybody,

 

I have a Flex panel and a native plugin in InDesign. From the flex panel, I initiate a drag, that I wish to drop in InDesign. In my plugin, I have a CDragDropTargetFlavorHelper that works fine up to CS6 to handle the drop initiated by the Flex panel.

 

I have just tried the same operation in InDesign CC 2014 (don't know on CC), but this does not work.

 

In my Flex panel, I set HTML and URL flavours on the drag source. In my native plugin, there is no reaction to those flavours. CouldAcceptTypes() method is even not called. But if I add for example a text flavour in my flex panel, I think another helper consumes my drag, and my plugin does not receive it.

 

Is there any change between CS6 and CC2014 in drop process in native plugins? Or is it in Flex that it has changed?

 

How can I handle this? Should I create a custom flavour shared between my flex panel and my native plugin? If yes, how can I do this in my native plugin?

 

Thanks in advance.

 

Rémi

 

EDIT : In my Flex panel, I use flavours ClipboardFormats.URL_FORMAT and ClipboardFormats.HTML_FORMAT. I don't find any matching flavour in native plugin SDK. Historically, I have seen I use something really strange (I don't know where it comes from): PMFlavor(1213484364).

 

Message was edited by: Rémi Doolaeghe

Export page To PDF (InDesign Server)

$
0
0
Hello,

When i need to export my page to PDF, inDesign Server update all links on

page(incx, inca). Can i disable this function ?

I tried IPDFExportPrefs but i don't found any parameters who can desable it.

Best Regards

How to add an anchor to a modal alert

$
0
0

Hello experts,

 

I want to place an URL, that can be clicked, in a modal alert text.

For an example, a mechanism like below,

int32 answer= CAlert::ModalAlert("Do you want to make this  <a href=\"my://site.url\">blah blah</a>",

                                                "Yes",

                                                "No",

                                                kNullString,

                                                2,

                                                CAlert::eQuestionIcon );

 

Is that possible?

 

How to iterate through document?

$
0
0

How to iterate through document or

Is there any way to make next document active when I complete operation with current document.

Are you an InDesign PlugIn Developer

$
0
0

CrossCap is currently looking for an intermediate C++  developer with a minimum of 3-5 years’ experience preferably building robust production tools. The ideal candidate will have expert knowledge of  C++ and will be required to develop Adobe InDesign plugins for professional creative designers.  Knowledge of Adobe Photoshop SDK would also be an asset.

The candidate must have experience working within an agile methodology and a production environment. The successful candidate will be part of a team and responsible for the development of Adobe InDesign & Photoshop plug-ins providing increased functionalities and integration into the CrossCap software platform.

 

CrossCap, established in 2001, offers a Management and Collaboration Platform for marketing teams across all industries. . Some great companies that rely on the CrossCap SaaS platform include Walmart, Target and Gap. CrossCap is headquartered in San Francisco with offices in Toronto and New York.

 

Requirements of this Role:

•           Must be fluent in English with strong communication skills

•           Expert knowledge of C/C++.

•           Knowledge of JAVA & JNI would be an asset

•           Extensive experience using Adobe InDesign SDK.

•           Experience with Adobe Photoshop SDK would be an asset

•           Development environment knowledge must include Mac OS X, X Code and knowledge of Objective C

•           Knowledge of Web Services (SOAP, WSDL, UDDI) is an asset

 

Desired Qualifications:

•           A Bachelors degree preferably in Engineering or Computer Science.

•           3-5 years of C++ development experience and Adobe InDesign SDK

•           An understanding of design patterns and software development frameworks.

 

 

Please email your resume to:  careers@crosscap.com

Viewing all 78596 articles
Browse latest View live


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