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

InDesign Crashes while placing images on document.

$
0
0

Hi All,

 

I am facing problem and i am stuck at this point.

 

I download an image in a folder and place it in graphic box using IImportExportFacade's ImportAndLoadPlaceGun method it is working fine, but when i delete placed image from folder then it becomes as missing link after that if I download the same image at same path and try to place in another graphic box using same above API then indesign get crashed.

 

What is problem Any idea?

 

Please help me if anyone having same isuue i need to fix it urget.

 

Thanks in advance.

 

Regards

Tahir.


General Question to initiate API-Classes

$
0
0
Hello <br /><br />i am a new ID Plugin Developer. I have wrote until now one PlugIn.<br />Which execute a JS and provides own functions for JS.<br />I have still problems to understand, how can I use/initiate API-Classes.<br />I found out up to now over the Samples.<br />For Example I want to use the Class IScriptArgs. Over the reference I could not find out, how I can use it.<br />Kamrun helped me in this Forum with the following code:<br />Utils<IScriptArgs>()->Save();<br />Utils<IScriptArgs>()->Set(PMString("key"), PMString("value")); <br /><br />How can i get this result with the Adobe CPP Reference ?<br />And now I want to use the method "InvokeFunction" from "IScriptRunner".<br />I can initiate the Class "IScriptRunner". But I dont know, how can I initiate<br />"IScriptCoreFunctor" and "IScriptEventData", which is needed to invoke the method "InvokeFunction".<br /><br />Regards<br />asci

Find out about the pasted item...

$
0
0
I followed the class PstLstDocObserver in the sample project persistentlist in CS3 and I can detect the delete command without problem.

Now I want to detect the paste command (actually to find out the UIDRef's of the pasted items) but I couldn't find a match for kPasteCmdBoss, kPasteInsideCmdBoss, and kPasteGraphicItemCmdBoss.

All I did was to copy a rectangular frame through the GUI by hand...

Perhaps I am checking the wrong command boss?

Thanks in advance for your help.

pete

Icons in DropDownlist

$
0
0
Is there any UI element in the InDesign existing UI that can be used to add Icons in the DropDownList element. Similar to the UIColorDropDownListWidget or CornerEffectWidget or LineEndPopupBoss, is there any other solution to add icons to the DropDownList along with the Text.

Thanks in advance for your help.

[CS4 Mac] Panel's icons

$
0
0
Hello,

I am running into a strange issue and hope someone in this forum could explain or even better correct my mistakes...

I am trying to customize my plugin's panel icon - that's the icon InDesign is showing in the dock bar at right hand when a panel is docked.

I would like to replace default SDK icon my custom Active and RollOver 23 x 23 pixels icons.

In order to do so I am including my PNG file adding the following lines into my .fr file:

resource PNGA(kMyIconRsrcID) "MyIconA.png"
resource PNGR(kMyIconRsrcID) "MyIconR.png"

But when I compile this fr.files I am getting this error:

Line Location Tool:0: Command /bin/sh failed with exit code 1
Line Location Tool:0: {SDK}/devtools/bin/odfrc-cmd - Execution terminated!
Line Location Tool:0: # Fatal error:
Line Location Tool:0: File {Projects}/MyPlugin/res/MyPlugin.fr; Line 81 # Error: Bad filename passed to #include: MyIconA.png
Line Location Tool:0: Beginning ODFRC

If I understand it correctly it means ODFRC compiler failed to include my PNG file reference because of... a "Bad filename" ? ? ?

What's wrong hare above with these file names? I just don't see it...

Am I doing anything wrong?
Should I include some extra header in my .fr file?
What's the correct location for these PNG files in my project tree?
Do we have a sample in SDK that's doing what I am trying to do?
Or is this a known issue of CS4 on the mac?

A lot of questions indeed so I hope someone in this forum will jump on this and give me some pointers to have this issue addressed ASAP.

Best regards

Patrick Perroud

Enhancing persistent data

$
0
0
Hi
i have got a dialog box with persistent data. Now i go to enhance the dialog and the persistent data. After doing that i run everytime into the assert:
"PMString::ReadWrite - Unknown format number (45) while reading." and then "kWorkspaceBoss[WorkspacePrefix + 1 (0x2201)]:kOptionDataPersistImpl[PMM_AG + 6 (0x8fa06)] read past end of interface."
I receive this error only when i go to ReadWrite the data. When i disable the ReadWrite for the new data, no error is shown. It seems the database has the old structure, and is not able to create the new one. When i start the plugin on a other Indesign installation, it works fine. How can i fix this problem on my developer machine. Should i reinstall the indesign debug version? or can i delete the old database? And when, where is it located?

Best thanks
Lorenzo Medici

[CS3 Mac] ColorListDropDownElementWidget - How To?

$
0
0
Hello,

I would need to implement a color popup exactly like CS3 did in Preferences->Guides & Pasteboard->Color->Margins (etc).

According to debug build's Panel Edit Mode - this is a kColorListDropDownElementWidgetBoss.

Good to know - but, how we do add color swatches on the fly to this color popup is still not clear to me: any advice and direction to achieve this task would be very much appreciated indeed.

Best regards

Patrick Perroud

[CS4-Win] Thread problem while porting

$
0
0

I'm porting my plugin from CS3 to CS4 and I get following error while trying to open document:

 

Thread local data subsystem not initialized for this thread.
BeginPublicThreadBottleneck has not been called. (known leopard nav services problem here)

 

In CS3 this code works.

I use Windows native threads in my plugin.

 

Also I've got several warnings with following text:

 

CTUnicodeTranslator - Calling into single threaded CoolType from a thread - not safe

 

Can anybody help?


CS3: Treeview Node Icon

$
0
0

Hi all,

 

I want to add Icon to treeview node.

I have one folder, i want to list items  in treeview with ICONS.

I tried with

 

::SHGetFileInfo(ucPath.GrabTString(), 0,&info, sizeof(info), SHGFI_ICON | SHGFI_SMALLICON | SHGFI_SHELLICONSIZE | SHGFI_TYPENAME | SHGFI_DISPLAYNAME )


iconView->SetRsrcID((RsrcID) info.iIcon);

 

but it is not working.

 

Please help,

 

Thanks,

 

Vikram

[CS2] InDesign asserts in WGenericTabView

$
0
0

Hi,

 

I've recently upgraded to the latest debug build of InDesign and InCopy CS2 and I'm getting a new assert in the process of starting up.

Apart from the fact it's a real pain because it comes up about 8 times, I'd like to be able to run with no asserts.

 

"ASSERT: ASSERT 'rgbColor.red<=0xFF && rgbColor.green<=0xFF && rgbColor.blue<=0xFF' in \Development\firedrake_highprofile\source\components\appui\tabpalette\WGenericTabView.cpp at line 103 failed."

 

As far as I can assertain, no code changed to cause this it just seemed to be the upgrade.

I'm running Build number 711, Debug Change #632216, version 4.0.6.

 

At the point at which the assert comes up the stack crawl is as shown below, it doesn't seem to go back to our own code.

My guess is that there is something set up in one of our panel resources which isn't quite as expected, but what.

 

Has anyone seen this, or better still know what causes it.

Is there anywhere on this stack crawl that I could trace back to, to find which of our resources or code is causing the problem?

 

Many thank

 

Caerwyn Pearce

 

 

 

 

     Application UI.rpln!WGenericTabView::WGenericTabView()  + 0xc3 bytes   
     Application UI.rpln!_CreatekGenericTabViewImpl_()  + 0x1e bytes   
     ObjectModel.dll!InterfaceRegistry::CreateInterface()  + 0x1f3 bytes   
     ObjectModel.dll!ClassInfo::CreateInterface()  + 0x246 bytes   
     ObjectModel.dll!PersistControllingUnknown::QueryInterface()  + 0x1ca bytes   
     Database.dll!DataBase::Instantiate()  + 0x256 bytes   
     WidgetBin.dll!CPanelControlData::QueryWidget()  + 0x27e bytes   
     WidgetBin.dll!CPanelControlData::ReadWrite()  + 0x2d0 bytes   
     Widgets.rpln!ReadWritekCPanelControlDataImpl_()  + 0x21 bytes   
     ObjectModel.dll!PMPersist::LoadOne()  + 0x1ff bytes   
     ObjectModel.dll!PersistControllingUnknown::QueryInterface()  + 0x26c bytes   
     WidgetBin.dll!HelperInterface::QueryInterface()  + 0x83 bytes   
     WidgetBin.dll!CControlView::QueryInterface()  + 0x3e bytes   
     WidgetBin.dll!InterfacePtr<IPanelControlData>::QueryInterface_()  + 0x22 bytes   
     WidgetBin.dll!PanelView::DeleteDrawRegion()  + 0x2c bytes   
     WidgetBin.dll!CControlView::InvalidateTransform()  + 0x31 bytes   
     WidgetBin.dll!PanelView::InvalidateTransform()  + 0x11 bytes   
     Widgets.rpln!WidgetParent::SetParent()  + 0x99 bytes   
     WidgetBin.dll!AbstractPanelControlData::ChangeWidgetParent()  + 0x6c bytes   
     WidgetBin.dll!BaseTabPanelControlData::AddToWidgetList()  + 0x2b8 bytes   
     WidgetBin.dll!BaseTabPanelControlData::ReadWrite()  + 0x2ea bytes   
     Application UI.rpln!ReadWritekTabStash_PaletteSectionPanelControlDataImpl_()  + 0x21 bytes   
     ObjectModel.dll!PMPersist::LoadOne()  + 0x1ff bytes   
     ObjectModel.dll!PersistControllingUnknown::QueryInterface()  + 0x26c bytes   
     WidgetBin.dll!HelperInterface::QueryInterface()  + 0x83 bytes   
     WidgetBin.dll!CControlView::QueryInterface()  + 0x3e bytes   
     WidgetBin.dll!InterfacePtr<IPanelControlData>::QueryInterface_()  + 0x22 bytes   
     WidgetBin.dll!PanelView::DeleteDrawRegion()  + 0x2c bytes   
     WidgetBin.dll!CControlView::InvalidateTransform()  + 0x31 bytes   
     WidgetBin.dll!PanelView::InvalidateTransform()  + 0x11 bytes   
     Widgets.rpln!WidgetParent::SetParent()  + 0x99 bytes   
     WidgetBin.dll!AbstractPanelControlData::ChangeWidgetParent()  + 0x6c bytes   
     WidgetBin.dll!CPanelControlData::AddToWidgetList()  + 0x82 bytes   
     WidgetBin.dll!CPanelControlData::ReadWrite()  + 0x2f0 bytes   
     Application UI.rpln!ReadWritekTabPaletteControlDataImpl_()  + 0x21 bytes   
     ObjectModel.dll!PMPersist::LoadOne()  + 0x1ff bytes   
     ObjectModel.dll!PersistControllingUnknown::QueryInterface()  + 0x26c bytes   
     WidgetBin.dll!HelperInterface::QueryInterface()  + 0x83 bytes   
     WidgetBin.dll!CControlView::QueryInterface()  + 0x3e bytes   
     WidgetBin.dll!InterfacePtr<IPanelControlData>::QueryInterface_()  + 0x22 bytes   
     WidgetBin.dll!PanelView::DeleteDrawRegion()  + 0x2c bytes   
     WidgetBin.dll!CControlView::InvalidateTransform()  + 0x31 bytes   
     WidgetBin.dll!PanelView::InvalidateTransform()  + 0x11 bytes   
     WidgetBin.dll!CControlView::WindowChanged()  + 0x56 bytes   
     WidgetBin.dll!PanelView::WindowChanged()  + 0x11 bytes   
     WidgetBin.dll!WWindow::OpenWindow()  + 0xcd1 bytes   
     Application UI.rpln!WTabStash_Window::OpenWindow()  + 0x8d bytes   
     Application UI.rpln!CPaletteMgr::Startup()  + 0x734 bytes  

DropDownList widget

$
0
0

In the WriteFishPrice plugin that is used as a tutorial there is a DroDownList widget and the strings that are part of that DropDownList are defined in the header file and then implemented in the WFPDialogWidget resource: But how would you populate the dropdown widget with paragraph styles or fonts where you don't know beforehand exactly what the strings will be?

how to get textmodel of different tags of the same textframe?

$
0
0

I have one textframe tagged as Parent_text in that textbox I have wirrent three sentences and tagged as Tag_1, Tag_2 and Tag_3 respectively.

 

I have set different font size for Tag_1, Tag_2 and Tag_3. Now I want to set different font size to each Tagged sentences programmatically.

 

Below is my code :

 

  IXMLReferenceData *xmlReferenceData= Utils<IXMLUtils>()->QueryXMLReferenceData(pageItemRef);
 
  XMLReference ref = xmlReferenceData->GetReference();
  InterfacePtr<IIDXMLElement> element(ref.Instantiate());

  for(int32 i=0; i < element->GetChildCount(); i++) {
     XMLReference childRef = element->GetNthChild(i);
     InterfacePtr<IIDXMLElement> child_element(childRef.Instantiate());
     InterfacePtr<ITextModel> textModel(Utils<IXMLUtils>()->QueryTextModel(child_element));
    
   }

 

But I got textModel which is the whole text of the text frame . But I want different textModel for each Tag element.

If anybody know how to do this please help me.

 

Thanks,

How to recreate a Boss instance when import IDML?

$
0
0

Hi guys,

I have created a customized model and exported it to IDML.

From the PersistentList sample, I found that it recreate the Customized Object with UID when the Create event is invoke.

But, in my code, the Create event is not invoked. Do you have any suggestion about this? Any suggestion is appreciated.

 

Below is the resource added to the .fr.

 

resource VersionedScriptElementInfo(10)
{
    //Contexts
    {
        kFiredrakeScriptVersion, kCoreScriptManagerBoss, kInDesignAllLanguagesFS, k_Wild,
        kFiredrakeScriptVersion, kCoreScriptManagerBoss, kInDesignServerAllLanguagesFS, k_Wild,
    }
   
    //Elements
    {   
        Suite
        {
            kMySuiteScriptElement,
            s_MySuite,
            "persistent list suite",
            "Terms applicable to PersistList operations",
        }
        // Defines new script element object for this plug-in's preferences
        Object
        {
            kMyObjectScriptElement,    // this object's script element ID
            c_My,                        // ScriptID
            "MyModel",        // name
            "MyModel",        // description
            kMy_CLSID,           // Windows CLSID
            NoPluralInfo,                    // CollectionElementType (scriptID, name, descr, CLSID)
            kUniqueIDBasedObjectScriptElement,// base object script element ID
            kMySuiteScriptElement,    // suite script element ID
        }

 

        Event
        {
            kMyDataCreateEventScriptElement,
            e_Create,
            "add",
            "Create a new ^Object",
            ObjectType(kContainerObjectScriptElement),
            "The new ^Object",
            {
                p_Name,
                "name",
                "The name property of the new ^Object",
                StringDefaultType(kMyDataItemNameDefault),
                kOptional,
                WITHPROPERTIESPARAM
            }
        }
   
        Provider
        {
            kMyScriptProviderBoss,
            {
                Parent{ kDocumentObjectScriptElement },    //kDocumentObjectScriptElement, kStoryObjectScriptElement
                RepresentObject{ kMyObjectScriptElement },       
               
                Event{ kMyDataCreateEventScriptElement },                       
                Property{ kNamePropertyScriptElement, kReadWrite },       
            }
        }
    }
};

How to open color chooser or color picker dialog of InDesign from plugin ?

$
0
0

Hi,

I want to open color chooser dialog of InDesign from my plugin to customize the color of grid or guides. I couldn't find any way to open this dialog from my plugin. Plz let me know how can I open this?

The dialog I'm talking about is the one which is opened when we select "Custom" entry from color dropdown in grid preferences.

colordialog.JPG

 

Thanks in advance for replying

GlyphID reverse lookup to get Unicode characters

$
0
0

In my plug-in I have a GlyphID extracted from an IPMFont* but the glyph does not have a unicode value because it is a ligature, a combination of many unicode characters. Is there a way I can query the IPMFont* object to find out what unicode characters need to be used to convert to this ligature. In a TrueType font this information would be held in the 'GSUB' (Glyph SUBstitution) table.

 

a simple example of this would be:

 

'f' + 'f' + 'i' = 'ffi'

 

'1' + '/' + '2' = '½'

 

So the glyphID I have would be the 'ffi' or the '½' glyph and I need to find out the 3 unicode characters which, when used in combination, would cause that glyph to be used.

 

This is then extended to Arabic and Hindi fonts where the Ligatures are highly important in drawing the script correctly.

 

Using Utils<IGlyphUtils>->GlyphToCharacter (font, glyph, &userAreaChar) does not work as the glyph has no Unicode character representation so the function just returns 0.

 

Likewise Utils<IGlyphUtils>->GetUnicodeForGlyphID (font, glyph) gives the same result


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

X,Y coordinates of a page item in indesign cs3

$
0
0

Hi,

     I need to get the X,Y coordinates of a selected page item based on left-top of the frame. I tried all possible methods to find X,Y coordinates of a page item. But calculated coordinates is warrying from indesign UI displayed X,Y coordinates.

 

My code snippet is below:

 

InterfacePtr<IHierarchy> node(itemRef, IID_IHIERARCHY);

InterfacePtr<ITransform> transform(node, IID_ITRANSFORM);

PMMatrix inner2parent =transform->GetInnerToParentMatrix();

PBPMRect bBox =pGeometry->GetStrokeBoundingBox(inner2parent);

PMPoint leftTop=bBox.LeftTop();

 

 

The itemRef is my selected rectangle frame reference.

Anything wrong in my code please give a solution immediately. I need a exact X,Y coordinates like indesign Ui displayed.

 

Thanks

K.Saravanan

How to set default file path for save

$
0
0

Hello all,

 

I'm currently blocked on the below issue and is hoping to gain your help and insights.

 

We have recently upgraded to InDesign CS6. Now when an INDD file created in an older version of INDD is opened in CS6, all the save dialogs would not default to the location of the original INDD file. Though if the same file is opened in the version of InDesign that created it, the save dialog goes to the proper location by default.

 

Debugged using our custom plugin as a gate way, and found out that after InDesign CS6 performed the document upgrade/convert, the database for the converted document loses file information. i.e.  IDataBase::GetSysFile() returns nil. I think we can figure out some way to get the original file path. For example, we can intercept "kAfterOpenDocSignalResponderService", and get the original file path of the opened file from IDocumentSignalData. Though I haven't yet able to figure out a safe way to set this file path to the document, so that the save dialogs would by default point at this path.

 

Utils<Facade::IWorkgroupFacade>()->InitDocumentAssetManagement(docRef, filePath) seems to do the right thing, but it seems to be quite intruding, and I'm afraid that it is overkilling and will cause bad side effect for the use case I'm looking for.

 

So I'm wondering if anyone has any suggestions to achieve this without implementing/overriding the file save dialog.

 

Thanks.

-Jeff

Indesign CC extension ZXP signing not working!

$
0
0

I am using eclipse and trying to export my Plugin as ZXP but it is not getting loaded in Extension Manager in "Indesign CC" menu instead it is appearing in "Others"menu.

I tried signing the zxp file by creating the certificate as below:

 

1_generating_certificate.jpg

 

2_Exporting_ZXP.jpg

 

3_loading_ZXP.jpg

 

4_not_loaded.jpg

 

Please let me know if there is anything wrong here or what is the correct procedure to do this.

ApplyDataOnWidget not called

Viewing all 78596 articles
Browse latest View live


Latest Images