Troubleshooting PageMaker Documents
by Olav Martin Kvern, Gordon
Kristina McCook, and Peter C.S. Adams
This document will attempt to tell you what causes corruption, how to prevent it, and if its already too late how to attempt recovery. There are even a couple of tips for when you cant open the document at all. There are also some links to other documents that may be of interest. Finally, you can download some scripts that may help you.
What is a corrupted file?
Corruption in a document can come from a number of sources and can strike without much warning. Usually, the first indication most people see is an error message about a "Bad Record Index" (BRI) or something similar. Sometimes a file will not even open. Causes can range from a bad font to a corrupted style or text block to an incorrect graphic link.
This is hardly unique to PageMaker. Any software package Word, Excel, or QuarkXPress can write corrupted files, as well, and the older the program, the more likely an obscure bit of legacy code could cause a problem. (Of course, the older the program, the more the code has been optimized to prevent this!) One of the projected advantages of Adobe InDesign is its resistance to file corruption problems similar to PageMaker's, but it is far too soon to say if that is true.
The header information and the internal structure of a file are like the table of contents and index of a book: without them, it would be nearly impossible for the software to find its way around in the file. If this information contains incorrect information, the file gan generate errors or become unusable. So could a disk editor be used to repair the file? Probably not. The PageMaker file format is extremely complicated (the diagram outlining PageMaker 5's file format was a 36 x 48 inch poster set in 6 pt type) and the problem could be anywhere in the file, as opposed to just in the first thousand bytes or so ....
Fortunately, most software is fairly reliable, and some packages include means to detect and correct any corruption that occurs. But occasionally, problems occur seemingly always when you're on a deadline.
Can I recover the document?
Depending on the type of corruption, yes. You can sometimes repair the damage even if the repair is only temporary using the following techniques.
First, if you were working on a PageMaker document when the program crashed, you may be able to recover what you were doing. First, look for temp files:
- Windows: Look in your Temp directory (as defined in autoexec.bat, e.g. C:\TEMP) for any files named ~PMxxxxx.TMP.
- Mac: Look in the trash in a folder called "Rescued Items" for items that have PageMaker icons.
If you find any with a reasonable date and size, copy (do not move) them out of the temp folder, rename them with the correct extension (e.g. .p65 for PageMaker 6.5) and open PageMaker. Under certain circumstances, PageMaker will recognize the existence of temp files and offer to open them. If it doesn't, select "Open" from the File menu and try to open the file you copied earlier. If you find something useful, do a "Save As" and then move parts from the rescued file to your previously saved file as needed.
Even if you can open your file, there is no guarantee it is free of corruption. Work with it at your own risk. The only truly safe approach, apart from rebuilding the publication from scratch, is to use the Object Recorder script that record the positions and formatting attributes of objects as a script, and then allow you to recreate the document by running the script in a new publication. It's not easy the PageMaker scripting language can't reproduce everything, and corruption in a publication often makes it impossible to record every object. In addition, scripts tend to run slowly. So you may also want to try the following techniques until you have time to recreate the document. (A variation on the recorder script is the CopyFile script from Jonathan G. Bressel <firstname.lastname@example.org>, which uses copy and paste to recreate the document. See caveats below.)
Start troubleshooting by doing a "Slide Show" of a document by holding down the shift key while you choose "Go To Page" from the Layout menu. Don't forget to view the master page(s), as well. PageMaker occasionally loses track of its internal links, and the slide show can restore them.
Next, use the diagnostic recompose feature. This was common practice in older versions of PageMaker, and it is not clear if this will have any effect in more recent releases of PageMaker, and may make matters worse. Remember always work on a copy of the publication made by the operating system!
Hold down the Shift and Alt/Option keys while choosing "Hyphenation" from the Type menu. Do this with the pointer tool clicked and no objects selected. The result will be one or more beeps:
- One beep means PageMaker didn't find a problem. This does not necessarily mean there is nothing wrong, just that nothing was found.
- Two beeps means PageMaker found and fixed a problem.
- Three beeps means PageMaker found a problem it could not repair.
Once you've done this, "Save As" to a new file and repeat the procedure. Sometimes you get lucky and fix the problem, sometimes you make it worse. Don't make the only copy of your file worse.
Next, try to verify your Styles. Command/Control-click on each style name in the Style palette to bring up the Edit Styles dialogue box, then hit Enter (or press OK). If you get an error message with one of them, you've found a corrupted style. Command/Control-click on "No style" and type the name of the bad style, exactly, except for any plus signs or asterisks. Save the file under a new name with Save As.
If there is still a problem, try printing the file. Sometimes a bad record index is associated with only a single item in a document, as opposed to the document itself, and deleting the item will "cure" the document. If you can print everything except one graphic or text block, you may have found the problem area. This will at least give you the opportunity to try to delete the offending element (e.g., a graphic or text block). Another option is to invoke the "slide show" feature, as mentioned above. Allow PageMaker to cycle completely through the document, noting any errors or layout oddities. This is the same theory try to isolate the bad page(s) and then try to pinpoint the problematic element(s) on the page(s). If you can't do that, then try deleting the page in question and see if that restores the integrity of the document. You will then need to rebuild the page in question. (This is also dangerous it could simply move or expand the corruption.)
You might also try using the Links feature to unlink all the graphics. To do this, choose "Links Manager" from the File menu. Start with the last item you placed into the document and unlink it. Create a new version of your document with "Save As." If this wasn't the problem, unlink everything. Move your document and everything that was linked to it to into a new folder and re-link everything. If that doesn't work, try the same technique with any linked text.
Next, try saving the file as the next older version of PageMaker for example, if you're working in PageMaker 6.5, do a "Save As" and choose PageMaker 6.0 format.
What if I can't even open the document?
All of the preceding assumes you are at least able to open
the corrupted file. If you cant, try opening it in a later
version of PageMaker, or, if you are already using the latest
version (6.5.2), try the version for the other operating system
(if you're on Windows, try opening your 6.5 document in PageMaker
6.5 for the Mac). If possible, try opening your English language
document in a foreign language version of PageMaker Yosuke
has had success
doing this, reporting that when the Japanese version opens an English
language publication, it reports "converting
to J-format," and hypothesizes that the process is able to
rebuild some of the structure of the file.
Along the same lines, Massimo Mezzini reports that a cross-platform
migration can sometimes do the same: when he was unable
to access a file created in PageMaker for Windows, he
took it to a Macintosh and it opened with no problems except for a font
warning. He saved the file with a different name and PageMaker said
that an internal problem had been fixed. The file then opened perfectly
on the Windows machine.
If PageMaker crashes when you try to open a file (e.g., with a Type 1 or Type 2 error on the Mac), try allocating more memory to PageMaker. Also try running PageMaker with extensions off (boot with the shift key held down). Try moving the Fonts folder out of the System Folder before starting PageMaker, in case there is a corrupted font. Finally, try reinstalling the system and PageMaker. Under Windows, make sure you are running with as few background applications as possible, and start Windows in Safe Mode. Under either operating system, try moving the file to another, preferably more powerful, machine. If you can get it to open, immediately do a "Save As" and apply the troubleshooting techniques described above on a copy of the file.
In the worst case scenario, you will not be able to open the file to try to fix it. In this case, try using "Place" to access the damaged document by creating a new document and placing the stories from the corrupted document into the new one. If this works, you can at least recover the text from the damaged document. Also try importing the style definitions. (Note: this can import corruption along with the text. Do not use this feature routinely, only as a last resort!) There is apocryphal evidence of using the Place command to repair a corrupted document, so after trying this, try opening the damaged document again.
If this fails, you are faced with re-creating the document from scratch (or from your most recent backup). Two utilities to make this easier are Can Opener (a Macintosh program capable of extracting text or graphics from a document) and Microsoft Word, which can usually extract the text from even a corrupted document created in another application using its "Recover text from any document" feature.
All of the preceding may work, but your best bet once a bad record index error appears is to rebuild the publication. Copying elements from one publication to another will only spread the data corruption to new publications. They may seem fine for a few editing sessions, but, unless you've been very lucky, the corruption will tag along. This is true for scripts that copy and paste, as well. Copying and pasting (or dragging and dropping) will sometimes buy you the time you need to finish a project, but it can't be trusted as a long-term solution. It also doesn't matter which elements you copy and paste the corruption can be in any type of object. In the Downloads section, you will find scripts to help you rebuild your publication from scratch.
How do I prevent corruption?
The best approach is to keep a careful archive trail of backed up documents at different stages of production (in other words, BACK UP!) and practice safe computing. You can usually avoid bad record indexes by following a few rules.
First, make sure your operating system is up to date. For instance, if you're running Mac OS 8.6, install the Font patch from Apple. That may be the source of this quick corruption you are getting. The Adobe web site for PageMaker problems is http://www.adobe.com/support/techdocs/topissuespm.htm
Here are the top 20 tips for avoiding corrupted PageMaker documents:
- Make sure you're running the appropriate version of PageMaker for instance, if you have 6.5, upgrade to 6.5.2; if you have 6.0, upgrade to 6.0.1.
- Set your save preference to "Smaller" it takes more time when you save, but its worth it, because you are creating a new copy of the file each time (see below).
- Turn off the fast save feature in Word. Sometimes even Word cant read fast-saved files! If possible, export Word files to RTF and place that. Fewer things can go wrong with RTF, as its a text-only (ASCII) format.
- Always keep at least 300 MB free on your hard drive. When PageMaker runs out of disk space trying to save or minisave a publication, file corruption almost always results.
- Do not use copy and paste to move data into PageMaker publications. Use the Place command instead.
- Simplify. Try to run PageMaker with as few other applications and extensions running as possible.
- Keep your entire system running as reliably as possible, and check regularly for viruses and hard disk problems.
- Try to keep files small say, 4-5 MB or 40-50 pages. Divide longer projects into shorter files linked with the book feature.
- Dont embed graphics, link them.
- Minimize the number of inline graphics.
- Avoid using and revising files repeatedly, as this can lead to "corruption buildup." If you use the March issue of your newsletter as the basis of your April issue, for example, you're asking for trouble. This is sometimes unavoidable, but whenever possible, make a template so that you start with a fresh copy each time.
- Keeps files local. Don't run PageMaker, open PageMaker files, or place graphics from file servers. Use the server for backup or for sharing files, but when you need to work on the project, copy it to your hard drive, then copy it back up when youre done.
- If youre on a Macintosh, make sure you allocate more RAM to PageMaker, especially before running any RAM-consuming plug-ins such as Page Sorter, PDF Export, Running Headers and Footers, Build Booklet, etc. (Running out of RAM while these plug-ins are running often leads to crashes and corrupted publications.) To do this, click once on the program icon (the original, not an alias) and select "Get Info" from the File menu. In the "Memory" section, change the Preferred size to something larger than the Suggested size say, 10,000 or 12,000 K. Note: When running PageMaker on a Power Mac, memory requirements will change depending on whether virtual memory is on or off. Be sure to check your PageMaker memory allocation if you turn virtual memory on or off.
- After placing Word files, check for imported styles (the ones marked with a disk icon) and delete them or Command/Ctrl-click the style name in the Styles palette, then click OK to make PageMaker own the style definition.
- Be consistent when you apply styles in Word for documents you will be importing into PageMaker. Dont create two different styles with the same name unless you plan to use tags and have PageMaker versions of each Word style you use. The safest course is to make a PageMaker styles named Normal your default style to prevent the import of this style from Word. Create the style and select it with no documents open to ensure that it the default style for all your new ducuments.
- When typing directly into PageMaker, always assign a style to what you type. Never create an empty text block in PageMaker always type something into the text block, even if you plan to delete it.
- Avoid having too many styles. Run the Remove unused styles script on a regular basis.
- At the first sign of trouble a can't paste from clipboard error, for example rebuild the publication. Several people have noted that incorrect or garbled names in drop-down menus are a first sign of memory problems. So if you see Colors where Frames should be, for example, its time to reboot. Other visual clues may give you advance warning of a crash, as well.
- Dont experiment when youre on a deadline.
- Make frequent backups. The more complex a file, the more important this is. Its Murphys Law in reverse that if you have a recent backup, its unlikely anything will go wrong. Adamss law states that the odds of damaging a file are evenly distributed across all backed-up copies of the file, so if there is a 10% chance of one file blowing up, the odds drop to 1% if there are ten copies of the file!
Frequently Asked Questions (FAQ) from the PAGEMAKR list: http://www.makingpages.org/pagemaker/pm-faq.html
Christine Hummel's PageMaker page: http://home.earthlink.net/~phojo/pagemaker/PageMaker.html
Adobe Tech Support Documents:
Duplicate style names issue: http://www.adobe.com/support/techdocs/170ce.htm
Damaged document troubleshooting guide: http://www.adobe.com/support/techdocs/2248a.htm
Unopenable publications in Windows: http://www.adobe.com/support/techdocs/654e.htm
Ole's Object Recorder Script (Mac version: object.recorder.spt.sit.hqx)
Ole's Object Recorder Script (Windows version: recorder.zip)
Jonathan's CopyFile Script (Mac version: CopyFile115.spt.sit)
Jonathan's CopyFile Script (Windows version: CopyFile115.zip)
- To use Ole's script, record something by using the Pointer tool to select the object or objects you want to record, then run the script. The script will display a standard file dialog box. Enter a name for the recorded object script, then click the OK button. The script examines every object in the selection and writes it to disk as a series of scripting commands. As you'd expect, this can be slow especially if you have lots of text selected. (Note: due to the architecture of Apple Events, scripts run more slowly on the Mac.) Once the script has finished running, create a new publication. Run the script, and you'll see it recreate the objects you selected in the same locations they occupied in the original publication.
See also the myriad notes and cautions in the body of the script itself. Do not edit this script using the Edit Script window on the Mac! This script is getting near the maximum number of characters the Script editor can handle, and if you try to edit it inside PageMaker, you could lose characters at the end of the script. Instead, use Word or BBEdit. I haven't encountered a similar problem in Windows, but it could still happen.
This script also does not record layer information or text wrap, nor does it transfer style definitions (though it does transfer style application). The next version will.
Note that this script does not record the entire publication, only the selected items.
In its current form, the scripts require some knowledge of how scripting works. Read the comments in the script code for more information.
- To use Jonathan's script, just open the publication you want to replicate and run the script. This script will run much more quickly than Ole's, but may copy a corrupted element from one publication to another. This script is useful if you're in a hurry (especially if the corruption is only style-based), but to be safe, you should later use Ole's script to rebuild the publication from scratch.
Of course, CopyFile isn't just for damaged documents. It can be used anytime.
Be sure to read the extensive comments in the script itself for full details.
The main advantages of CopyFile are that it is faster, it does entire files, and it maintains frame threading, whereas Ole's script currently works only on selected objects on the same page/spread. However, as Ole pointed out, CopyFile's method in most cases just copies the corruption to the new file. (It is useful in cases where the only problem is in style corruption, because it gives a way of eliminating an offending style, when corruption prevents deleting the offending style). The advantage of Ole's method is that no corruption is copied to the new file, because there is no copying. Rather, object characteristics and contents are recorded in a new script, which is then run on a new file to regenerate the object from scratch. This gives a perfect isolation between the corrupted file and the new file.
If you're running PageMaker under Mac OS 8.6, you must install the Font Manager Update. Also, you should run the Apple "Font First Aid" to correct any problems that were created before the update was installed. Both are available at Apple's web site.
Diamond Soft, makers of the Font Reserve fot checking and management software, have made another "Font Fix" utility available to 8.6 users free.
For more information on the Mac OS 8.6 Font Manager bug, see the "Ask Al" report.
Other Troubleshooting Documents
Repairing a Greyed-Out Script Palette
Fixing the "Rainbow Bridge" Error