Skip to main content
Participant
June 14, 2016
Answered

How to add png image into document?

  • June 14, 2016
  • 1 reply
  • 705 views

Hi, I need to add images to the document. Currently I'm placing them with PlaceFileInFrame function. But this function creates links to the images. I could embed this links later but I'd like to know how to add images (png, bmp, ...) to document without making links. Also I'd like to know if it is possible to create links to images stored in web (http, https)? Looks like the answer is "no", but may be I'm missing something. Thanks in advance!

This topic has been closed for replies.
Correct answer vinothr

I am assuming you are above InDesign CS4.

After you have placed the image, you should embed it.

You should do: ILinkResource::Embed

Check ILinkResource::CanEmbed before you embed it.

There are several ways to find ILinkResource from pageItem UIDRef.

Consider the following:

Get the ILink for your page item UIDRef and then find ILinkResource from ILink.

Consider ILinkManager, ILinkUtils.

InDesign only supports file-based links. That is, it only supports file:// scheme.

However, InDesign provides you the extensibility to link image from document to web.

For that you should have your custom link implemented.

You can refer CustomDataLink SDK samples to understand how to do that.

1 reply

vinothr
vinothrCorrect answer
Inspiring
June 15, 2016

I am assuming you are above InDesign CS4.

After you have placed the image, you should embed it.

You should do: ILinkResource::Embed

Check ILinkResource::CanEmbed before you embed it.

There are several ways to find ILinkResource from pageItem UIDRef.

Consider the following:

Get the ILink for your page item UIDRef and then find ILinkResource from ILink.

Consider ILinkManager, ILinkUtils.

InDesign only supports file-based links. That is, it only supports file:// scheme.

However, InDesign provides you the extensibility to link image from document to web.

For that you should have your custom link implemented.

You can refer CustomDataLink SDK samples to understand how to do that.