This is the legacy 4D documentation web site. Documentations are progressively being moved to developer.4d.com |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
4D v19
VP Convert to picture
|
VP Convert to picture ( vpObject {; rangeObj} ) -> Function result | ||||||||
Parameter | Type | Description | ||||||
vpObject | Object |
![]() |
4D View Pro object containing the area to convert | |||||
rangeObj | Object |
![]() |
Range object | |||||
Function result | Picture |
![]() |
SVG picture of the area | |||||
The VP Convert to picture command converts the vpObject 4D View Pro object (or the rangeObj range within vpObject) to a SVG picture.
This command is useful, for example:
In vpObject, pass the 4D View Pro object that you want to convert. This object must have been previously parsed using VP Export to object or saved using VP EXPORT DOCUMENT.
Note: SVG conversion process requires that expressions and formats (cf. 4D View Pro Cell Format) included in the 4D View Pro area be evaluated at least once, so that they can be correctly exported. If you convert a document that was not evaluated beforehand, expressions or formats may be rendered in an unexpected way.
In rangeObj, pass a range of cells to convert. By default, if this parameter is omitted, the whole document contents are converted.
Document contents are converted with respect to their viewing attributes, including formats (see note above), visibility of headers, columns and rows. The conversion of the following elements is supported:
Note: Gridline visibility depends on document attribute defined with VP SET PRINT INFO.
Function result
The command returns a picture in SVG format.
You want to convert a 4D View Pro area in SVG, preview the result, and send it to a picture variable:
C_OBJECT($vpAreaObj)
C_PICTURE($vPict)
$vpAreaObj:=VP Export to object("ViewProArea")
$vPict:=VP Convert to picture($vpAreaObj) //export the whole area
Product: 4D
Theme: 4D View Pro Language
Number:
9885
Created: 4D v18
4D View Pro Reference ( 4D v19)