Batch Conversion of Text Files to PDF

,,

Not long ago, I heard from a large pharmaceutical company working on a new drug submission. As part of the process of testing the new compound, they had written over one thousand Visual Basic programs to process and organize data.

Text File Pic

In communication with FDA staff, they learned that they would be required to submit the computer code for these programs for review by the agency.

As you might guess, the prospect of opening the code for each program individually in a word processor and converting to PDF was not appealing.

Was there a way to automate the process that would also allow control over fonts, layout and the version of PDF needed for submission?

Yes, this is possible using Acrobat 8 Professional.

Read on to learn about Batch Conversion of Text Files to PDF.

Changing Conversion Settings

Before converting files, you will need to change the default text conversion settings used by Acrobat such as:

  • Font
  • Font Embedding
  • Page Margins

Acrobat uses its HTML conversion engine to convert text files.

Follow these steps to customize the conversion of text files:

Follow the steps below:

  1. Go to File—>Create PDF—>From Web PageFile pick
  2. Click the Settings button
    Click the settings button
  3. Scroll down and select "Plain Text" in the list. Then, click the Settings button.
  4. On the General tab, Click the Fonts and Encoding tab and make the following changes:

    Changing the settings

    1. Click the Change button to change the typeface to Courier.
    2. Change the Text Font to 10 points
    3. Check "Embed Platform Fonts When Possible"
  5. Optional: Click the General Tab and set reflow options for the text.
    Setting reflow options
    Program code often has long lines which do not break at margins automatically. You may wish to experiment with the options in this section to have the text line wrap. You may also limit the number of lines per page.

  6. Click OK to return to the Web Page Conversion Settings window.
  7. Click the Page Layout tab.
  8. Set the Page Margins

    Note that the FDA’s PDF Specifications require a minimal left margin of .75" and .375" for the remaining margins. However, you may wish to use greater margins to accommodate headers and footers.

Preserving Conversion Settings

You must convert at least one file using the "Create PDF from Web Page" screen for the settings to stick.

  1. Click the Browse button to locate a text file.
  2. Click the Create button and Acrobat will create a PDF from your program code or other text file.

Carefully review the newly created file and follow the steps above to make any changes necessary.

Creating a Batch Sequence

An Acrobat Batch Sequence allows you to specify a number of operations to be made to a file. The following section describes how to build a very simple sequence.

Organizing and Getting Ready : The steps below presume that you will put all of the text files you wish to convert into a single folder. The Batch Sequence you build will allow Acrobat to convert any documents found within the folder, even if they are located in sub-folders.

The following also presumes that you will place all of the

To create a Batch Process to convert many text files, follow these steps:

  1. Choose Advanced—>Document Processing—>Batch Processing
  2. Click the New Sequence button. Name the sequence and click OK.
  3. The Edit Batch Sequence window will appear.

    1. Set Run Commands on "Selected Folder" . Then click the Browse button and locate the folder containing your source text files

      Optional: You may also set an output location if you do not wish to save the PDFs in the same location as your source text files.

    2. Click Output Options
  4. The Output Options window appears:

    1. Enable the PDF Optimizer
    2. Click the Settings button
  5. The PDF Optimizer window appears:

    1. Choose Make Compatible with "Acrobat 5.0 or later"
    2. Click the Save button and give the PDF Optimizer settings a name.
  6. Click OK twice.

Running the Batch Text Conversion Sequence

To run the batch sequence, follow the steps below.

  1. Choose Advanced—>Document Processing—>Batch Processing
  2. The Batch Sequence Window appears

    1. Choose a sequence from the list on the right
    2. Click the Run Sequence Button

Further Considerations

Batch Sequences may also be used to create Headers and Footers that number pages, add watermarks and much more.

After creating a batch sequence, click the Select Commands button.Select Commands to add more options

You can then choose from many different commands (on the left) and add them to the list on the right.