Skip to main content
Participant
October 6, 2023
Question

Unable to place an image without extension in InDesign.

  • October 6, 2023
  • 4 replies
  • 806 views

Hi All,

 

I am facing an issue w.r.t a particular URI Image, "https://pimage.sport-thieme.de/generic-png/125-9100" (PNG Image without extension), I'm trying to place this image in my code with kImportAndPlaceCmdBoss but the ProcessCommand fails. On the other hand, if I try to place another image with extension such as, "https://inbetween.com/wp-content/uploads/InBetween_Logo_colored_RGB-1024x264.png", ProcessCommand works fine and the image gets placed.

 

Can anyone please tell why InDesign fails to place the first image?

 

Regards,

Lawrence

This topic has been closed for replies.

4 replies

Legend
October 8, 2023

My first question would have been why it works at all. But then I remembered coming across new related infrastructure in some recent SDK. Have there been any official announcements?

 

If you handle the URL yourself (you mentioned kImportAndPlaceCmdBoss), and also control the server, you could modify the URL to add the extension, and use a server side similar rewrite rule.

 

Otherwise, rewrite the URL to a server controlled by you, and try HTTP redirect.

 

Working at the InDesign side alone, if you're in a hurry, you could implement an import provider that on such URLs loads the HTTP header of the asset (there is a HEAD request for that), and correctly considers the content-type rather than looking at the extension, or Finder info, or whatever they do nowadays. That is, if the URL actually comes along at all, at the import provider - I did not yet look. You would then hand it over to the real import provider for the difficult work.

 

Or, you could file a similar bug report / feature request at Adobe and wait.

 

That's roughly the order that I'd use if it were my homework.

BobLevine
Community Expert
Community Expert
October 6, 2023

My guess is because it has no extension.

James Gifford—NitroPress
Legend
October 8, 2023

Very few apps can analyze image format on the fly, and depend on the extension to manage them. I'm a bit perplexed that anyone thinks a file extension is optional and that this process should work — reliably, at least — without one.

 

Why is the URI lacking the extension in the first place? This all seems to be an effort to resolve a problem that isn't at InDesign's end.

Legend
October 10, 2023

The question is about a web resource rather than a file. The web is not just another file system.

Even then, once upon a time file systems did store the type, creator and other meta data aside from the file name. InDesign dates back to such times.

Another hint on history - open your terminal and type "man magic".

 

Back to the web, aka HTTP: Content type negotiation via "Accept" and "Content-Type" is not really new, except for InDesign finally living up to "cloud" claims.

See the date on top of the page https://www.rfc-editor.org/rfc/rfc2068#section-14.1

In brief, a http client is supposed to send what they can handle, including weights of preference, then receive the best the server can deliver.

When you ask a web server for png only, it should deliver that or an error. When you ask for tiff and it has a copy, or can generate one, do that. On the very same resource URI.

rob day
Community Expert
Community Expert
October 6, 2023

Hi @Lawrence@InBetween , InDesign links have to be on the local network, are you downloading the png before placing?

Participant
October 6, 2023

Hi @rob day,

We are not downloading either of  the PNGs.

 

If we download the images and then place them using  kImportAndPlaceCmdBoss, then there is no problem at all, Downloading then on local disk and placing them works fine. The problem occurs when we give the URI Image path. The URI Image path which has the .png extension gets placed properly but the URI Image Path without .png extension does not works. CmdUtils::ProcessCommand(importAndPlaceCmd) fails for this particular URI Image Path. 

 

Thanks

Participant
October 30, 2023

Hi all,

 

Thank you so much for the responses. Taking the feedback, we informed our customer to form the right and correct URLs for their PNG images, to which they complied. But even after forming the URLs correctly, importAndPlaceCmd is failing for their particular PNG images. 

https://pimage.sport-thieme.de/ext/generic-png/125-9126.png. InDesign fails to place these images.

 

At the same time, if I pick up any other PNG from the net, it is getting processed correctly and displayed by importAndPlaceCmd.

https://cdn.pixabay.com/photo/2022/01/28/18/32/leaves-6975462_1280.png

 

Can anyone please provide some input as to why this is happening? 

Also, another point to notice is that our customer images ( with or without extensions) are rendered properly when we generate PDF documents, but when we try to generate an INDD document these images fail to be generated.

Any help in this regard would be much appreciated.

 

Thanks & Regards,

Lawrence

James Gifford—NitroPress
Legend
October 30, 2023

I would hazard a guess that there is still some redirection or address mapping going on that ID doesn't like.

 

I find it interesting that this action can only be done via a script. That makes me wonder what's actually going on in the link/resource processing, mostly that any of a number of nits could be causing the fault here.