Skip to main content
FarzanaA
Inspiring
June 10, 2025
Question

How to place object from Indesign library file to document through IDSDK 2025 (Win)

  • June 10, 2025
  • 1 reply
  • 479 views

Hello All,

I am trying to place an object from InDesign Library file on the document. I am trying to Import the object via ISnippetImport. It gives success but am not able to find the object on the InDesign document. What do I need to do to get the object.

 

Thanks & Regards

Farzana

1 reply

Community Expert
June 10, 2025

Hi @FarzanaA ,

when done not with the SDK, but by scripting with ExtendScript I would look after the highest value(s) for the ID of pageItems. Before and after the import.

 

Regards,
Uwe Laubender
( Adobe Community Expert )

FarzanaA
FarzanaAAuthor
Inspiring
June 11, 2025

Hi,

I tried with script too. I get the item from Library and create a new rectangle and try to place in that rectangle but that too didn't work. 

Not sure what am I missing.

 

Thanks

Farzana

Community Expert
June 12, 2025

Hi @FarzanaA ,

hm, when you look into the DOM documentation for ExtendScript, you'll see that method placeAsset() will only work with Document or Text as argument. Rectangle is not a valid argument.

https://www.indesignjs.de/extendscriptAPI/indesign-latest/#Asset.html#d1e300195__d1e300491

 

InDesign desktop version:

When argument is Document, the asset will be placed on the active spread.

When argument is Text, for example an insertionPoint, InDesign tries to anchor the asset.

But this will fail with an asset that consists of more than one page items that are not grouped.

 

So in the end you could add a new document and place the asset there.

When done move all page items to the desired document and into position.

 

Regards,
Uwe Laubender
( Adobe Community Expert )