Word2Pdf Documentation
Word2Pdf Documentation
Documentation
Document Version: 1.2
Seite 1/6
Enter AG
Word2Pdf Documentation
Word2Pdf
Documentation
TABLE OF CONTENTS
1
OVERVIEW ............................................................................................................................ 2
PREREQUISITES .................................................................................................................... 3
INSTALLATION ....................................................................................................................... 3
4.1
5
5.1
Uninstall ............................................................................................................................................. 3
USAGE .................................................................................................................................. 4
Graphical User Interface................................................................................................................... 4
ARCHITECTURE ..................................................................................................................... 5
LIST OF FILES........................................................................................................................ 5
OVERVIEW
If you dont, be glad and forget about this tool. It was developed because we
needed a converter that could be called from the command line in a build script,
Seite 2/6
Enter AG
Word2Pdf Documentation
where the documentation is maintained by many people as a Word file and should
be delivered to the user in PDF format. As we could not find a free tool fulfilling
this requirement, we developed these scripts as a stop gap measure. They may
turn out to be useful for others.
So the only goal of Word2Pdf is to achieve this conversion without interaction with
a graphical user interface. Whoever has the same needs, may find it useful.
PREREQUISITES
INSTALLATION
Before you can use Word2Pdf you have to install it first. For the installation you
need to log on to Windows with Administrator privileges.
You also need to have Ghostscript installed and the GS_LIB environment variable
must point to its lib and fonts folders. In addition its executable gswin64c.exe or
gswin32c.exe must be on the PATH.
The Word2Pdf distribution contains the command script install.cmd in its root
folder. Executing this command (e.g. double clicking on it) will install Word2Pdf on
your Windows workstation.
The installation will
install a FILE: PostScript printer called Enter2Ps based on ghostpdf.inf in
the lib folder of Ghostscript,
copy the files of the distribution to your Programs folder (alternatively you
can indicate another target folder on the command line, when calling
install.cmd),
add the bin folder of Word2Pdf to the System PATH.
4.1
Uninstall
The root folder of the installed Word2Pdf application contains the file
uninstall.cmd. Also for running this command file successfully you will need
Administrators privileges.
It will
Seite 3/6
Enter AG
Word2Pdf Documentation
remove the Word2Pdf entry from the System PATH,
delete almost all Word2Pdf files the folder it was started in (with the
exception of the ones locked by the uninstall process),
remove the PostScript printer Enter2Ps.
USAGE
The bin folder of the Word2Pdf installation contains the file word2pdf.cmd. This
will be excuted, whenever you enter the command word2pdf on the command line,
because its folder was added to the PATH by the installation.
You can enter the command with the following options and parameters:
word2pdf [/h] | [/copy] | [<Options>] <WordFile> [<PdfFile>]
/a:<Author>
/t:<Title>
/s:<Subject>
/k:<Keywords>
/c:<CreateDate>
/m:<ModDate>
The resulting option values used (from the command line and/or from the word
file) are displayed by Word2Pdf. In the PDF file they appear as document
information.
5.1
Alternatively the launcher w2p.js in the bin folder of the Word2Pdf installation can
be started with a double click on the file name or with the command wscript
<path>\w2p.js. This will display a dialog where parameters can be entered and the
command line tool can be launched.
Seite 4/6
Enter AG
Word2Pdf Documentation
ARCHITECTURE
Few JavaScript programmers realize, that JavaScript has become the language of
choice for implementing shell scripts for Windows. With the introduction of the
Windows Scripting Host (WSH), Windows can not only be scripted using the
traditional batch file syntax but also using VBS (Visual Basic for Scripting) or
JavaScript.
Such scripts tend to become large fast. Therefore we have introduced a modicum
of modularity by putting corresponding eval lines at the top of each module.
Each module file is essentially the definition of an object. This helps a lot to keep
the namespace from cluttering up. It also permits using the prototype mechanism
of JavaScript.
These hints should suffice, to make the richly documented code understandable.
LIST OF FILES
uninstall.cmd
bin
bin\word2pdf.cmd
bin\w2p.js
bin\install.js
bin\uninstall.js
bin\word2pdf.js
bin\cio.js
bin\cmd.js
bin\date.js
bin\env.js
bin\fsu.js
bin\gspdf.js
Seite 5/6
Enter AG
Word2Pdf Documentation
bin\log.js
log module
bin\printer.js
printer module
bin\utils.js
utilities
bin\word.js
word module
doc
documentation folder
doc\Word2Pdf Documentation.docx
Documentation file
doc\Word2Pdf Documentation.pdf
Seite 6/6