ExportDocToPDF

The ExportDocToPDF command uses the Microsoft Word export filter to produce a PDF file directly from a Microsoft Word document.

This command is only available for Microsoft Word documents and requires Microsoft Office 2007 or higher. This command might also require installation of the optional PDF/XPS add-in if PDF support is not included in the Microsoft Office installation.

The ExportDocToPDF command provides a number of optional parameters, which affect the way in which the PDF document is generated. If no optional parameters are provided, KCM Core uses sensible defaults.

You can set a global default for some of the optional parameters. These global defaults can be set in the [Configuration] section of the dp.ini file.

Syntax

ExportDocToPDF
  Src(<text>)
  Dest(<text>)
  OptimiseForPrint(True or False)
  IncludeProperties(True or False)
  ExportBookmarks(<number>)
  BitmapFonts(True or False)
  ProducePDFA(True or False)
  AccessibilityInfo(True or False)
  TimeOut(<number>);

Parameters

  • Src: Required. The Microsoft Word document that KCM Core converts to PDF.
  • Dest: Required. The resulting PDF document.
  • OptimiseForPrint: Optional. Indicates if the resulting PDF document should be optimized for printing (True) or for screen reading (False). This parameter defaults to False when omitted. You can change the default value using the following setting in the dp.ini file.
  • ExportDocToPDF.OptimiseForPrint= (Y or N)
  • IncludeProperties: Optional. Indicates whether some document properties, such as author, title, and so on, from the Microsoft Word document should be copied into the PDF document. This parameter defaults to False when omitted.
  • ExportBookmarks: Optional. Indicates whether a bookmark table should be added to the PDF document. Supported values are:
    • 0 No bookmarks are generated
    • 1 Bookmarks are generated based on the Heading styles in the Word document
    • 2 Bookmarks are generated based on bookmarks in the Word document
  • This parameter defaults to 0 when omitted.
  • BitmapFonts: Optional. If font licenses do not permit a font to be embedded in the PDF document, this setting indicates how the font is handled. True: a bitmap of the text is included in the PDF document. False: the font is referred but not included. Select an appropriate (substitute) font in the printer settings. This parameter defaults to True when omitted. You can change the default value using the following setting in the dp.ini file:
    ExportDocToPDF.FontBitmaps=(Y or N)
  • ProducePDFA: Optional. Indicates whether the PDF document is limited to the PDF/A (ISO 19005-1) subset. Such documents are more self-contained but could be larger or show more visual artifacts. This parameter defaults to False when omitted but the default value can be changed using the following setting in the dp.ini file:
     ExportDocToPDF.ExportPDFA=(Y or N)

    The conformance level of your PDF outputs may differ case by case because it is influenced by Microsoft Word. If you need to be sure that the resulting PDF has a specific conformance level, use DocToPDF with Rendition instead.

  • AccessibilityInfo: Optional. Indicates whether structure information is embedded in the PDF document to facilitate screen readers. This parameter defaults to True when omitted.
  • TimeOut: Optional. The timeout for this command in seconds. If the word processor exceeds this timeout, the process is terminated and KCM Core reports a run-time error. If this parameter is omitted, the appropriate default timeout value for either batch or interactive jobs is used. A timeout value of 0 disables the timeout. This feature is currently only supported for Microsoft Word.