I don’t know what is causing the problem, but there are a few things I think
worthy of comment.
Writing to C:\ is in general a bad idea. Some versions of Windows will try and
stop you doing it.
So if you must, I would create a folder in C:\ and write there.
What might be a better approach is to use the %temp% or %tmp% variable to write
to the Windows
temporary folder. This is actually the folder you mention later.
'C:\Users\<username>\AppData\Local\Temp'
This should be writable by “the user”. So I don’t know why you have had to
change access to it.
This may hint at what the actual problem is.
Maybe there is an issue with which user Windows thinks is running the script.
There are settings you
can make to the script to “Run as administrator” or run in compatibility mode.
Maybe fiddling with those will help.
Regards
Andy Ling
From: davidpilling-bounce@xxxxxxxxxxxxx
[mailto:davidpilling-bounce@xxxxxxxxxxxxx] On Behalf Of Peter Newble
Sent: Fri 25 January 2019 13:22
To: davidpilling@xxxxxxxxxxxxx
Subject: [EXTERNAL] [softwarelist] Re: Potential TransPDF improvements
On 25 Jan 2019, at 12:29, David Pilling
<david@xxxxxxxxxxxxxxxx<mailto:david@xxxxxxxxxxxxxxxx>> wrote:
Here is an example:
Thanks. Your previous e-mail got me thinking (which is some achievement) —
thank you. I found those registry keys and altered the one for TransPDF to
point to a batch file saved to the same directory as the filter .exe files. It
appears that the filter is called with two arguments: the full path of the
input PDF and the output directory into which the EPS (presumably with the same
name) is to be put.
So I have the following batch file to make the preview and EPS separately from
the PDF as temporary files then combine them, saving the resulting EPS in the
specified directory. It works fine when run as as a shell command, e.g.
TransPDF filename.pdf outputdirectory, to create the file
outputdirectory\filename.eps:
if exist C:\Temp.tif del C:\Temp.tif
if exist C:\Temp.eps del C:\Temp.eps
"C:\Program Files\gs\gs9.26\bin\gswin32c.exe" -dSAFER -dBATCH -dNOPAUSE
-sDEVICE=eps2write -sOutputFile=C:\Temp.eps -r600 -q -dFirstPage=1 -dLastPage=1
"%1"
"C:\Program Files\ImageMagick-7.0.1-Q8\convert.exe" "%1" -density 300 -depth 8
-type TrueColorMatte C:\Temp.tif
if not exist %2\ mkdir %2
"C:\Program Files\epstool-3.09\bin\epstool.exe" --add-user-preview C:\Temp.tif
C:\Temp.eps "%2\%~n1.eps"
if exist C:\Temp.tif del C:\Temp.tif
if exist C:\Temp.eps del C:\Temp.eps
The problem is that, when invoked from Ovation Pro by dropping a PDF into a
frame, it fails with the error
Access is denied.
(CreateFile) (5) (C:\Users\PCN\AppData\Local\Temp\Ovation0\F01)
I have confirmed that the second argument being supplied to TransPDF in this
case is indeed C:\Users\PCN\AppData\Local\Temp\Ovation0\F01. The error didn’t
surprise me much since AppData is a read-only hidden folder. I therefore
changed its permissions and TransPDF now works fine as a standalone command
when given the same two parameters that Ovation Pro is passing it, but it still
doesn’t work when Ovation Pro invokes the same command to import the same PDF.
I must be missing something obvious. Currently at the
banging-head-against-the-wall stage . . .
Peter.
**********************************************************************
DISCLAIMER:
Privileged and/or Confidential information may be contained in this message. If
you are not the addressee of this message, you may not copy, use or deliver
this message to anyone. In such event, you should destroy the message and
kindly notify the sender by reply e-mail. It is understood that opinions or
conclusions that do not relate to the official business of the company are
neither given nor endorsed by the company. Thank You.