Acrobat X - are there command line operations to create a pdf from html - acrobat

This would be done on a Windows machine, our build script builds the documentation for our software into a framed html site. We then want to automate the building of a pdf using the new Acrobat X.

You should be able to do something like this:
c:/Program Files/Adobe/Acrobat 10.0/Acrobat/acrodist /n /q /o /out-dir file.ps
where /out-dir is whatever target directory you want your file to end up in. /n starts a new instance, and /q quits it when its done.
Here's a page that outlines all of the switches. I haven't tested all of this with 10, but I think they work:
http://home.comcast.net/~tom.brodhead/distiller-switches.htm

Related

ps2pdf - Unable to open initial device

I built a quite large PDF using LaTeX with the lualatex compiler (I need that one because of specific fonts) and now want to shrink the PDF with ps2pdf, following this instruction (the answer with the second-most votes, since gs is not recognized as a command line tool on my computer). My command looks like this:
ps2pdf -dPDFSETTINGS=/ebook -sDEVICE=pdfwrite -dCompatibilityLevel=1.4 -q -sOutputFile=output.pdf input.pdf
I get this error message:
MiKTeX GPL Ghostscript 9.25: Device 'pdfwrite' requires an output file but no file was specified.
**** Unable to open the initial device, quitting.
I definitely made sure that the file exists, I tried it using as *.ps file as input, gave the full path, once with and without double-quotes (Windows system), yet nothing worked. Strangely enough, just running ps2pdf ouput.pdf input.ps works, but produces an even larger PDF. What am I missing?
The file that can't be opened is the output file, so if it exists, that would be a potential problem. If 'something else' has the output file open then it won't be possible to write to it.
You appear to be running a non-standard version of Ghostscript, judging by the startup banner, if I were you I would install and use a standard version of Ghostscript, even if you have to build it yourself.
It's odd that 'ps2pdf' which is just a script to run Ghostscript would work, whereas a simple 'gs' would not. I personally would not use the script. Try and find the Ghostscript executable and run that directly.
I'd drop the -q (quiet) switch as well, at least while trying to solve a problem, suppressing messages could be hiding something useful.
Oh I see, you are actually using Windows. Well, the executable on Windows isn't called 'gs', it's called gswin followed by either 32 or 64 for the word size and then c if it's the command line (as opposed to windowed) version. So you want one of gswin32, gswin32c, gswin64 or gswin64c. Note that the Ghostscript installer doesn't add the installation directory to the $PATH environment variable so if you just open a Windows command shell and type 'gswin32c' it won't be found. You need to either add the isntall directory to the $PATH or supply a full path to the executable.
I'd personally use the vanilla Windows binary rather than a modified version supplied under MingW or whatever Linux shell you are using. It's also conceivable that this is causing your problem writing to the output file, if the directory is unavailable, or read-only, to the shell.

Photoshop - simple Open File action on MAC

Could anyone send the ATN file with only one action -> opening PSD file on Mac?
I've made an action with a lot of steps, it's working good but only on Windows. There is no relative paths in PS actions, and i have no friend that has Mac. Could anyone prepare ATN file (so i will be able to copy "open psd file" step)?
Regards,
Luke
Short answer: this won't work. Even though Photoshop has "shortcuts" paths that are similar for both OSX and Windown (like ~/Desktop is a shortcut for desktop folder no matter of OS and username), Actions don't seem to recognize them. Furthermore, if you record an Open Action on Windows or Mac and open it in a different OS, you'll get a File or folder not found message for this step:
Here're two examples. In bot cases the top Action was made in Windows and the bottom one on Mac. This is a Mac screenshot:
and Windows:
Notice how Action1 on the Mac screenshot has File or folder not found message and on Windows there's the same message for Action2 from fromMac set.
Here's what you can do though.
insert Open as a Menu Item. This way user will be asked for a file you need every time a user calls the Action.
give the file you need to open as a pattern file (.pat) and ask a user to install it. This way you can fill a document with it using the Fill command.
most powerful: use a script. You can convert your action to a script file using the xtools: there's a script within it called ActionToJavascript: this will give you a .jsx file that you can use in Photoshop and that will work exactly as your action. And in this script you can specify a path for your action. Like here I'm specifying a file on my Desktop:
And this script will work on Mac.

Move folder structure from one computer to another computer when these computers aren't networked?

I have two computers that aren't networked. I need to replicate the folder structure of one drive that exists on one computer and put it on the other computer. Both Windows 7 machines. I don't need the files, just folders/directories. The drive letters are the same on both computers (Y). The computers are miles apart physically, but I do have access to the computer I am trying to get the folder structure of via LogMeIn.
I am thinking I need to save the folder structure to a file using some process. Move that file to my computer (via email or LogMeIn File Manager) and run some process to put in on my computer.
Is there a better solution? If not, is there code out there to do this via VBA, Cmd window, .bat script, VB.NET, or VBS? I know I can write it in VBA, but I'd rather not recreate the wheel if I don't have to.
I don't have a 'process'/program that does this. LogMeIn File Manager doesn't do this either (I asked). There are lots of paths on this drive that I need so creating them by hand would take a long time. I searched and found a lot of solutions that work with computers that are networked, but these computers are not networked, hence why I think I need to save it to a file. Again, I don't want all the files on the drive (its huge and most of the files are unnecessary), just folders.
thanks.
Create a directory listing of the source computer and redirect the output to a text file:
dir /ad /b /s >> dirlist.txt
The switches to dir are (more info at MS TechNet):
/ad List only files with attribute of directory
/b Bare format (no heading information or summary)
/s Displays files in specified directory and all subdirectories
Transfer dirlist.txt from the source computer to the destination computer.
On the destination computer, use a for /F with that text file from the command prompt to create the directory structure:
for /F "delims=" %i in (dirlist.txt) do md "%i"
The switches to for are documented at MS TechNet
You have many options:
Windows command xcopy source destination /T /E. The /T option creates the directory structure, and the /E option includes empty directories.
Bundle the empty directory structure into an installer (perhaps as a zip file).
If the structure isn't relatively small and not likely to change, you could just put a bunch of md commands into a batch file.
Combination - xcopy the structure locally, zip it, transfer it, unzip it.

xcopy "Access denied" with /y /o /s /c /h

I'm currently refining and updating my offline virus database updater for Malwarebytes. It's simply all the Malwarebytes data from C:\ProgramData\Malwarebytes (virus database, build number, etc) inside an SFX .exe archive set to run a batch file after successful extraction.
The Problem
My existing updater works by copying each file with individual xcopy commands, but this time I want it to simply copy the whole folder. But when trying to xcopy to C:\ProgramData, I get "Access denied" for everything.
This occurs even though I'm using the /y and /o switches and running the .exe as Administrator (from the context menu) to achieve elevated permissions. I know that I'm hitting the right directory and that the update does work with a manual copy and paste of the folder.
Is it just that it's not possible to command-copy a folder to ProgramData in Windows 7?
Extra Information
Inside the SFX .exe archive, I have a folder called "Malwarebytes" and a batch file. This is the only relevant segment of the batch file (I have independently confirmed that the rest of it works):
xcopy "Malwarebytes" "C:\ProgramData\Malwarebytes"\ /y /s /c /h /o
Odd.. It just started working.
The only idea I have for this is that when I was trying this, I was trying it with an activated version of Malwarebytes, which means that it was running a service in the background, whereas this time I was not using an activated Malwarebytes'.
This could have possibly been denying access to the files because they were in use.
I don't know. Thanks anyway, guys.
I have encountered this problem without pin pointing the problem However I used Robocopy instead. So simply replace xcopy with Robocopy with appropriate switches and it should work ...

Delete temporary files on startup

I have a program which when it runs it fills Temp folder with lots of .tmp files. This is causing C drive to fill up. I have been asked to investigate if it's possible to write a script in dos to delete temporary files on startup. I also wish to delay the program starting until all files are deleted. This would need to happen every time on start-up. It would be great if this could be installed via a flash drive.
I would be grateful on any pointers on how this could be done
The little batch I am using to delete my temporary files:
#echo off
rd %temp% /s /q
md %temp%
cls
echo Temporary Files have been deleted!
echo.
pause
%temp% is a path which always results in your current temporary folder. However note that there are more temporary file locations like C:\Windows\temp.
If you just want to delete TMP files, go with del C:\<MyPath>\*.tmp.
There are probably more sophisticated ways, but the good old fashioned del c:\Temp\*.* should be a good start.
There's a list of all the options, here: http://www.computerhope.com/delhlp.htm
You will probably want /F (delete read only), /S (sub-directories) and /Q (quiet)
I assume, the following row in c:\autoexec.bat file may help:
del c:\path\to\temp\files\*.tmp
Cheers for replies. This is what I'm using
c:
cd \
cd "c:\Documents and Settings\user\Local Settings\Temp\"
del *.tmp /f/s/q
echo All tmp files deleted.
pause
This seems to do what I want it to do. Now I need it to do this everytime PC starts up. Is there a way to install this via flash drive? ie write a batch file with all commands, put on flash drive. double click .bat file, now installed and will run on startup? (Have a number of PCs which need same thing)