F.A.Q.
- What is a plt file; what can I do with it?
- Format of AutoCAD's plotting support files (CTB, STB, PC3, PMP)
- Add/change paper sizes in the PPD of a PostScript driver (also for PDF)
- Create a raster image from AutoCAD (or any other application) in a selectable resolution.
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 they 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).
Format of AutoCAD's 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. The only obscure things remain bytes 48..55 and 56..59. They seem to be numbers related to the content (CRC?). 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. But what numbers? I have found that AutoCAD seems to read and interpret the files without problems if the numbers are large enough - it just takes a little longer than with the calculated numbers. In my experimental tool I use this (hex) sequence FF FF FF FF FF FF FF 00 FF FF FF 00.
Here is an on line CTB viewer, made by Ian, inspired by the above info: http://www.xcad.ch/tests/ctbviewer.php/
Add/change paper sizes in the PPD of a PostScript driver (also for PDF)
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)
Similarly,
dup [1361 1772] (A2.Extra) put
becomes
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.
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.
Here are some commercial raster image output drivers:

