Saltar para o conteúdo principal
Versão: 20 R5 BETA

VP SET PRINT INFO

VP SET PRINT INFO ( vpAreaName : Text ; printInfo : Object { ; sheet : Integer } )

ParâmetroTipoDescrição
vpAreaNameText->Nome da área 4D View Pro
printInfoObject->Objeto que contém atributos de impressão
sheetInteger->Índice da folha (folha atual se omitida)

Descrição

The VP SET PRINT INFO command defines the attributes to use when printing the vpAreaName.

Passe o nome da área 4D View Pro a ser impressa em vpAreaName. Se passar um nome que não existe, é devolvido um erro.

You can pass an object containing definitions for various printing attributes in the printInfo parameter. To view the full list of the available attributes, see Print Attributes.

In the optional sheet parameter, you can designate a specific spreadsheet to print (counting begins at 0). Se omitido, a planilha atual será utilizada por padrão. Você pode selecionar explicitamente a planilha atual com a seguinte constante:

  • vk current sheet

Exemplo

O código seguinte imprime uma área 4D View Pro num documento PDF:

var $printInfo : Object

//declare print attributes object
$printInfo:=New object

//define print attributes
$printInfo.headerCenter:="&BS.H.I.E.L.D. &A Sales Per Region"
$printInfo.firstPageNumber:=1
$printInfo.footerRight:="page &P of &N"
$printInfo.orientation:=vk print page orientation landscape
$printInfo.centering:=vk print centering horizontal
$printInfo.columnStart:=0
$printInfo.columnEnd:=8
$printInfo.rowStart:=0
$printInfo.rowEnd:=24

$printInfo.showGridLine:=True

//Add corporate logo
$printInfo.headerLeftImage:=logo.png
$printInfo.headerLeft:="&G"

$printInfo.showRowHeader:=vk print visibility hide
$printInfo.showColumnHeader:=vk print visibility hide
$printInfo.fitPagesWide:=1
$printInfo.fitPagesTall:=1

//print PDF document
VP SET PRINT INFO ("ViewProArea";$printInfo)

//export the PDF
VP EXPORT DOCUMENT("ViewProArea";"Sales2018.pdf";New object("formula";Formula(ALERT("PDF ready!"))))

O PDF:

Veja também

Atributos de impressão 4D View Pro
VP Convert to picture
VP Get print info
VP PRINT