The latest release of the GFM-engine has now support for PDF. With GFM you can manipulate and change PDF files automatically in a batch mode. With the combination of the GFM scripting language the combinations are almost endless. Hallelujah!

Basics

Since PDF is page based, you can say that a PDF file has an index over all pages in the document, can each page be accessed directly and individually. In GFM will you also work with PDF files on a page level.

In GFM the principle to work with PDF files is the following:

  1. Open the PDF file
  2. Load the page you wants to work with
  3. Do your changes to the currently loaded page
  4. Save the page
  5. Load, change and save any other page in the PDF file
  6. Close the PDF file

Examples of what you can do with PDF files and GFM

  • Change Title, Author, Subject or anything in the Info dict.
  • Add text to a page. For example could you change the page number on a page by first removing the old page number and then add a text that holds the new page number. You could also add, or stamp, any text like Proof on each page in a PDF file.
  • Add images to a page. The image can be positioned, rotated and scaled at any position on the page.
  • Add a shape in any color. Could be used to remove anything on a page using the same color as the background.
  • Change the size of a page. This means that you can crop or enlarge a page to a specified size.
  • Extract a page from a PDF file and save this page as a separate PDF file.
  • Add a page to a PDF file.
  • Remove a page from a PDF file.

What can you not do with PDF files and GFM

  • You cannot work with encrypted or secured files.
  • You cannot embed fonts in this version. I.e. either must the font be accessible for Distiller or you have to use any of the 14 base fonts when adding text.
  • In some PDF files with very nested an complex page trees will GFM have problems to parse the file.