Вы находитесь на странице: 1из 9

GhostWord Users Guide.

2002-07-01

GhostWord
Version 2.10 Users Guide Morten Juel Skovrup
ms@mek.dtu.dk

1 Disclaimer
This software is freeware. You may freely copy and use it without any charge. This software must not be sold for profit, nor may it be used as part of commercial software. Disclaimer: THIS SOFTWARE IS PROVIDED AS IS AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL any person mentioned above BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

2 Changes from previous versions


I havent really kept any log of the changes, but for version 2.00 some major changes have been made, which might be worth mentioning (Ill try to be a little more structured about this in the future). 2.1 Changes from 2.00 to 2.10 Comma-point issues for threshold parameters fixed Shifted to Office 97 components, except for Excel. Excel2000 is used, because PrintToFile in Excel97 required a filename entered by the user Using Ghostscript DLL Using TPostScriptToPDF Delphi component "RPC-server Not Available" message removed Handled stop in word files when Heading1 in tables was used "Print to file" does not stay checked in Word when GhostWord finishes Handled "SHGetSpecialFolderPath not available" problem Added run from command line capability

2.2 Changes from 1.20 to 2.00 All settings are now saved to the current users home-directory (default c:\Documents and Settings\UserName\Application Data\Mek\Et\GhostWord) and not to the GhostWord installation directory (it created some problems with writing access on some systems) PDF-bookmarks can be created from headings in Word and slides in PowerPoint Links (bookmarks, hyperlinks etc.) are converted to PDF for Word documents and PowerPoint presentations.
Morten Juel Skovrup

E:\Office\WINWORD\GhostWord Users Guide 2.10.doc

GhostWord Users Guide. 2002-07-01

Its now possible to include document information (author, creation date, keywords etc) for Word documents, PowerPoint presentations and Excel workbooks in the PDF-file.

2.3 Changes from version 1.10 to 1.20 The changes from version 1.10 are: Included support for Excel 97 and 2000 Included support for PowerPoint 2000 (there seems to be some problems with PowerPoint 97) Included several new options for controlling the quality of the generated PDF-file Included Uninstall feature in GhostWord - see the Options page.

3 Installation
First remove any previous version of GhostWord (if youve got version 1.20 or later then first start GhostWord, go to the Options page and press the Uninstall button. Thereafter you can uninstall GhostWord through the Control Panel). You need the following software to make GhostWord work: 1. Microsoft Word, Excel or PowerPoint 97 or 2000 (NOTE: You might not be able to use GhostWord with PowerPoint if you have PowerPoint 97 with PowerPoint 2000 there should be no problems). See also chapter 6. 2. A driver to a postscript printer. 3. Aladdin or AFPL Ghostscript version 6.0 or later (Newest AFPL is recommended). 4. Adobe Acrobat Reader or GhostView You can download a postscript printer driver from the following location: Windows 2000 and NT 4: http://www.hp.com/cposupport/printers/software/lj485en.exe.html Windows 95,98: http://www.hp.com/cposupport/printers/software/lj477en.exe.html These are drivers for HP color laserjet 4500, which seems to work well with Ghostscript. You can download AFPL Ghostscript from the following location: http://www.ghostscript.com/ You can download Ghostview from the following location: http://www.ghostscript.com/ You can download Acrobat Reader from the following location: http://www.adobe.com Before installing, you should close Word, Excel and PowerPoint. Then check if you have a postscript printer-driver installed: If you have a driver installed, you can just use it. Note though that some drivers can cause problems with colors and pictures, so you might consider installing the recommended driver: Installation of HP color laserjet 4500 postscript-driver: Windows 95 or 98: Run the file lj477en.exe. Windows 2000 or NT 4: Run the file lj485en.exe. In both cases a number of files will be unpacked to a directory of your choice.
E:\Office\WINWORD\GhostWord Users Guide 2.10.doc Morten Juel Skovrup

GhostWord Users Guide. 2002-07-01

Choose Start|Settings|Printers and double-click on Add Printer. Choose local printer connected to the File port (i.e. the printer is not actually connected to your PC it will just print to a file). When Windows ask which printer to install, choose Have disk and select the directory where you unpacked the printer files. Then install Ghostscript by running gsXXXw32.exe (XXX is the version number). This is done the usual way.
gsvXXw32.exe (XX

If you want to install GhostView (not necessary if Adobe Acrobat Viewer is installed) you can run is the version number).

Finally install GhostWord by running Setup.exe. When the installation is finished a dialog appears asking if you want to run the installed program. Choose to run the program and press Finish. Its important to run the program right after installing as this will finish the installation and create the following icon in Word, Excel and PowerPoint: . IMPORTANT: If you want to uninstall GhostWord then first start GhostWord, go to the Options page and press the Uninstall button. Thereafter you can uninstall GhostWord through the Control Panel.

E:\Office\WINWORD\GhostWord Users Guide 2.10.doc

Morten Juel Skovrup

GhostWord Users Guide. 2002-07-01

4 Using GhostWord
When GhostWord is installed a shortcut in the Start menu is also created. If you use this shortcut (instead of using GhostWord from Word, Excel or PowerPoint) you will be able to convert an existing PostScript file directly. The process is the same as described below, except that you should open the PostScript file manually. If you want to use GhostWord from Word, Excel or PowerPoint then open the document you want to convert to PDF in Word, Excel or PowerPoint. Press the button: and youll see the following dialog box:

The buttons in the toolbar have the following meaning: Exit GhostWord Open a previously saved configuration file (the configuration file contains the converter settings) Save the current configuration Save the current configuration with a new name Save the current configuration as the default configuration (i.e. as the configuration used when GhostWord starts. Connect to currently running Word-application enables you to convert the active document Connect to currently running Excel-application enables you to convert the active worksheet Connect to currently running PowerPoint-application enables you to convert the active presentation

E:\Office\WINWORD\GhostWord Users Guide 2.10.doc

Morten Juel Skovrup

GhostWord Users Guide. 2002-07-01

First you should select which printer you want to use (in the figure HP color laserjet 4500 is chosen). The chosen printer will be remembered until next time you start GhostWord. Note that you can choose between all printers you have installed, but the conversion will only work if you select a postscript printer. Then the name of the document to convert is listed. If you open another document in Word, Excel or PowerPoint the field will automatically change. The suggested name of the resulting PDF document is also listed (equals the name of the Word, Excel or PowerPoint document with extension .pdf). You can change this field if you want. In the optimize field you can select between different predefined converter settings the default setting is All-round and should give good results whether the PDF should be displayed on the screen or printed. If you want to tweak the settings you should go to the Converter settings page. The three checkboxes have the following meaning: Create bookmarks from headings For Word documents this will create PDF Bookmarks from the headings you select to include. As default bookmarks will be created from the build-in headings Heading 1, Heading 2, , Heading 9. But you can change this by going to the Bookmarks page (where you also can change the bookmark level each heading should have). For PowerPoint documents this will create a PDF Bookmarks for each slide in the presentation. For Excel workbooks this option is disabled. You can specify how the PDF-viewer starts up (if you are using Adobe Acrobat viewer) on the Display PDF page. Process links For Word documents this will create links in your PDF-document for any Word-bookmarks and hyperlinks in your document (including the ones you have in drawn shapes). It will also create PDF-links in any table of contents you have created in your document (the process of sorting out the links can take some time.). For PowerPoint presentations it will create links as for Word documents (this means that you can distribute your presentation as PDF just remember to include some navigation buttons on your presentation). For Excel workbooks this option is disabled. You can specify how the links should display in your PDF-document on the Display PDF page (note: for some reason GhostScript in version 7.03 does not handle the dashed line style its displayed as a solid line). Include document info Include author, document title, Creation date etc. information in PDF file.

E:\Office\WINWORD\GhostWord Users Guide 2.10.doc

Morten Juel Skovrup

GhostWord Users Guide. 2002-07-01

When youre happy with the settings, press convert and the document will be converted. Informations and error messages (hopefully none) will appear in the Messages-field. If the conversion is successful Adobe Acrobat Viewer or GhostView (depending on what you have installed) will be launched with the PDF file loaded. The rest of the pages in the dialog enable you to specify more precisely what to convert and how to do the conversion. For more information see your Word and GhostScript documentation. 4.1 Hints and bugs If you experience problems with images you might consider turning image compression off go to Converter settings|Image compression and deselect compression for all image types. If you use Aladdin Ghostscript version 6.01 or earlier, you will not be able to create PDF version 1.4 files (see the Converter settings|General page). Ive tried to convert links for Excel workbboks also, but it seems that the interfaces published by Microsoft have some errors at least I cannot deduce the precise position of links in paper-coordinates for Excel I might have a look at it for the next version.

E:\Office\WINWORD\GhostWord Users Guide 2.10.doc

Morten Juel Skovrup

GhostWord Users Guide. 2002-07-01

5 Run from commandline


You can also call GhostWord from a commandline using the following syntax:
GhostWord [type] [options] filename(s) Type: doc|xls|ppt|ps if type= doc: All files are word documnets (regardless of extension) xls: All files are excel workbooks (regardless of extension) ppt: All files are powerpoint presentations (regardless of extension) ps: All files are postscript files if type isn't specified then files are converted according to extension: '.doc,.rtf,.dot' : Word '.xls' : Excel '.ppt' : Powerpoint options: /gws : first filename in the filenames list is a settings-file (if not specified then default settings will be used) The rest of the options overwrite the ones in the settings-file (default or specified): /bookmarks : create pdf bookmarks /nobookmarks : don't create pdf bookmarks /links : create links /nolinks : don't create links /docinfo : create docinfo /nodocinfo : don't create docinfo Filenames: list of files to convert (names can contain spaces)

E:\Office\WINWORD\GhostWord Users Guide 2.10.doc

Morten Juel Skovrup

GhostWord Users Guide. 2002-07-01

6 Troubleshooting
When GhostWord is first run it tries to install itself into Word, Excel and PowerPoint. What it does is simply to add a toolbar with a button that invokes GhostWord. The installation might not always work - due to security settings in Word/Excel/PowerPoint, installation on a machine where you are not administrator and for a lot of other reasons, which I do not completely understand... If you have problems you might try one of the following: 1. If you can do without links, bookmarks etc. in your pdf-file, then you can manually print your Word/Excel/PowerPoint file to a PostScript file, open GhostWord from the Start-menu and open the PostScript file in GhostWord and just convert it (you print your Word/Excel/PowerPoint file to a PostScript file by selecting File|Print, select a PostScript printer, check Print to file and enter a filename when asked, which btw. should have the extension .ps). 2. Install macros/toolbars in Word/Excel /PowerPoint manually as described below. 6.1 Manually install macros in Word First copy the file GhostWord.dot to your Word startup directory. GhostWord.dot can be found in the \Macros subdirectory where you installed GhostWord (default c:\program files\GhostWord\Macros) You can get your Word startup directory by starting Word, select the Tools|Options menu, go to the File Locations page, and you can see your Word startup path (default
C:\Documents and Settings\username\Application Data\Microsoft\Word\Startup on Win 2000, XP and I think

also ME machines)

\Macros

Restart Word and install the Macro Word2PDF on a menu, toolbar or whatever you prefer. In the subdirectory there is a text file called Word2PDF.bas, which contains the code for the GhostWord macro. If you want to create your own macro, it should in principle just contain the following line of code:

Sub Word2PDF() Shell (c:\program files\GhostWord\GhostWord.exe doc) End Sub

6.2 Manually install macros in Excel First copy GhostWord.xla to your excel startup directory GhostWord.xla can be found in the \Macros subdirectory where you installed GhostWord (default c:\program files\GhostWord\Macros) I dont know where you can see your Excel startup directory, but as default it is something like: C:\Documents and Settings\username\Application
Data\Microsoft\Excel\XLStart

When you restart Excel the GhostWord toolbar should automatically be created. If not then create a macro looking like the one in the file Excel2PDF.bas in the \Macros subdirectory and store it in your Personal macro workbook (see your Excel documentation for details).

E:\Office\WINWORD\GhostWord Users Guide 2.10.doc

Morten Juel Skovrup

GhostWord Users Guide. 2002-07-01

6.3 Manually install macros in PowerPoint Adding a macro to PowerPoint is a bit difficult, because you want the macro to be available in all presentations. Therefore you have to install the file GhostWord.ppa located in the \Macros subdirectory as an Add-in. To do this you should start the registry editor (regedit.exe) and add the following key:
HKEY_CURRENT_USER\Software\Microsoft\Office\"OfficeVersion"\PowerPoint\AddIns\ GhostWord AddIn

Where OfficeVersion is 9.0 for Office 2000 (8.0 for Office 97 I think...). To that key you add the following two values: Value name
AutoLoad Path

Value type
DWord string

Value
1 c:\program files\GhostWord\Macros\GhostWord.ppa

You can see the complete code for the PowerPoint Add-in in the file
\Macros\PowerPoint2PDF.bas

E:\Office\WINWORD\GhostWord Users Guide 2.10.doc

Morten Juel Skovrup

Вам также может понравиться