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

Need help on calcuates ItemTransform and PathGeomerty.

$
0
0

Hello,

 

I am new in IDML. Can anyboday tell me that how ItemTransform and PathGeometry values calculates?

 

Here i have create a document in Indesign CS4 with height = 800 pt and widht = 1000 pt,

and i have drawn an object textframe on page with height = 400 pt and widht = 500 pt.

 

And when i export this document as IDML and see spread file then i got this coordinate in that file

 

<TextFrame Self="ue5" ParentStory="ud3" PreviousTextFrame="n" NextTextFrame="n" ContentType="TextType" GradientFillStart="0 0" GradientFillLength="0" GradientFillAngle="0" GradientStrokeStart="0 0" GradientStrokeLength="0" GradientStrokeAngle="0" ItemLayer="ua2" Locked="false" LocalDisplaySetting="Default" GradientFillHiliteLength="0" GradientFillHiliteAngle="0" GradientStrokeHiliteLength="0" GradientStrokeHiliteAngle="0" AppliedObjectStyle="ObjectStyle/$ID/[Normal Text Frame]"
ItemTransform="1 0 0 1 497 -233.60000000000002">
            <Properties>
                <PathGeometry>
                    <GeometryPathType PathOpen="false">
                        <PathPointArray>
                            <PathPointType Anchor="-447 -116.39999999999998" LeftDirection="-447 -116.39999999999998" RightDirection="-447 -116.39999999999998"/>
                            <PathPointType Anchor="-447 283.6" LeftDirection="-447 283.6" RightDirection="-447 283.6"/>
                            <PathPointType Anchor="53 283.6" LeftDirection="53 283.6" RightDirection="53 283.6"/>
                            <PathPointType Anchor="53 -116.39999999999998" LeftDirection="53 -116.39999999999998" RightDirection="53 -116.39999999999998"/>
                        </PathPointArray>
                    </GeometryPathType>
                </PathGeometry>
            </Properties>
            <TextFramePreference TextColumnFixedWidth="500"/>
            <TextWrapPreference Inverse="false" ApplyToMasterPageOnly="false" TextWrapSide="BothSides" TextWrapMode="None">
                <Properties>
                    <TextWrapOffset Top="0" Left="0" Bottom="0" Right="0"/>
                </Properties>
            </TextWrapPreference>
        </TextFrame>

 

Please see whole spead file in attachement.

 

 

Thanks in advance.


autosize textframe in idml

$
0
0

Hi all,

 

I've already posted this question in the general InDesign forum, but this forum seems to be more appropriate for idml questions.

 

I'm creating an idml document with xml/xsl. I'm dynamically creating textframes based on content in a database.

 

Q1: How can I create textframes that automatically size with the content?

 

Q2: How can I create a textframe that overlaps multiple pages?

 

It seems to me that idml should be able to provide us 'dynamic document creators' with the ability to create dynamic documents. That's the whole purpose of idml, isn't it? I already spent numerous hours on the internet trying to find a solution to this, unfortunately without result.

 

Plz don't tell me this can't be done ...

 

 

TIA!

 

Victor.

Is it possible to change TreeView's background color, not node color?

$
0
0

In advance, Thanks!!

 

treeview.JPG

 

Actually, I've made my own treeview in my project. and  I've changed my treeview node color as i want

I wonder whether or not to change treeview's background color, not node color in below class.

 

// in ~.fr

Class
{
  kMyTreeViewWidgetBoss,
  kTreeViewWidgetBoss,
  {


     IID_ICONTROLVIEW,                    kMyTreeViewCtrlViewImpl,  

 


     IID_ITREEVIEWWIDGETMGR,      kMyTreeViewListBoxWidgetMgrImpl,
     IID_ITREEVIEWHIERARCHYADAPTER,  kMyTreeViewListBoxHierarchyAdapterImpl,
     IID_ISTRINGLISTDATA,                          kStringListDataImpl,
     IID_IOBSERVER,                                  kMyTreeViewCtrlBoxObserverImpl,
    }
},
type MainTreeViewListBox(kViewRsrcType)       : TreeViewWidget    (ClassID = kMyTreeViewWidgetBoss)  {};

MainTreeViewListBox   //Tree view
(
           kMyTreeViewWithTextListWidgetID, kPMRsrcID_None, // WidgetId, RsrcId
           kBindAll,           // Frame binding
           Frame(-1, 26, 300, 276)  // Frame
           kTrue, kTrue,         // Visible, Enabled
           kTrue,       // EraseBeforeDraw
           kInterfacePaletteFill,   // InterfaceColor
           "",
           kHideRootNode,// | kDrawEndLine, // Options. Display root node
           kFalse,  // Use H Scroll bar
           kTrue,  // Use V scroll bar
           20,   // fVScrollButtonIncrement
           20,   // fVThumbScrollIncrement
           0,   // fHScrollButtonIncrement
           0,   // fHThumbScrollIncrement
           2,   // Items selectable, 0 = No Selection, 1 = Single Selection, 2 = Multiple Selection
           kFalse,  // Allow children from multiple parents to be selected
           kTrue,  // Allow discontiguous selection
           {
            //The tree view is dynamically created. 
           },
),        

 

class MyTreeViewCtrlView : public PanelView

{

...

virtual void   Draw(IViewPort* viewPort, SysRgn updateRgn);
...

}

void MyTreeViewCtrlView::Draw( IViewPort*  viewPort, SysRgn  updateRgn )
{
   AGMGraphicsContext gc(viewPort, this, updateRgn);
  InterfacePtr<IGraphicsPort>  gPort(gc.GetViewPort(), UseDefaultIID()); // IID_IGRAPHICSPORT);
  ASSERT(gPort);

  gPort->gsave();
  PMRect frameOut      = GetFrame();
  frameOut.MoveTo(0, 0);


  COLORREF crBackColor    = RGB( 255, 0, 0 );

  gPort->setrgbcolor( GetRGBtoReal( GetRValue(crBackColor) ), GetRGBtoReal( GetGValue(crBackColor) ), GetRGBtoReal( GetBValue (crBackColor) ));
gPort->rectpath(frameOut);
gPort->fill();

gPort->grestore();

PanelView::Draw( viewPort, updateRgn );

}

 

In above case, there are errors in kMyTreeViewCtrlViewImple when Indesign is launching.

 

// Error Assert

XferObject- ReadWrite for impl kMyTreeViewCtrlViewImpl of iid IID_ICONTROLVIEW in class kMyTreeViewWidgetBoss read wrong amount in plugin kMyTreeViewWidgetBoss

///

 

but, in kMyTreeViewWidgetBoss ClassDescriptionTable, when remove this( IID_ICONTROLVIEW, kMyTreeViewCtrlViewImpl), that's ok. but I can't change background color. just interfacepalettefill color

 

Please help me!!

How write a plugin to call a webservices to upload a selected jpeg to a web server?

$
0
0

How write a plugin to call a webservices to upload a selected jpeg to a web server,

and after web server processed it, then download and replace current selected jpeg?

How to find out the coordinates of rotated textframe

$
0
0

Hi All,

 

With the help of (idml) itemtransform horizontal / vertical distances and path point arrays, I can find out the coordinates of text frame (x1,y1), (x2,y2), (x3,y3), (x4,y4). If the textframe is rotated then item transform values are getting changed, but the path point array values are same. I can find rotation angle by the matrix [cos(θ) sin(θ) -sin(θ) cos(θ) 0 0], But I could not get the exact coordinates of rotated textframe. The textframes are given below.

 

Normal Text frame

 

<TextFrame Self="u136" ParentStory="u124" ItemTransform="1 0 0 1 101.72727272727272 -349.41818181818184">
            <Properties>
                <PathGeometry>
                    <GeometryPathType PathOpen="false">
                        <PathPointArray>
                            <PathPointType Anchor="-101.72727272727272 -46.581818181818164" LeftDirection="-101.72727272727272 -46.581818181818164" RightDirection="-101.72727272727272 -46.581818181818164"/>
                            <PathPointType Anchor="-101.72727272727272 -0.3272727272727103" LeftDirection="-101.72727272727272 -0.3272727272727103" RightDirection="-101.72727272727272 -0.3272727272727103"/>
                            <PathPointType Anchor="115.9090909090909 -0.3272727272727103" LeftDirection="115.9090909090909 -0.3272727272727103" RightDirection="115.9090909090909 -0.3272727272727103"/>
                            <PathPointType Anchor="115.9090909090909 -46.581818181818164" LeftDirection="115.9090909090909 -46.581818181818164" RightDirection="115.9090909090909 -46.581818181818164"/>
                        </PathPointArray>
                    </GeometryPathType>
                </PathGeometry>
            </Properties>         

</TextFrame>

 

 

Rotated textframe

 

<TextFrame Self="u136" ParentStory="u124" ItemTransform="0 1 -1 0 320.3805483338268 -125.07900895050204">
            <Properties>
                <PathGeometry>
                    <GeometryPathType PathOpen="false">
                        <PathPointArray>
                            <PathPointType Anchor="-101.72727272727272 -46.581818181818164" LeftDirection="-101.72727272727272 -46.581818181818164" RightDirection="-101.72727272727272 -46.581818181818164"/>
                            <PathPointType Anchor="-101.72727272727272 -0.3272727272727103" LeftDirection="-101.72727272727272 -0.3272727272727103" RightDirection="-101.72727272727272 -0.3272727272727103"/>
                            <PathPointType Anchor="115.9090909090909 -0.3272727272727103" LeftDirection="115.9090909090909 -0.3272727272727103" RightDirection="115.9090909090909 -0.3272727272727103"/>
                            <PathPointType Anchor="115.9090909090909 -46.581818181818164" LeftDirection="115.9090909090909 -46.581818181818164" RightDirection="115.9090909090909 -46.581818181818164"/>
                        </PathPointArray>
                    </GeometryPathType>
                </PathGeometry>
            </Properties>        

</TextFrame>

 

 

When I converted the values of rotated textframe in to coordinates and drawn in a screen then  I am not getting the exact position where it drawn in the original.

 

Can anyone help me to find out the cordinates of rotated textframe.

 

 

Thanks in advance.

Where to buy Visual Studio 2008

$
0
0

From both the Whats New and the Read Me files plus the discussions on this forum its apparent that CS5 development should (must?) be done using Microsoft Visual Studio 2008

 

The usual places I get software from no longer carry it, they only have the latest and greatest 2010 version

 

Could someone please recommend a trustworthy store that still has it in stock?

How to reverse IDML ItemTransform to scale, sheer and rotation

$
0
0

Hello everyone,

 

Now that i know how to rotate in IDML i want to know how to calculate the ItemTransform values back to scale, sheer and rotation.

 

For example:

 

0.8660254037844387 -0.5000000000000001 1.1102230246251565e-16 1.1547005383792517 0 0

 


This example has a 30° rotation and a 30° sheer but how can i calculate this back to the degrees values?
And i don't understand the scale values if i scale an item ItemTransform does not change but the anchor points change.

 


Can anyone help me with this?

Using DialogWindowSizeBoxWidget

$
0
0

I have a requirement to make a dialog resizeable.  The .FR class description looks like this:

 

   Class
   {
      kIEUIMissingDocDialogBoss,
      kResizeDialogBoss
      {
         IID_IDIALOGCONTROLLER, kIEUIMissingDocDialogControllerImpl,
         IID_IOBSERVER,         kIEUIMissingDocDialogObserverImpl,
      }
   },

 

In the API documentation, under a discussion of kResizeDialogBox

 

ResizeDialogWidget is a dialog resource that overrides the IControlView interface and replaces it with  an ErasablePanelView implementation, to create a resizable dialog. For an  example, see the Map Tags to Styles dialog on the Tags panel.

 

so I did not want to override IControlView.

 

In the Widget description I have this:

 

resource IEUIMissingDocDialogWidget(kIEUIMissingDocDialogResourceID + index_enUS)
{
   __FILE__, __LINE__,
   kIEUIMissingDocDialogWidgetID,                                          // WidgetID
   kPMRsrcID_None,                                                          // RsrcID
   kBindNone,                                                                   // Binding
   Frame(0, 0, 595, 370),                                                   // Frame (l,t,r,b)
   kTrue,                                                                 // Visible
   kTrue,                                                                     // Enabled
   kTrue,
   kInterfacePaletteFill,
   kIEUIIndexEngineStringKey,                                                // Dialog name
   {
   ...     
      DialogWindowSizeBoxWidget
      (
         kIEUIMissingDocResizeWidgetID,
         kSysWindowSizeBoxPMRsrcId,
         kBindRight | kBindBottom,
         Frame(575, 330, 591, 346) //  LTRB
         kTrue,
         kTrue,
         kADBEIconSuiteButtonType,
      ),
   }        
}

 

The problem is that while the dialog now resizes, the DialogWindowSizeBoxWidget does not stay in the lower right-hand corner as it moves.  It remains where it is originally positioned by the above description.

 

Does anyone know how to make this widget stay where it belongs?

 

As an afterthought, and a very minor problem, ever since I got the debug copy of InDesign CS5, whenever I bring it up, I get an error that looks something like this:

 

No translation of key com.adobe.rc.operationalmessages

 

Though this is more of a nuisance than a problem, does anyone know how to make it go away?


Obtaining coordinates and dimensions of page items using .NET and IDML.

$
0
0

I'll preface this by saying that I am extremely new to Adobe software.

 

I have been assigned a task that requires me to obtain the coordinates and dimensions of all TextFrames in an InDesign document.  I need to have these coordinates in an x,y format.

 

Essentially what I want to be able to do is identify where these page items are, in universal terms.  I have read the relevant sections of the IDML spec, and searched through post after post, but I'm still not quite getting it.

 

For a TextFrame, the height and width are easy.  It's the coordinates that are blowing my mind.  I've gotten far enough to know that I need to calculate based off of the item's ItemTransform attribute, but I am just not sure what to do with it.  I feel like I'm missing a couple of basic points.  Any and all help is most appreciated.

 

Thanks


Launch javascript function from a C++ plug-in

$
0
0

Hello,

 

I succeed to launch a javascript file from my c++ code but I would like to directly go to a specific function.

I used IScriptUtils to get a result data

 

WideString scriptPath("/path/myscript.jsx");

IDFile scriptFile(scriptPath);

InterfacePtr<IScriptRunner>scriptRunner(Utils<IScriptUtils>()->QueryScriptRunner(scriptFile));

if(scriptRunner)

{

     ScriptRecordData arguments;

     ScriptID aID;

     ScriptData script(scriptFile);

     ScriptData resultData;

     PMString errorString;

     result = Utils<IScriptUtils>()->DispatchScriptRunner(scriptRunner,script,arguments,resultData,errorString,kFalse);

 

     ...

     ScriptData::ScriptDataType aType = resultData.GetType();

}

 

I would like to know if someone succeeded to launch a javascript function with arguments and with a result.

 

Regards,

David

InDesign/InCopy Debug Build version CC

$
0
0

Hi

 

I have signed up for the 'InDesign SDK Access Program' and would like to know where I can get the debug builds of InDesign and InCopy CC?

 

I got the CS6, CS5, etc debug builds from the partners portal

 

Also where do I get a license for the CC debug builds.

 

Thanks

mmap : error: can't allocate region

$
0
0

Hi everybody,

 

I've encountered a problem in the save process of a document :

 

 

Adobe InDesign CS6(14998,0xb0f0f000) malloc: *** mmap(size=16777216) failed (error code=12)

*** error: can't allocate region

*** set a breakpoint in malloc_error_break to debug

Adobe InDesign CS6(14998,0xb0f0f000) malloc: *** mmap(size=16777216) failed (error code=12)

*** error: can't allocate region

*** set a breakpoint in malloc_error_break to debug

Adobe InDesign CS6(14998,0xb0f0f000) malloc: *** mmap(size=16777216) failed (error code=12)

*** error: can't allocate region

*** set a breakpoint in malloc_error_break to debug

(and so on...)

 

 

Before saving my document, I created thousands and thousands (and even more) of frames, groups and various bosses.

And while saving, InDesign crashed on this instruction :

docFileHandler->Save(documentUIDRef, kSuppressUI);

 

Do you think a really big amount of data to save in the database of the document could lead to such a crash with this symptom ?

 

The solution I was thinking was slicing my transaction to several more little, and do regular saves of the document. Is it an idea that makes sense for you ?

XCode 5 and InDesign CC 2014

$
0
0

Something in the CC 2014 SDK looks strange to me. In the porting guide, The mentionned version of XCode is 5.0.2. This version of XCode supports Mac OS SDK 10.8 and higher. But in InDesign CC 2014 requirements, Mac OS 10.7 is supported. So why using XCode 5.0.2 which does not support this version of Mac OS?

 

Furthermore, I have been able to compile a plugin with XCode 4.5.2, as needed for InDesign CC (9.x) version.

 

Is this a mistake in the documentation, or did I miss something enormous?

Visual Studio 2012 - CC 2014 PMString debugging

$
0
0

Hi,

 

Could help me an expert how can I debug PMString values?

(I used ID API Navigator for previous versions.)

 

Thx:  Karoly

Rotation in IDML

$
0
0

Does anyone know how to calculate the translation (in red) when a square is rotated in IDML?

 

 

Without rotation:

 

<Rectangle Self="ud0" ItemTransform="1 0 0 1 0 0">
<Properties>
   <PathGeometry>
    <GeometryPathType PathOpen="false">
     <PathPointArray>
      <PathPointType Anchor="72 324" LeftDirection="72 324" 
      RightDirection="72 324"/>
      <PathPointType Anchor="72 252" LeftDirection="72 252" 
      RightDirection="72 252"/>
      <PathPointType Anchor="144 252" LeftDirection="144 252" 
      RightDirection="144 252"/>
      <PathPointType Anchor="144 324" LeftDirection="144 324" 
      RightDirection="144 324"/>
     </PathPointArray>
    </GeometryPathType>
   </PathGeometry>
</Properties>
</Rectangle>

 

Rotating 30 degree left:

 

<Rectangle Self="ud0" ItemTransform="0.8660254037844387 0.5000000000000001
0.5000000000000001 0.8660254037844387
158.46925639128065 15.415316289918337
">
<Properties>
   <PathGeometry>
    <GeometryPathType PathOpen="false">
     <PathPointArray>
      <PathPointType Anchor="72 324" LeftDirection="72 324"
      RightDirection="72 324"/>
      <PathPointType Anchor="72 252" LeftDirection="72 252"
      RightDirection="72 252"/>
      <PathPointType Anchor="144 252" LeftDirection="144 252"
      RightDirection="144 252"/>
      <PathPointType Anchor="144 324" LeftDirection="144 324"
      RightDirection="144 324"/>
     </PathPointArray>
    </GeometryPathType>
   </PathGeometry>
</Properties>
</Rectangle>


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

Is there a way to protect paragraphs from changes?

$
0
0

I have some large documents where a certain kind of paragraphs should never be (accidentally) changed. I am thinking of a paragraph style attribute "never change" or something.

So if people would really need to change the contents they would need to change the paragraph style first. Actually, deleting text with some "protected" paragraph should also be impossible.

Is there such a plug-in existing?

I started writing an event script  but I fear it might be too slow.

 

Thank you,

Ralf

How to Call JavaScript using SDK [CS4] - Reg.

$
0
0

Dear All,

 

Here I am successfully run the javascript usig SDK [CS3] coding. But I have some slight modificate then this is not working. Please kindly help me.

 

I'm using the SDK Code is :

 

 

CS3:

virtual ErrorCode RunFile(const IDFile& idFile, bool16 showErrorAlert = kTrue,

bool16 invokeDebugger = kFalse) = 0;

Call to RunFile:

ErrorCode err = scriptRunner->RunFile(scriptFile, kFalse, kTrue);

CS4:

virtual ErrorCode RunFile(const IDFile& idFile, const RunScriptParams& params) = 0;

Call to RunFile:

RunScriptParams params( scriptRunner);

params.SetInvokeDebugger(kTrue);

ErrorCode err = scriptRunner->RunFile(scriptFile, params);

 

 

In CS3:

 

 

 

 

 

 

 

 

 

 

PMString jsFullPath(

"C:\\WINDOWS\\MacID\\BIN\\sample.jsx"); // a path to my java script file

 

do {

 

const IDFile outFile(jsFullPath);

InterfacePtr<IScriptManager> scriptManager(Utils<IScriptUtils>()->QueryScriptManager(kJavaScriptMgrBoss));

ASSERT( scriptManager ) ;

 

InterfacePtr<IScriptRunner> scriptRunner(scriptManager,UseDefaultIID());

ASSERT( scriptRunner ) ;

 

if(scriptManager)

{

InterfacePtr<IScriptRunner>scriptRunner(scriptManager,UseDefaultIID());

 

ErrorCode err = scriptRunner->RunFile(outFile, kTrue, kFalse);

 

}

}

while(kFalse);

 

This above coding is working fine... in Adobe InDesign CS3.

 

But I have to change the code as per the CS4 SDK, but this is not working. See the below code:

 

PMString jsFullPath(

"C:\\WINDOWS\\MacID\\BIN\\sample.jsx"); // a path to my java script file

 

do {

 

const IDFile outFile(jsFullPath);

InterfacePtr<IScriptManager> scriptManager(Utils<IScriptUtils>()->QueryScriptManager(kJavaScriptMgrBoss));

ASSERT( scriptManager ) ;

 

InterfacePtr<IScriptRunner> scriptRunner(scriptManager,UseDefaultIID());

ASSERT( scriptRunner ) ;

 

if(scriptManager)

{

InterfacePtr<IScriptRunner>scriptRunner(scriptManager,UseDefaultIID());

 

RunScriptParams params( scriptRunner);

params.SetInvokeDebugger(kTrue);

ErrorCode err = scriptRunner->RunFile(outFile, params);

 

}

 

}

while(kFalse);

 

 

I having the doubt above the below line:

RunScriptParams params( scriptRunner);

params.SetInvokeDebugger(kTrue);

ErrorCode err = scriptRunner->RunFile(outFile, params);

 

I used the above line code in CS4 SDK, and run the CS4 Application then Immediatly CS4 Application is quited.

Because of the code is throwing "R6025 - pure Virutual Function call"... like that.

 

Here I have attached the 3 Error JPG files.

 

Please kindly any one can help me!, B'coz of I'm struggle to get the answer.

 

Anybody can give me the answer then I will appriciate!!

 

Thanks & Regards

T.R.Harihara SudhaN

 

 

 

 

indesign cs6 sdk c++ : how to create dynamic list item on panel

$
0
0

hi all, I'm new on indesign sdk. I want to make dynamic list view on my panel. on indesign sdk sample, .fr file is harcoded the script for the image, text, etc...

I feel so confused how to create dynamic item list thats included image and text on my panel like a listview on android application.

listview_with_images_and_text_run.png

please give me a suggestion or sample code...

 

 

thanks,

 

 

awans

 

*so sorry for my bad english

fatal error LNK1181: cannot open input file

$
0
0

Hi,

 

While running the sample plugins for Indesign CC 2015 version we are getting the below mentioned error 

LINK : fatal error LNK1181: cannot open input file '..\..\..\external\dva\third_party\boost_libraries\bin.v2\libs\boost_system\lib\win\relea se\32\boost_system.lib'

Kindly help us to fix this error?

 

 

 

 

Thanks,

Suganthi.B

Viewing all 78596 articles
Browse latest View live


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