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

Overset story

$
0
0

Hi,

 

Given an overset story I find page items that the story text wraps around. My goal is now to scale the covering page items until the story is no more overset.

 

I use Utils<Facade::ITransformFacade>()->TransformItems(...) to perform the scaling task, and Utils<ITextUtils>()->CountOversetLines(...) to get the number of overset lines.

 

My problem is that "CountOversetLines" returns the same number of overset lines after the covering page items has been scaled down?

Saving and reopening the document does the trick, so i assume I need to fire a change event on some object?

 

I really hope somebody has a solution for this issue.

 

Thanks

 

Kind regards Toke


Method that works like LastIndexOfCharacter() method of PMString

$
0
0

I am not able  to find any method of WideString  that corresponds to LastIndexOfCharacter() method of PMString.

IDCS5 - how to programatically create IAssignedStory ?

$
0
0

Hello all,

 

Here is my problem:

 

I need to get stories not yet assigned (not even to Unassigned InCopy Content), export them and assign them to the Unassigned InCopy Content...

 

I tried to export using ISnnipetExport and create the link via LinkManager, but they don't assign automatically to anything

 

What I need is to do something like the InCopy-Export menu in ID, but without any user interface.

 

Any help would be appreciated.

 

Thanks,

 

Gustavo

Draw an Icon into a generic panel widget

$
0
0

Hi

 

In my GUI, I have a GenericPanelWidget with his own drawer. In this widget I get out a preview of a file, e.g. a JPG. A few files I can't get out a preview (e.g. a word document), in this case I want to draw an icon from the resource file (fr). The icon in the resource file is something like "resource PNGA(kPicIcoTopOutsidePictureRsrcID) "TopOutside.png"".

 

How can I do that?

How can I draw an icon form the fr resource into this widget?

Instead of PNG, can I use BMP (Bitmap)?

 

Thanks for any help.

Hans

how to get a paragraph uidref in a text frame?

$
0
0

pls anybody give me an idea about to get paragraph uidref in a text frame?

Co-ordinates of Page Items after transformations

$
0
0

Hi All,

I have been trying to get the co-ordinates of the rotated bounding box of a page item after it has been rotated.

But what I get when I use IGeometry Interface are the co-ordinates of the enclosing bounding box of the page item  and not the actualt bounding box.

 

Please see image the image below.

 

I need (X,Y) and what I get is (X1,Y1)

 

Using this code snippet:

InterfacePtr<ITransform> transform(itemrefUseDefaultIID());
PMMatrix  matrix( transform->GetInnerToParentMatrix ());
InterfacePtr<IGeometry> geometry(itemRef), UseDefaultIID());
PMRect  rect = geometry->GetStrokeBoundingBox(matrix);

 

 

 

 

 

Transformation issue.JPG

xpath indesign sdk?

$
0
0

hi,

     Now,i am working with xml based document.In this project ,i have xpath as a PMString.Here i want to know how to get XMLReference object using xpath?

pls anyone guide me,who worked with this one before.

 

thanks,

vijay

ICML image story specific problem

$
0
0

Scenario:

1. Check-out image story

2. Place another image

3. Change position of graphic image inside pageitem (simply move it by hand)

4. Check-in story

5. Then I try to change LinkResourceURI node into ICML-story by ID plugin (or other software)

6. Link in links panel shows outdated link

7. When I try to sync outdated link, ID show new graphic image in old position (before step 2).

 

But when I save ID document between steps 3 and 4, new graphic image stay in valid new position.

Problem: I can't "Save document" programmatically into my customized IAMService CheckIn routine.


Issuse with adding an image to a widget (Indesign plugin development)

$
0
0

Hi friends,

 

I have issue with adding an image to a widget .

 

#ifdef __ODFRC__

 

#include "PicIcoID.h"

 

     resource PNGA(kPicIcoPNGIconRsrcID) "Image.png"

     resource PNGR(kPicIcoPNGIconRollRsrcID) "ImageR.png"

 

#endif

 

 

#include "PicIcoID.h"

 

type PicIcoRollOverIconButtonWidget (kViewRsrcType) : RollOverIconButtonWidget(ClassID = kPicIcoRollOverIconButtonObserverBoss)

{

};

 

..........

..........

...........

        PicIcoRollOverIconButtonWidget

        (

            kPicIcoRollOverIconButtonWidgetID,

            kPicIcoPNGIconRsrcID,

            kPicIcoPluginID,    // WidgetId, RsrcId

            kBindNone,                                            // Frame binding

            Frame(35,5,53,23)        // Frame

            kTrue, kTrue,                                    // Visible, Enabled

            kADBEIconSuiteButtonType,

        ),

               

   

.............

............

 

 

this is the code which i use . the issue is if i use default sdk images (eg:SDKinfobutton.png ) it works fine .Other than sdk images i am not able to add it to the widget .It just shows blank.

 

Help or Advice Please ......

Built_products_dir is undefined

$
0
0

Hi,

   

While creating a new plugin using SDK for CS 5.5 i got an error "error - built_products_dir not defined" The SDK snippet runner sample plugin whihc is in the same path is working without any error.

 

So I have removed the source files from snippet runner project, added my source files into the snippet runner project. While compiling  the project it is giving one error - "built_products_dir not defined". Can someone help me in reso

How to load ".pln" plugin in indesign

$
0
0

Hi everyone,

 

 

     I have created a plugin using DollyXs " DollyTest.pln " and copied the plugin with its supporting files in the Adobe indesin plugin directory.

But when I launch the indesign it gives the error- " Adobe Indesign cannot load the DollyTest plugin ". I have attached the screenshot of the error dialog. Anyone please tell me how to run the plugin that I have created.

 

Thanks,

Ranjan Singh

plugin error.jpg

How Create bookmark

$
0
0

Hi

can any one tell me how create bookmark using java script ?

I want to create a bookmark on a Billjoy, there is a problem in parameter of  bookmarks.Add() function.

 

 

INDESIGN::_Application oApplication;

INDESIGN::Document objDoc;

objDoc=oApplication.GetActiveDocument();

INDESIGN::Pages pages= objDoc.GetPages();

INDESIGN::Page  page =pages.GetItem(COleVariant((long)1));

INDESIGN::TextFrames TextFrames =page.GetTextFrames();

INDESIGN::TextFrame TextFrame = TextFrames.Add(covOptional,(long)1433299822,covOptional);

TextFrame.SetContents(COleVariant(L"Billjoy"));

 

// i want to create bookmark on billjoy

 

INDESIGN::Bookmarks bookmarks = objDoc.GetBookmarks();

bookmarks.Add(

 

Parameters is destination of type  HyperlinkExternalPageDestination or HyperlinklPageDestination or

HyperlinklTextDestination or Page.

 

How use these type of parameter.

 

Thanks.

[ID-CS5.5] Plugin's compatibility issues with 64-bit OS

$
0
0

Hi All,

 

I build a plugin and tested it successfully in my InDesign CS 5.5 (32-bit OS).

 

But when I tested the same for InDesign CS5.5 in a 64-bit OS (the InDesign was 32-bit), it says that "the plugin is not compatible with this version. Ask your vendor to make a compatible version of the plugin".

 

What might be the issue?

 

Thanks

Frame content alignment

$
0
0

Hi All,

 

Does anyone know how to retrieve and set frame content alignment settings, not text alignment?

FrameContent.png

Thank you in advance.

BUG: IDTime.SetTime does not validate parameters on CS6 Mac

$
0
0

I have just discovered that IDTime does not validate parameters in SetTime (year, month, day, hour, min, sec) function. I can set 29th February, 2013 as a date and it happily returns true.

 

I checked it further, it happily accepts even zero in any of the fields.

 

It works properly on Windows CS6 SDK.

 

Now, I have to make a Mac specific code to validate the date.


.fres is an empty file

$
0
0

Hi All,

 

Can anybody help me, im trying to create my first plugin for CS6. Im unable to build a plugin the following errors are occur while building.

 

1>------ Build started: Project: test, Configuration: Debug Win32 ------

1>  VCPlugInHeaders.cpp

1>  testActionComponent.cpp

1>  testDialogController.cpp

1>  testDialogObserver.cpp

1>  PlugInStatics.cpp

1>  SDKPlugInEntrypoint.cpp

1>  testID.cpp

1>  testNoStrip.cpp

1>  TriggerResourceDeps.cpp

1>  Generating Code...

1>  Performing Custom Build Tools

1>  ODFRC deleting old resources...

1>  Could Not Find C:\Indesign_Plugin\CS6SDK\build\win\objD\test\*.idrc

1>  merge_res.cmd - calling ConcatRes

1>          1 file(s) copied.

1>  ConcatRes skipped since "..\objD\test"\test.fres is an empty file.

1>  merge_res.cmd done.

1>  Deleting old resources...

1>  The system cannot find the file specified.

1>  'xcopy' is not recognized as an internal or external command,

1>  operable program or batch file.

1>C:\Program Files\MSBuild\Microsoft.Cpp\v4.0\Microsoft.CppCommon.targets(108,5): error MSB3073: The command "merge_res.cmd "..\objD\test\"  test & echo Deleting old resources... & del /f /s "C:\Indesign_Plugin\CS6SDK\build\win\debug\sdk\(test.sdk Resources)\"*.idrc > ..\objD\Chinna\prevDeletedResources.txt &  xcopy /Q /E "..\objD\test\"*.idrc "C:\Indesign_Plugin\CS6SDK\build\win\debug\sdk\(test.sdk Resources)\" /Y

1>C:\Program Files\MSBuild\Microsoft.Cpp\v4.0\Microsoft.CppCommon.targets(108,5): error MSB3073: :VCEnd" exited with code 1.

========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

 

Regards,

Learner

How to get the UIDRef of Text frame associated with hyperlink?

$
0
0

Hi,

 

I have a document which contains Text hyperlinks . I am able to get the number of hyperlinks present in document using "IHyperlinkTable" and text range to which hyperlink is associated using interface "IHyperlink".

 

InterfacePtr<IHyperlink> hyperlink(tableDb, table->GetNthHyperlink(i), IID_IHYPERLINK);

if(hyperlink)

{

       hyperlink->GetName(&sHyperlinkName); //sHyperlinkName is text to which hyperlink is associated

}

 

now I need to find the UIDRef of Text frame with which hyperlink is associated.

 

I can get the UIDRef of "Image frame" using interface "IHyperlinkPageItemSourceData".

 

InterfacePtr<IHyperlinkPageItemSourceData> sourceHyperLink (tableDb, hyperlink->GetSourceUID(), UseDefaultIID());

if (sourceHyperLink)

{

        UID sourceHyperLinkUID  = sourceHyperLink->GetSourceUID();

}

 

but this interface may be not helpful in case of text in the frame (word/words) associated with hyperlink.

 

 

If anyone has done this please do let me know.

 

Thank you all in advance.

 

Priyanka

Export command do not show missing font error

$
0
0

Our plug-in is using the SDK's PDFExportCmd to export InDesign file to PDF.

 

Every thing works fine, except we got into a serious issue when one of the Font is missing in the Indesign file.

 

When an InDesign file having missing font is exported it successfully converted to PDF without reporting any error, by replacing the missing font with default font!

 

The PDF preset used has following properties but looks like InDesign completely ignore these property.

 

/CannotEmbedFontPolicy /Warning

 

or

 

/CannotEmbedFontPolicy /Error

 

or

 

/CannotEmbedFontPolicy /Ignore

 

Please note that when same InDesign file is exported using InDesign's Export...  it reports the error message saying Font is missing!

 

Are we missing something?

Is there some properties that need to be set while exporting to PDF?

Or is it a serious bug in PDFExportCmd?

 

Alternatively is there a way to validate the InDesign file before exporting?

 

(I saw the api IExportValidationCmdData, but there is no documentation on it usage.)

Generate package report file

$
0
0

Hi All,

I want to generate only package report same as inDesign's package report(File->package->report).

I have tried below code snippet,

 

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

if(!iPakager)

    break;

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

if(!document)

   break;

iPakager->Init(document);

iPakager->SetPackageLocation(pacakeFilePath);

iPakager->SetViewReportFlag(kFalse);

iPakager->SetCopyFontsFlag(kTrue);

InterfacePtr<IPackageReport> iPakage((IPackageReport*)::CreateObject(kS4SPPackageReportBoss, IID_IS4SPPACKAGEREPORT));

if(iPakage)

  iPakage->GenerateReport(iPakager);

 

Report file is generated(missing most of the information) but,generated report file and indesign's report file both are different.

Any idea what I am doing wrong?

 

Thanks in advance.

Tahir.

Lexical or Preprocessor issue 'Files.h' file not found

$
0
0

Hi,

 

I have run the InDesign CS6 sample plugin in Xcode 6.1 version. I'm getting the lexical or preprocessor issue 'Files.h' file not found.

Please help me to fix this issue.

 

Thanks,

Vimala L

Viewing all 78596 articles
Browse latest View live


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