Govert's Tools for Plotting, Printing, PDF


How do I uninstall the tools

All my tools consist of an executable file that you download(ed) in a zip file, occasionally there are a few other files that should be kept together with the executable (e.g. my PDFSearchExtract tool). Installing means that you copy this file (these files) to a folder, either existing or one that you create specially for the tool; you probably make a shortcut to the main executable manually to help you start the program easily.

So... Uninstalling means that you delete the files that you copied to the folder that you created/selected and the shortcut. As simple as that. My tools do not write in the registry, do not create sneaky files, do not make any changes to your system. The only thing that the tools create is a configuration file, or ini file, that is used to remember a.o. the latest settings and positions. These are simple and small text files, placed in a user's application data folder. These files do nothing (no harm) if you just leave them. But if you want everything to be absolutely clean, do a file search to trace them and delete them. Their name is the same as the executable, except the extension may be ".ini" or ".config". I have seen uninstaller tools on the web. Complete nonsense, rubbish, ..., at least for my tools. You do not need these (and I would not be surprised if they would even do harm rather than what is claimed that they do...).

Note: tools that use GhostScript or depend on it (GhostFriend, PDFCrop), that program must be installed separately. If you want to uninstall GhostScript, it can easily be done through the Windows control panel.

Back to top

Can I get the source

Usually the answer is yes. If it helps you to understand how I solved things, want to do special modifications yourself, improve my programs (perhaps show me that things can be done more efficiently :-)), need the source because it's company policy to have access to the source, and so on, just ask. I can send you relevant snippets, or the complete source. All I want to know before I send you nything is that you are serious. Yes, I could add the source to the executables in the zip-files, but I am sure that 99% of the users won't be interested in it. Anyway, if you want to do a request, use "Contact". And please give me feedback if you have done something with source.

Back to top

What is a plt file; what can I do with it?

The extension ".plt" doesn't tell anything. It is an extension that is used by a couple of CAD programs, a.o. AutoCAD and Arkey to identify output files that are intended to be sent to a plotter - these files are usually called "plot files". As the extension ".plt" is given to any plot file from any driver by these programs, the only meaning is that it is some sort of plot file for some sort of plotter. To know what you can do with a given plt file, you should always know where it comes from and what it was made for.

Many (say 80 - 90%) of the large size plotters 'speak' the HPGL/2 plotting language, so in a way there is a reasonable chance that if you get a .plt file from somebody who uses large size plotting equipment, it may be an HPGL/2 file. But be careful; it will very probably also contain some device-specific code that not every HPGL/2 "compatible" plotter understands. Also the capabilities of devices may be different. Simple examples: output sizes (don't send an E-size (A0) plot file to a D-size (A1) device); tray or roll selection, finishing a.s.o. Plt files can be sent to the plotter hey were intended (generated) for. See it as "delayed spooling" (forget plotting or printing to file for a moment; then you wouldn't select an Epson xxx driver when you wanted to print an HP yyy LaserJet, would you...?). Plt files in certain file formats can be viewed by special viewing tools and used to communicate about designs. There are viewers for HPGL/2 and PostScript. Not for any other printing or plotting languages. Some .plt files can be converted to other file formats, and or imported into a program, to be used as illustrations or for re-editing. Note that the extension ".plt" is also used by Microstation to identify plotter configuration files and by a less known part of Lotus SmartSuite (which happens to have nothing to do with plotting).

Back to top

Create a raster image from AutoCAD (or any other application) in a selectable resolution.

Use one of these Windows raster image drivers and print from your application to the desired file format in the desired resolution: Free PDFCreator is primarily meant for PDF output, but it can also output raster images. One advantage for AutoCAD is that it supports various large sheet sizes.

PDFill Image Writer is also free for personal and commercial use and is reported to give best image results with AutoCAD. AutoCAD users mostly need to print images in landscape; the corresponding forms (A0-A5 landscape) can be added from Windows 'Server Properties' (XP/7 Printers Page, File menu); PDFill Image Writer seems to cooperate nicely with these forms

Here are some commercial raster image output drivers:

Back to top

Add/change paper sizes in the PPD of a PostScript driver (also for PDF)

[This article is outdated and will be updated in the near future]
  1. Locate the PPD file (in Windows 2000 it resides in the directory WINNT\system32\spool\drivers\w32x86\3\; in Windows XP in Windows\system32\spool\drivers\w32x86\3\). You'll find another file with the same name, extension .BPD there. Backup both to have a good copy to revert to if anything goes wrong.
  2. Delete the .BPD file (it is a pre-compiled version of the PPD that we are going to edit which the system actually uses, it will be regenerated automatically).
  3. Use a text editor (e.g. WinVi, or simply Notepad) to edit the PPD file.
    Search for a page name you want to use as a template for the new size (eg. "A2 Extra"). You'll find several references to this name. All you have to do is to duplicate these lines, changing the page name in the new lines and adjusting the actual page size. The unit of measure is "Point", 1/72 inch, so for instance 11" (or 279 mm) is 792 Points.

    As an example, if at a certain location the PPD originally had:
    • *PageSize A2.Extra: "
    • 2 dict dup /PageSize [1361 1772] put dup /ImagingBBox null put
    • setpagedevice"
    • *End
    now it will have two of these:
    • *PageSize A2.Extra: "
    • 2 dict dup /PageSize [1361 1772] put dup /ImagingBBox null put
    • setpagedevice"
    • *End
    • *PageSize A2.Super: "
    • 2 dict dup /PageSize [1450 1850] put dup /ImagingBBox null put
    • setpagedevice"
    • *End
    (the second edited as needed)
    • dup [1361 1772] (A2.Extra) put
    • dup [1361 1772] (A2.Extra) put
    • dup [1450 1850] (A2.Super) put
    And so on, for every occurence of the original definition (note that in some places there are two names, one with a period in the middle, one without; in any case, just copy the original lines and edit accordingly).
  4. Check the original values in the section *ImageableArea. Margins may be taken into account there (so the ImageableArea is smaller than the values you entered elsewhere). When the PPD is meant for the production of PDF output, you may want to use the full area.
  5. Locate the section that begins with *?PageSize: " and then followed by something like
    • save
    • currentpagedevice /PageSize get aload pop
    • 2 copy gt {exch} if
    • (Unknown)
    • 11 dict
    Change the number before "dict" in the actual (new) number of page sizes that follow in this section, so if there were 11 and you have added one size, change it in 12.
  6. As soon as you use the driver, the .BPD will be regenerated automatically and the new page definitions will be effective.
Back to top

Format of AutoCAD plotting support files (CTB, STB, PC3, PMP)

These plotting support files use zlib compression. After decompression you get an ASCII file that is more or less human readable.

The compressed file starts with a 59 bytes long header that has nothing to do with this type of compression - it makes these files more or less proprietary. The header contains some identification strings - that is the easy part. Bytes 55-59 stores the length of the compressed section in little endian format. The obscure part is bytes 48..54.

To decompress, this whole header can be skipped. To test this, just crop the first 59 bytes from the file with an editor and use a zlib tool to decompress the decapitated file.

To compress, a header should be added, containing the strings like PIAFILEVERSION... and the numbers have to be written in it. Bytes 55-59 stores the length of the compressed section in little endian format. For example, byte sequence 01 CA 00 00 is hex length 00 00 CA 01 (51713 bytes) starting at byte 60. Bytes 48..54 may be filled with FF FF FF FF FF FF 00. Hint re the bytes 55..59 courtesy Graeme.

Here is an on line CTB viewer, made by Ian, inspired by the above info. Back to top