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

Error while compiling CS5.5 sample code

$
0
0

Hi,

 

I have just started on using InDesign CS5.5. I am trying to compile the sample code on Windows 7 and with Visual Studio 2008. On compilation it is giving me an error of SDKLib.sdk.lib

 

"LINK : fatal error LNK1181: cannot open input file '..\..\..\build\win\objr\SDKLib.sdk.lib'"

 

Have I missed some settings. I have set the Bin folder in the tools option. If anyone knows about this error please do let me know.

 

Thanks all in advance.

 

Regards,

Farzana.


cannot handle the request because a modal dialog or alert is active.

$
0
0

hi all

i try to use indesign product sdk CS5 using com object to open and edit document with asp.net

this error appear to me in this part of my code

 

            InDesign.Application indApp = (InDesign.Application)Activator.CreateInstance(InDType, true);

         

           indApp.ScriptPreferences.UserInteractionLevel = idUserInteractionLevels.idNeverInteract;

         

            InDesign.Document objDoc = (InDesign.Document)indApp.Open(cstrInddFile, true, idOpenOptions.idDefault);

 

 

 

Cannot handle the request because a modal dialog or alert is active.\\\   at System.RuntimeType.ForwardCallToInvokeMember(String memberName, BindingFlags flags, Object target, Int32[] aWrapperTypes, MessageData& msgData) at InDesign.ScriptPreference.set_UserInteractionLevel(idUserInteractionLevels ) at _Default.Button1_Click(Object sender, EventArgs e)

 

thanks advance

How to change pasteboard size

$
0
0

I'm trying to change the size of the pasteboard in code, in the same way that a user would change it via Guides and Pasteboard Preferences.

 

The code I have at the moment seems to change the values displayed in the preferences dialog for "Horizontal margins" and "Vertical margins", but doesn't actually change the visible pasteboard.

Any ideas on what I'm doing wrong?

 

IDocument* doc = Utils<ILayoutUIUtils>()->GetFrontDocument();

InterfacePtr<IPasteboardPrefs> pasteboardPrefs(static_cast<IPasteboardPrefs>(::QueryPreferences(IID_IPASTEBOARDPREFERENC ES, doc)));

pasteboardPrefs->SetPasteboardBorder(newXVal, newYVal);

 

I've also tried an "apply" command I found, in follow up to the above code, but it made no difference:

 

InterfacePtr<ICommand> setPasteboardCmd(CmdUtils::CreateCommand(kSetPasteboardPrefsCmdBoss));

if (setPasteboardCmd) {

    CmdUtils::ProcessCommand(setPasteboardCmd);

}


Thanks in advance

How to get the horizontal offset of the text?

$
0
0

How to get the horizontal offset of the text?

 

Here is the code i'm trying now.

 

InterfacePtr<ITextModel> textModel(range.QueryModel());
TextIndex start = range.Start();
InterfacePtr<IWaxStrand> waxStrand((IWaxStrand*)textModel->QueryStrand(kFrameListBoss, IID_IWAXSTRAND));
K2::scoped_ptr<IWaxIterator> waxIterator(waxStrand->NewWaxIterator());
IWaxLine* waxLine = waxIterator->GetFirstWaxLine(start);
y = waxLine->GetYPosition();
x = waxLine->GetXPosition();
PMString test;
test.AppendNumber(x);
CAlert::InformationAlert(test);

 

Here GetYPosition() returns the baseline of the text but GetXPosition() returns always zero.

 

Regards,

Chinna

punctuation

$
0
0

I have problems with punctuation at the end of a sentence. Each time I add a dot at the end of a sentence, it always appears at the beginning of the line. How to fix it?

Plugin for In-Design feasibility

$
0
0

Hello I am new to In-Design However i am have some experience in Coding ,but i am in Delima  i have been assigned task of creating In-Design plugin or script which meets following requirement

 

  1. If desired, place low resolution layout versions of images, later automated replacement with high resolution images
  2. Previews of all pages of an InDesign document inside some CMS  (like PDF or video preview)
  3. Presentation of all images used in an InDesign document, with link to images (extension  of dependencies panel)
  4. Images, representation of all InDesign documents, where the image is used, with a link to the layout (extension  of dependencies panel).

 

  So what my findings till now is this can't be done in plugin alone which will be developed in c++ alone but we will also need script in node js which works as     api and send blob images to cms so that we can view it in cms. In other words

 

 

Showing Images from In-Design to CMS requires us to Scripts that send BLOB

images to cms Server and Uploads to cms Server through cms API.

 

There will be two way communication Between In-Design and cms which will

done by custom API’s which will change Data in (JSON or XML Format) written in

Node.js or Dot-Net.

 

 

So i want to know is my path correct is this requirement feasible?

Thanks in advance

Where is the list of KB doc of InDesign?

$
0
0

Hi everyone,

I'm facing an issue about table header in InDesign CC 2017.1 when developing plug-ins. Finally I found a post in InDesign CC Developer Prerelease. There was an announcement to let users run a script to replace some plug-ins manually to fix the issue. It also mentioned that there would be a KB doc for normal users. However I cannot find that KB doc till now. Any clue would be appreciated.

 

Thanks,

Aidy

Get FindChange query data

$
0
0

Hi Experts,

Screen Shot 2018-08-13 at 1.03.11 AM.png

I want to get all the saved queries in Find/Change.
Query names and their query data, i.e replace text, find text...etc
Only thing I could find was IFindChangeOptions but it does not have classes related to queries.

 

Can you please help me.


Doing a package at every save

$
0
0

I'm trying to create a package from my plugin by using:

 

     InterfacePtr<IS4SPPackage> ipkg((IS4SPPackage*)::CreateObject(kPackageAPIBoss, IID_IS4SPPACKAGEAPI));

    ipkg->Init( document);

    ipkg->SetPackageLocation( packageFolderID);

    ipkg->SetCopyFontsFlag( kTrue);

    ipkg->SetCopyGLinksFlag( kFalse);

    ipkg->SetUpdateGLinksFlag( kFalse);

    ipkg->SetViewReportFlag( kFalse);

    ipkg->SetCreateIDMLFlag( kFalse);

    ipkg->SetCreatePDFFlag( kFalse);

   

    IS4SPPackage::PackageRC rc = ipkg->PhysicalPackage();

 

Is this still the way to do it? I couldn't find much (or even nothing at all) documentation around this.

 

It seems to work, but not when I try to call it directly from within a  kAfterSaveDocSignalResponderService trigger.
Is there a specific reason why this doesn't work?

 

I was hoping to be able to create a package at every save with as little impact as possible.

 

Any suggestions appreciated!

What is the replacement for scripting property TextStyleRanges?

$
0
0

What is the replacement for scripting property TextStyleRanges?

 

Regards,

Chinna

Error when Exporting TextFrame to RTF?

$
0
0
void ExportRTF(UIDRef uidRefFrame, int length)<br />{<br />     InterfacePtr<ITextTarget> TargetBoss((ITextTarget*)::CreateObject(kTextSuiteBoss, IID_ITEXTTARGET));<br />     TargetBoss->SetTextUnmanaged(uidRefFrame, RangeData(0, length, RangeData::kLeanForward));<br /><br />     InterfacePtr<IExportProvider> provider((IExportProvider*)::CreateObject(kTaggedTextExportFilterBoss, IID_IEXPORTPROVIDER)); <br />     IDFile outputFile(PMString("D:\\test.rtf"));<br /><br />     IActiveContext *iContext = gSession->GetActiveContext();<br />     IDocument *iDoc = iContext->GetContextDocument(); <br /><br />     provider->ExportToFile(outputFile, iDoc, TargetBoss, "Rich Text Format", kSuppressUI);<br /><br />}<br /><br />When I export TextFrame to RTF, I receive the file "test.rtf" which has size 0Kb. So that, I want to know the reason.<br /><br />Who can you write function "ImportRTF"?

How to get ITextTarget from Current Focus

$
0
0
my code:<br />   Utils< ISelectionUtils> iSelectionUtils;<br />   ISelectionManager *iSelectionManager=iSelectionUtils->GetActiveSelection();<br /><br />InterfacePtr<ITextTarget> iTextTarget(iSelectionManager,UseDefaultIID());<br /><br />I can't get iTextTarget;<br /> I am a new idesign developer ,help me !

How to get ITextTarget or iTextModel from current TextFocus?

$
0
0
How to get ITextTarget or ITextModel from current TextFocus?

And how to get current TextFocus?

How can I obtain an interface pointer to the CSB text suite in a document without a layout window

$
0
0
Hi

I create a document without a layout window. Now, in my code, I like to obtain the interface pointer to the text suite I defined in my fr file.

AddIn
{
kTextSuiteBoss,
kInvalidClass,
{
IID_IINDESIGNTEXTSUITE, kIndesignTextSuiteCSBImpl
}
},

But the interface pointer is always nil, if I have no layout window. The document is open, but without the layout window.

How can I obtain this interface pointer?

Thanks a lot for the support
Hans

How to get the cursor position in the text edit box?

$
0
0
Hi, all.

I want to get the cursor position in the text edit box
to insert some data.
But I don't know how to get.

Can someone give me some advice?

BestRegard.
Miya.

rtf import/export of a textframe

$
0
0
hi,

is it possible to export and import textframe contents to/from a rtf file? (with the api)

best regards

How create user defined suite and it's instance

$
0
0
I have create one user defined suite interface (ISuite) and inherite it to IsuiteASB and IsuiteCSB . The purpose of creating user defined suite is to provide hyphenation for selected text. I want to add a method which will detect whether a text has been selected by user or not , if selected then I am calling one hyphator function. I am not able to create an instance of user defined suite . I am using following syntax: <br />in UpdateActionState I am using <br />   InterfacePtr<ISuite>suite(ac->GetContextSelection(),UseDefaultIID()); <br /><br />in one user defined method I am using <br />  InterfacePtr<ISuite>suite(Utils<ISelectionUtils>()->GetActiveSelection() , UseDefaultIID()); <br /><br />Both calls unsuccessfull. <br /><br />Which Interface I should use to detect whether Text has been selected by user or ITextUtils or any other. <br />Please tell me the preoper way to create interface suite and create instance of it. <br />Thank you.

[CS3] Enable menu if cursor in text

$
0
0
Beginner to SDK. Sounds easy but I just can't get it right.
I only want to enable menu if either text is selected or insertion point is in text. However it should be enabled for textFrame Text Editor and Galley Text.
That is what is giving me a hard time getting it to work in story editor etc..
Thanks in Advance
ABC GREEN

Is IFindChangeService::SearchForFont() API has bug ?

$
0
0

Hi everyone,

 

I am trying to search for font used in the document. I am using IFindChangeService::SearchForFont() API.

 

It does give me FindChangeResult::kSuccess everytime the font with fontUID and fontStye is found in the document. It also set selection to the textRange in which it found the font But THE API DOES NOT give start and end index of textRange as mentioned in CHM.

 

I have tested all possible cases and it does not return start, end index for any of the case specified in CHM.

 

It also crashes Indesign at 2nd sccessive search. Please help me with this. Is there some work around with this problem OR I have missed something in my code.

 

Here is my code:

 

        TextIndex    start            = kInvalidTextIndex;
        TextIndex    end                = kInvalidTextIndex;
        UID            fontUID            = MyUtils::GetFontUIDInDocument(fontFamily + " " + fontStyle);
        if(fontUID == kInvalidUID)        break;

 

        InterfacePtr<IFindChangeService> findChangeService ( (IFindChangeService*)::CreateObject(kFindChangeServiceBoss, IID_IFINDCHANGSERVICE));
        if (!findChangeService)            break;

 

            // search and set focus on the text with this font
        IFindChangeService::FindChangeResult fChResult = findChangeService->SearchForFont(docRef, start, end, fontUID, fontStyle);

 

Thanks,

D

How create Indesign application using vc++

$
0
0

Hi

I want to ask  that How create Indesign application using vc++ ?

I am able to develop application in C# using COM and generate Interop.Indesign.dll using Adobe Indesign CS5.5 Type Library

 

I am sucessfully create Indesign instance using this code

 

Type type = Type.GetTypeFromProgID("InDesign.Application");

 

InDesign._Application application = (InDesign._Application)Activator.CreateInstance(type);

 

I am not understand how use COM with vc++ or there is another method to create Indesign instance using vc++.

or

How use Interop.Indesign.dll in vc++ to create indesign instance.

There is no .tlb file in indesign directory by which i generate .h and .cpp file that i can use in my project.

 

I want to create Indesign in vc++.

 

Thanks

Viewing all 78596 articles
Browse latest View live


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