PictureExport

<< Click to Display Table of Contents >>

Navigation:  Picture Export Functions >

PictureExport

Previous pageReturn to chapter overviewNext page

[Windows Platform Only, Professional Edition and above]

Exports a rectangular part specified by x, y, x2, y2 of the page specified in parameter "page_no" to file. The settings for the export options of the specific file type, PictureExportColorDepth and PictureExportDither are used.

The type of image is automatically determined by the suffix of FileName (e.g. ".JPG" = JPEG). If FileName contains no suffix or a suffix which does not specify an image type (e.g. ".001"), the image type can be specified with the property PictureType.

The resolution of the image is defined with DefaultPictureDPI().

method boolean VPE.PictureExport(

string FileName,

long PageNo,

VpeCoord Left,

VpeCoord Top,

VpeCoord Right,

VpeCoord Bottom

)

string FileName

(path- and) filename of exported image

long PageNo

page number of the page that shall be exported from the document

VpeCoord Left, Top, Right, Bottom

rectangle of the page in metric or inch units that shall be exported as image

Returns:

Value

Description

True

success

False

failure

Remarks:

In case of an error, LastError is set.

 

During export, the BusyProgressBar is shown.

 

For Left, Top, Right, Bottom you can also specify the V-Flags and for Right, Bottom negative values to specify a delta value instead of an absolute coordinate.

 

The higher the color depth and the higher the resolution, the more memory is needed during export to create the image.

 

Metafiles are only supported on the Windows platform. The color depth and resolution can not be specified for metafiles (WMF / EMF), metafiles are always exported in true-color with a resolution of 600 x 600 DPI. The maximum dimensions for exported WMF is limited to 60 x 60 cm, this does not apply to EMF.

Example:

ActiveX / VCL:

Doc.PictureExportColorDepth = PICEXP_COLOR_256

Doc.PictureExportDither = PICEXP_DITHER_MONO

Doc.SetPictureDefaultDPI(300, 300)

Doc.PictureExport("test.bmp", 1, 1, 1, -5, -5)

 

.NET:

Doc.PictureExportColorDepth = PictureExportColorDepth.Color256

Doc.PictureExportDither = PictureExportDither.DitherMono

Doc.SetPictureDefaultDPI(300, 300)

Doc.PictureExport("test.bmp", 1, 1, 1, -5, -5)

Instructs VPE to generate from the rectangle (1, 1, 6, 6) from page one of the document internally a 256 color image with 300 x 300 DPI resolution first, and to dither it down afterwards to b/w (monochrome) in the same 300 x 300 DPI resolution when writing it to the BMP file named "test.bmp".

 

ActiveX / VCL:

Doc.PictureExport("test.bmp", 1, VLEFT, VTOP, VRIGHT, VBOTTOM)

 

.NET:

Doc.PictureExport("test.bmp", 1, Doc.nLeft, Doc.nTop, Doc.nRight, Doc.nBottom)

Instructs VPE to export the last inserted object to an image file.