modifyDocxSettings

modifyDocxSettings

ADVANCED / PREMIUM BASIC

Modifies the general settings of an existing Word document.

Description
public modifyDocxSettings (string $source, string $target, [, array $options])

With the help of this method you can set, among many others:

  • The way the Word document will print.
  • The view mode and zoom of the Word document at opening.
  • To hide or show grammatical and/or spelling errors.
  • To track or not revisions.
  • The document type.
  • Hyphenation settings.
  • Default table style and tab positioning.
  • Etcetera.
Parameters

source

The path to the source Word document.

target

The path to the Word document resulting after changing it.

settingParameters

The possible keys and values of this array are:

Key Type Description
autoHyphenation bool
bookFoldPrinting bool
bookFoldPrintingSheets int Number of pages per booklet.
bookFoldRevPrinting bool
bordersDoNotSurroundFooter bool
bordersDoNotSurroundHeader bool
consecutiveHyphenLimit int Maximum number of consecutively hyphenated lines.
defaultTabStop int In twips (twentieths of a point).
defaultTableStyle string The table style to be used by default.
documentType string notSpecified (default), letter, eMail
doNotHyphenateCaps bool Do not hyphenate capital letters.
doNotShadeFormData bool
gutterAtTop bool
hideSpellingErrors bool
hideGrammaticalErrors bool
hyphenationZone int Distance in twips (twentieths of a point).
mirrorMargins bool If true interchanges inside and outside margins in odd and even pages.
noPunctuationKerning bool Never kern punctuation characters.
printTwoOnOne bool Print two pages per sheet.
savePreviewPicture bool Generate thumbnail for document on save.
trackRevisions bool
updateFields bool Automatically recalculate fields on open.
view string none (default), print, outline, masterPages, normal (draft view), web.
zoom mixed A percentage or none, fullPage (display one full page), bestFit (display page width), textFit (display text width).
Return values

Void.