Skip to main content
Participating Frequently
June 29, 2009
Question

[JS CS4] Open readonly document

  • June 29, 2009
  • 1 reply
  • 722 views

Hi all,

does anybody know how to open a document using javascript in read-only mode?

thanks

Alvaro

This topic has been closed for replies.

1 reply

interesting_Flower157F
Inspiring
June 29, 2009

If you mean reading the contents of for example a txt file, you can do:

var myFile = File.openDialog("Choose the file to open for reading");

var myResult = myFile.open("r", undefined, undefined);

alert(myFil.read());

If you mean open an Indesign document as read only, I guess you should save as template.

--

Thomas B. Nielsen

http://www.nobrainer.dk

aprunedaAuthor
Participating Frequently
June 29, 2009

Thank you Thomas,

you are right. I was meaning open an InDesign document as read only. Saving the document as a template is not an option in my case (we use the indesign lock files to control what the user can do). I thought that perhaps there would be an easy way to do it, an "openRO()" function or something like that :-). It doesn´t matter, I will do it programmatically.

Alvaro.