Path: csiph.com!usenet.pasdenom.info!news.albasani.net!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail From: Helge Blischke Newsgroups: comp.lang.postscript Subject: Re: Why do I not see the characters Followup-To: comp.lang.postscript Date: Sat, 09 Jun 2012 22:24:04 +0200 Lines: 54 Message-ID: References: <87r4to6ddr.fsf@Compaq.site> <878vfw66a3.fsf@Compaq.site> <2012060907184822140-john@acumentrainingcom> <87fwa4s7cf.fsf@Compaq.site> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8Bit X-Trace: individual.net VDH6d8mTZD/29uKLQcnDMgiOSrYznFVoL3vpVoQoe/hSoSafuayfv6o2X1cjymQ1lW Cancel-Lock: sha1:QmXSvPM+FI49sVyWfkFKgbcV+po= User-Agent: KNode/0.99.01 Xref: csiph.com comp.lang.postscript:719 Cecil Westerhof wrote: > Op zaterdag 9 jun 2012 16:18 CEST schreef John Deubert: > >> By "library" do you mean PS code stored on your hard disk? > > Yes, exactly. I do not want to copy that code every time. The program > looks less and when I make a change … > > >> If so, you can store the code in a .ps file and execute it from within >> another PS program with the "run" operator: >> >> (myLibraryCode.ps) run >> >> As you can see, "run" is the PS equivalent of "#include." >> >> The only tricky bit is figuring out what directory on your disk epstopdf >> considers to be its "home" directory, that is, where it will look for >> the myLibraryCode.ps file. It may be the directory in which the epstopdf >> executable resides; that's common, but by no means the only possibility. >> One way to ferret this out is to make a file from within a PS program >> and see where the file shows up on your disk. Try this: >> >> % ====Cut here====== >> (TestFile.txt)(w) file >> dup (This is a test.) writestring >> closefile >> % ====Cut here====== >> >> Run this program and see where the TestFile.txt file shows up; that's >> the home directory. > > That gives: > Error: /invalidfileaccess in --file-- > Operand stack: > (TestFile.txt) (w) > > Exactly what I got before. As I understand it epstopdf does not allow > file access for security reasons. > > >> There's a detailed article on this in the January 2002 issue of the >> Acumen Journal (free for the downloading here: >> www.acumentraining.com/acumenjournal.html) > > I will look at it. (And the other stuff.) > Well, epstopdf calls Ghostscript with the option "-dSAFER" which denies most file access, especially write acdcess. Helge