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

InDesign Server cannot open files of this type

New Here ,
May 03, 2017 May 03, 2017

Copy link to clipboard

Copied

Hello,

I have InDesign Server CC 2017 installed on my mac (10.12).

When I try to open a file using applescript ie: (snippit).

set myDocument to open "Macintosh HD:id:test.indd"

I get the indesign dialog box open up stating "The document "test.indd" could not be opened. InDesignServer cannot open files of this type."

Any ideas whats going on here?

Andrew

TOPICS
Scripting

Views

898

Translate

Translate

Report

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
People's Champ ,
May 04, 2017 May 04, 2017

Copy link to clipboard

Copied

I guess the issue might be that you are passing a string to indesign. You may prefer to set a file reference

tell application "Finder"

  set f to alias "Macintosh HD:Users:ozalto:Desktop:BLOG:StylesCloner:testStyles.indd"

end tell

tell application "Adobe InDesign CC 2017"

  set doc to open f

end tell

HTH

Loic

http://www.ozalto.com/

Votes

Translate

Translate

Report

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
New Here ,
May 04, 2017 May 04, 2017

Copy link to clipboard

Copied

Hi Loic,

I tried that previously and got the same result.

The code works no problem when running directly with InDesign (If I use either a string or a variable), its just when using InDesignServer that error comes up.

Very strange.

Votes

Translate

Translate

Report

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
People's Champ ,
May 04, 2017 May 04, 2017

Copy link to clipboard

Copied

I got this message when I had both indesign server and indesign desktop opened with different versions. While I double clicked on the file and expected to be opened in the client, IDS took preceedence and claimed for that exact message. Closing IDS was the key but it's not really your issue obviously.

Is the file ok ? Which application are you targeting in the aps snippet ?

Could you share some code ?

Votes

Translate

Translate

Report

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
New Here ,
May 04, 2017 May 04, 2017

Copy link to clipboard

Copied

On this particular mac, nothing else is installed except InDesign Server.

Here is some very basic code that im trying.

tell application "Finder"

set loc to alias "Macintosh HD:id:test.indd"

end tell

tell application "InDesignServer"

set mydoc to open loc

end tell

The .indd file opens no problem when I bring it over into InDesignCC.

I even had indesign server create its own file, and then tried opening that newly created file with the same results.

Im going to spin up a windows server on Ec2 and give that a try.

Andrew

Votes

Translate

Translate

Report

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
People's Champ ,
May 05, 2017 May 05, 2017

Copy link to clipboard

Copied

Using a Windows Server makes more sense if you need external users to get something out of IDS anyway.

However, let's try to nail it.

If IDS states it, it may mean that either :

a) the file is corrupted

b) The file is not a valid type

c) the file is somehow corrupted at the opening stage

d) the file is saved in a more recent version

But I would rely on IDS. I mean if there is a problem with the file, then there is one.

Obviously you could discard many of the options here so lets try two things:

1) Change class in the applescript command

set f to file "…"

instead of

set f to alias "…"

2) Use javascript

create a jsx file onto the desktop as test.jsx with the following contents

var doc = app.open ( File ( "/your/location" ) ); //beware of the url syntax here => /Users/[you]/… and not "Macintosh HD:…"

doc.exportFile (ExportFormat.PDF_TYPE, File ( Folder.destop+"/foo.pdf" ) );

doc.close(SaveOptions.NO);

Then call it with the terminal

"/Applications/Adobe InDesign CC Server 2017/sampleclient" -host localhost:12345 "/Users/[user]/Desktop/test.jsx"

Given that you started the server on port 12345

If a PDF is created onto the desktop IDS is just fine with the file and it's all about Applescript (which I start to incriminate).

3) Check the url

Are you pointing a file located onto a mounted volume ? A network drive ? Something that may corrupt the opening process due to some possible latencies ?

HTH

Loic

Votes

Translate

Translate

Report

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
New Here ,
May 08, 2017 May 08, 2017

Copy link to clipboard

Copied

Hi Loic,

I appreciate the reply.

The file is good as I had indesign server create it, I can open it using desktop CC etc.

Using javascript as you mentioned seems to open the file up without any errors!, so something weird happening with the applescript.

In the end I have reverted to using a windows server for my testing ground with javascript.

Votes

Translate

Translate

Report

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
People's Champ ,
May 08, 2017 May 08, 2017

Copy link to clipboard

Copied

LATEST

"something weird happening with the applescript."

I am not really surprised

Votes

Translate

Translate

Report

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