Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

ioerror writing files to disk on PSNormalizer (via pstopdf)



Hi,

We relaunch a question posted some days ago on the Darwin-userlevel
mailing list...

Executing PS code via 'pstopdf' that writes a new file inside the disk,
the interpreter fails and outputs an *ioerror*. I think related to the PS
interpreter privileges in this context or perhaps a 'pstopdf' serious bug.

But if I write this file in the virtual %ram% disc, the file writing is
enabled with no problem.

To demonstrate that, please exec this PS code inside PSNormalizer (via
pstopdf)...

(*) {dup (\n\n>>>) print flush print flush (<<<\n) print flush
currentdevparams{== ==}forall} 256 string /IODevice resourceforall

...this code shows through the interpreter prompt the all available devices.

Observing the PSNormalizer output result from the above PS call, we have
three *writable* devices inside the PS context: %os% %disk0% and %ram% To
demonstrate that I list below the result of this call inside an OSX 10.3
machine, via Terminal and pstopdf command...


>>>%hostfont%<<<
/FileSystem
/Type
false
/Writeable
true
/Mounted
0
/SearchOrder
true
/HasNames
true
/Searchable
false
/Removable


>>>%Distillery%<<<
/Communications
/Type


>>>%os%<<<
0
/InitializeAction
/FileSystem
/Type
true
/Writeable
11246016
/Free
true
/Mounted
2
/SearchOrder
true
/HasNames
false
/Searchable
39066000
/LogicalSize
false
/Removable


>>>%fontset%<<<
/FileSystem
/Type
false
/Writeable
true
/Mounted
10
/SearchOrder
true
/HasNames
true
/Searchable
false
/Removable


>>>%disk0%<<<
0
/InitializeAction
/FileSystem
/Type
true
/Writeable
11246016
/Free
true
/Mounted
1
/SearchOrder
true
/HasNames
true
/Searchable
39066000
/LogicalSize
false
/Removable


>>>%cid%<<<
/FileSystem
/Type
false
/Writeable
true
/Mounted
99
/SearchOrder
true
/HasNames
true
/Searchable
false
/Removable


>>>%ram%<<<
/FileSystem
/Type
true
/Writeable
20000000
/Free
true
/Mounted
100
/SearchOrder
20000000
/PhysicalSize
true
/HasNames
1
/BlockSize
false
/Searchable
0
/InitializeAction
20000000
/LogicalSize
false
/Removable



To summarize, if you exec this following code inside the PSNormalizer via
pstopdf...

(%ram%myFile) (w) file dup (AEIOU) writestring closefile
(%ram%myFile) (r) file 64 string readstring pop ==

... the prompt shows the (AEIOU) string with no problem
The first line writes the (AEIOU) string iniside the file 'myFile' located
in the %ram% device
The second line reads from myFile the first 64 bytes and outputs this to
the prompt (stdout)

... if you change the device origin of this code to %disk0% or %os% ...

(%disk0%myFile) (w) file dup (AEIOU) writestring closefile
(%disk0%myFile) (r) file 64 string readstring pop ==

...the 'pstopdf' execution shows this weird error...

%%[ Error: ioerror; OffendingCommand: file ]%%
Stack:
(w)
(%disk0%myFile)

...more simply, can you exec... (myFile) (w) file (AEIOU) writestring
...relative to the default interpreter device storage, but you obtain the
same *ioerror*
AdobeAcrobatDistiller and Ghostscript works well when the IODevice
resource reads...
/Writeable true
...inside a concrete Device parameters dictionary.

   What happens in this context ?
   Have you a clear solution ?
   Any Apple/Darwin technician can help my?

Many thanks,



--
MaRC anToni Malagarriga i Picas
T·(34)938721642 | (34)667517069
(][ www.femfum.com
PostScript&PDF Tool Developers
Desenvolupadors d'Eines PostScript i PDF



 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/darwin-dev/email@hidden

This email sent to email@hidden



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.