Do you need to print a 4D form with an embedded 4D View Pro document, or maybe displaying part of the document in a 4D View Pro document? With the VP Convert to picture command, you can create an SVG from a part of the 4D View Pro document and handle it like a picture. We’ll show how in this blog post.
The VP Convert to picture command provides a simple way to convert a document into a picture:
PictViewPro:=VP Convert to picture ($doc)
This enables you to use classic 4D commands to print your documents. For example if you need to print a document using SET PRINTING JOB or SET PRINT OPTION, you can display your picture in an input form object and print it:
PRINT SETTINGS
If (OK=1)
SET PRINT OPTION(Orientation option;1)
OPEN PRINTING JOB
// more print commands here, such as Print Form or Print Object
// Document conversion
PictViewPro:=VP Convert to picture ($doc)
// Load a form with an input form object bound to the PictViewPro variable
FORM LOAD("PrintForm_Portrait")
// Print input form object
OBJECT GET BEST SIZE(PictViewPro;$bestwidth;$bestheight)
$end:=Print object(PictViewPro;0;0;$bestwidth;$bestheight)
FORM UNLOAD
// printing other parts of your report
CLOSE PRINTING JOB
End if
Find more examples in the HDI below: