# DrawToFile

Draws a page of a document to a graphic file (thumbnail). Use this method with the OPENMode property set to `7` (drawing mode enabled).

## Syntax

    bRet = KeyView.DrawToFile(szTargetFile, szGfxOutput, uPageNumber, nWidth, nHeight, nPicXRes, nPicYRes, nQuality)

## Parameters

Parameter | Type | Description
--- | --- | ---
`szTargetFile` | String | The target path and file name to which the page is written. The file should use one of the following four extensions: `.bmp` `.jpg` `.png` `.tif`
`SzGfxOutput` | String | The output graphics format. The following options are available: `bmp` `jpg` `png` `tif` (uncompressed TIFFs) You must specify the parameter in lower case.
`uPageNumber` | UINT | The number of the page to be rasterized into a thumbnail. Page numbers start at 0. For example, set `uPageNumber` to `0` to draw page 1, and to `1` to draw page 2. For word processing documents, pages must be drawn sequentially. For example, to draw page 3, you must first draw pages 0 and 1.
`nWidth` | Integer | The maximum picture width (in TWIPS).
`nHeight` | Integer | The maximum picture height (in TWIPS).
`nPicXRes` | Integer | The desired horizontal resolution (`0` for default).
`nPicYRes` | Integer | The desired vertical resolution (`0` for default).
`nQuality` | Integer | This parameter controls the output quality of graphics that support compression quality (for example, JPEG). The valid range is `0` to `100`. A value of `0` means default quality (85 compression); `1` is the lowest quality (highest compression and therefore the smallest file size); `100` is the highest quality (no compression and therefore the largest file size). The default is `0`.

## Returns

Type | Description
--- | ---
Boolean | `TRUE` if the method succeeds. `FALSE` if the method fails.

© Copyright 2016-2020 Micro Focus or one of its affiliates | Send documentation feedback Close Send documentation feedback To open the configured email client on this computer, open an email window. Otherwise, copy the information below to a mail client, and then send this email to swpdl.idoldocsfeedback@microfocus.com. We appreciate your feedback! Product: Topic Title: Help Topic: Feedback:

_FT_HTML5_bannerTitle.htm