Logo: TechTrax...brought to you by MouseTrax Computing Solutions

How to PDF Complex Word Docs

by Karen Clark
Skill rating level 10.

Recently, I worked on a very challenging project that involved converting Word docs to PDF format. These docs contain some unusual elements that made the conversion process very difficult:

1. The heading styles were linked to outline numbering. Acrobat doesn’t “see” the outline numbering, and so omits it from the bookmarks.

2. There were many cross-reference links to heading and paragraph numbers residing in separate documents, which complicated everything.

To fix challenge #1, I converted the outline numbering to flat text, which was very simple to do. But in doing so, all the cross-reference links were destroyed! They don’t convert to flat text like the outline numbering does. Instead, they return error messages. Also, all the page numbers (which contain the Heading 1 chapter numbers) were messed up. <sigh>

If my project simply consisted of chapters that were brief and few in number, I would not have been challenged. A little manual tweaking, and off we would go.

But I was working with 18 separate Word documents with a combined total of several hundred pages. Until I found my solution, it took me over eight hours to PDF the entire project. To make matters worse, this document is edited about six times each year.

When I finally discovered my solution, I documented my steps (primarily for the next person in case I get hit by a truck). But for those of you who may also have difficult projects ahead, I share my soltuion with you here.

Project Overview

  • Multi-chapter user guide project. Each chapter is a separate Word document
    (i.e., Chapter1.doc, Chapter2.doc, etc.).

  • Heading styles are linked to outline numbering.

    Example:      1. Heading 1
                        1.1 Heading 2
                        1.1.1 Heading 3
                        1.1.1.1 Heading 4

  • Page numbers include the Chapter numbers which are linked to the Heading 1 style.

    Examples: Page 1-1, Page 1-2, Page 1-3, etc.

  • Many paragraphs (those that serve as procedural steps in this user guide) are auto-numbered.

  • This project includes many cross-reference links to heading numbers and paragraph numbers residing in separate documents. {INCLUDETEXT} fields are linked to bookmarked heading and paragraph numbers.

    Example: A link in Chapter 2 directs the reader to “step 4 in Chapter 6.”

  • The final document must be delivered in PDF format as one single document, including:

    o   Outline-numbered bookmarks, and

    o   Active cross-reference links.

Challenges

Acrobat PDFMaker creates bookmarks automatically using Word’s Heading styles. The challenge in this project, however, is that Acrobat can’t see the outline numbering in the Heading styles. As a result, the outline numbering doesn’t show up in the bookmarks.

The remedy is to convert the outline numbering to “flat text” (regular, ordinary text), which is very simple to do. But in doing so, all the cross-reference links are destroyed! They don’t convert to flat text like the outline numbering does. Instead, they return error messages.

One (really bad) solution is to go through each document and manually replace all cross-reference links with regular text. Another (really bad) solution is to manually type the outline numbering on all the bookmarks in the PDF document.

Both solutions are tedious, time-consuming, and archaic. Worse yet, they must be repeated each time the documents are edited and re-PDFed. These are not viable solutions.

So What’s a Good Solution?

  1. First, convert all fields and cross-reference links to flat text.

  2. Then convert all heading outline numbering to flat text.

Prep Work

  1. Create a second set of documents by copying them all to a new folder. This keeps the original automated documents in tact for future edits with their active links, outline numbering, etc.

    Note: From this point forward, work with the second set of documents.


  2. Create automated TOC and/or TOF, if applicable, using RD fields to link to the separate documents. These documents can be converted to PDF format at this time.

  3. Make sure all fields in the chapter documents are updated:

    a.     Select each document in its entirety: Ctrl+A

    b.     Update all fields: F9

Convert Fields and Cross-Reference Links to Flat Text

Open each document individually, and follow these steps to convert the fields and links to flat text.

  1. Select each document in its entirety: Ctrl+A

  2. Convert all fields and links to flat text: Ctrl+Shift+F9

  3. View the Headers/Footers: Alt+V, H.

  4. If the Headers contain Chapter Numbers, convert them to flat text using Ctrl+Shift+F9.

  5. Switch to the Footers, and convert those fields to flat text using Ctrl+Shift+F9.

  6. Important! Don’t convert the page numbers to flat text! They will not work properly if you do.

    Instead, manually type the Chapter Number and a dash (or whatever separator you choose) after the word “Page.” Leave the Page Number field as it is. It will look strange, like in the following examples:

    Page 1-1-1 Page 2-2-1 Page 3-3-1
    Page 1-1-2 Page 2-2-2 Page 3-3-2
    Page 1-1-3 Page 2-2-3 Page 3-3-3
  7. Note: The shaded area is the Page Number field, which includes the Chapter Number. It’s okay to leave the Chapter Number in the field. (It was necessary for TOC and/or TOF purposes.) Don’t worry—the extra number will disappear once fields are converted to flat text.

  8. Remember that each section can potentially contain as many as three (3) headers and footers (First Page, Odd Page, and Even Page) so make sure to check the entire document for section breaks.


  9. All fields and links should be converted to flat text now, with the exception of Page Number fields. Check the document to make sure there are no unconverted fields or links.

Convert Heading Outline Numbering to Flat Text

  1. Open the first chapter document.

  2. Launch the Visual Basic Editor (VBE): Alt+F11

  3. Open the “Immediate” window: Ctrl+G

  4. Type the following text in the “Immediate” window:

    ActiveDocument.ConvertNumbersToText

    Note: After you start typing the word “Convert,” you will notice that the VBE attempts to complete the command for you. Press <Tab> to accept the VBE suggestion.

  5. To execute the command, press <Enter>.

  6. Click the Save button on the toolbar.

  7. Close the Visual Basic Editor: Alt+Q

  8. All the heading outline numbering should now be converted to flat text. You can verify the conversion by selecting a heading—you should be able to manually edit the outline numbering.

  9. Check to verify that the Page Numbers now look correct.

  10. Save and close.

  11. Open the next chapter document.

  12. Launch the VBE: Alt+F11

    Note: After you have converted the outline numbering in one document, the VBE command will already appear in the “Immediate” window in subsequent documents. In order to execute it, all you have to do is:

    a.     Press <Backspace> once to move your cursor up to the end of the command line.

    b.     Repeat steps 5 through 12 above.

  13. Continue until all chapter documents have been processed.

Convert the Documents into PDF Format Using PDFMaker

  1. Use Acrobat PDFMaker to convert each document into PDF format. PDFMaker will create all the bookmarks automatically, including the outline numbering.

  2.  Combine the separate PDF documents into one document.

  3.  The cross-reference links through the document will display the correct numbers, but they will not “work.” Manually activate them using Acrobat’s “Link” tool.

I hope this information will spare someone else from pulling out their hair in frustration!

Click to rate this article.

 

Go up to the top of this page.
This site powered by the Logical Web Publisher™: Content management by Logical Expressions, Inc.