Copy link to clipboard
Copied
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
Copy link to clipboard
Copied
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 )
Copy link to clipboard
Copied
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
Copy link to clipboard
Copied
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 )
Find more inspiration, events, and resources on the new Adobe Community
Explore Now