Copy link to clipboard
Copied
Hello friends,
I need to export an IDMS from a seleciton.
I found a solution here https://forums.adobe.com/message/10343871#10343871 , But it groups the selection to export.
Somehow, Adobe Indesign exports without groupping, in File->Export...
Someone knows how to do this?
Tks
Hi David,
what is your version of InDesign?
If you are on InDesign CC 2018.1 try the new methods exportPageItemsSelectionToSnippet() or exportPageItemsToSnippet(). See DOM documentation here:
https://www.indesignjs.de/extendscriptAPI/indesign-latest/#Document.html#d1e49256__d1e53713
Regards,
Uwe
Copy link to clipboard
Copied
Hi David,
what is your version of InDesign?
If you are on InDesign CC 2018.1 try the new methods exportPageItemsSelectionToSnippet() or exportPageItemsToSnippet(). See DOM documentation here:
https://www.indesignjs.de/extendscriptAPI/indesign-latest/#Document.html#d1e49256__d1e53713
Regards,
Uwe
Copy link to clipboard
Copied
Copy link to clipboard
Copied
davidc19923048 wrote
… I didn't know this functions.
It's rather new. Introduced with InDesign CC 2018.
Regards,
Uwe
Copy link to clipboard
Copied
Hi David,
method document.exportPageItemsToSnippet() is very interesting, I think.
Two arguments:
File and Array of pageItem id numbers.
That means, and I tested this, you can export various page items from various spreads of a document to one single IDMS file!
And you can be very picky. 😉
Means you can export e.g. two out of three page items from a group item without exporting the whole group.
But be forewarned, in this case the preview image on the place cursor will show the whole group of items, not only the two ones you picked.
Regards,
Uwe
Copy link to clipboard
Copied
Hi Laubender
It's a realy powerfull function. I made some implementations, it works realy good.
Thanks for the help.
Copy link to clipboard
Copied
Hi David,
after testing a bit more with exportPageItemsToSnippet() I suggest that you are looking after the length of app.selection.
My point:
The preview image of the IDMS exported with exportPageItemsToSnippet() is always done from the selection if something is selected. Regardless if the items specified that should be exported are part of the selection or not.
That explains my experience very well where the whole group was visible in preview of the IDMS as I exported only two out of three items in the group. I had that group selected when running the script! I tested again without selecting anything and finally only the two items were shown in the preview of the exported IDMS.
So app.select(null) would be the thing to do before running the method.
Another important thing:
If the items you want to export are part of a
1. MSO ( MultiStateObject )
2. Button
3. Graphic Frame ( a pasted inside group's page item is the item I want to export* )
the whole MSO, the whole button or the whole graphic frame is exported to IDMS.
Not only the items in the array of the second argument.
( There may be other nested structures as well where this will happen, but not with items that belong to a group or anchored frames. )
In that case a workaround could be to work with duplicates of the target items.
Regards,
Uwe
* EDIT
Copy link to clipboard
Copied
Thanks Laubender
Your explanation was very helpfull.
I'll follow you suggestions
Thanks friend
Regards
Copy link to clipboard
Copied
Laubender wrote
…Another important thing:
If the items you want to export are part of a
1. MSO ( MultiStateObject )
2. Button
3. Graphic Frame ( a pasted inside group's page item is the item I want to export* )
the whole MSO, the whole button or the whole graphic frame is exported to IDMS.
Not only the items in the array of the second argument.
I can see the issues listed above also with exportPageItemsSelectionToSnippet() .
Not only with exportPageItemsToSnippet().
Regards,
Uwe