Copy link to clipboard
Copied
Hi,
I have used this code to find the images whether there is an images(jpg,png,gif,jpeg) in the document or not it provide me the output as "1". Please guide me if it is wrong..
do
{
IDocument* document = Utils<ILayoutUIUtils>()->GetFrontDocument();
if (document == nil)
{
break;
}
IDataBase *db = ::GetDataBase(document);
InterfacePtr<ILinksManager> linkmanager(document, UseDefaultIID());
if (linkmanager == nil)
{
break;
}
int32 imageCount = linkmanager->GetLinkCount();
PMString ImageCount;
imagecount.AppendNumber(imageCount);
CAlert::InformationAlert(imagecount);
} while (false);
1 Correct answer
Already answered at https://community.adobe.com/t5/indesign/image-count-values-in-c/td-p/11177319?page=1
Duplicate thread, locked
Copy link to clipboard
Copied
Hi Rajendran,
didn't we have this discussion recently?!
FWIW: Are you sure that more than 1 graphic is linked to the document?
Could it be that all the graphics were pasted from e.g. PhotoShop or a different application?
Then they would not show up in the list of linked items.
Regards,
Uwe Laubender
( ACP )
Copy link to clipboard
Copied
I don't believe this code can compile; that, or it displays another string than is being constructed here -- with nearly the same name.
Copy link to clipboard
Copied
Already answered at https://community.adobe.com/t5/indesign/image-count-values-in-c/td-p/11177319?page=1
Duplicate thread, locked
