Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
Locked
0

Image count values in C++

Community Beginner ,
Jun 30, 2020 Jun 30, 2020

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);

Rajendran
TOPICS
SDK
394
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Adobe Employee , Jul 01, 2020 Jul 01, 2020
Translate
Community Expert ,
Jun 30, 2020 Jun 30, 2020

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 )

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jun 30, 2020 Jun 30, 2020

I don't believe this code can compile; that, or it displays another string than is being constructed here -- with nearly the same name.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Employee ,
Jul 01, 2020 Jul 01, 2020
LATEST
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines