4D View Pro: SVG conversion

Automatically translated from English

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:

HDI Convert To SVG

 

Fabrice Mainguené

• Product Owner •

Fabrice Mainguené joined 4D Program team in November, 2016. As a Product Owner, he is in charge of writing the user stories then translating it to functional specifications. His role is also to make sure that the feature implementation delivered is meeting the customer need.

After obtaining a Bachelor degree in Computer Science at CNAM, Fabrice joined a small software publishing company as a Windev developer. Then he worked for different companies in industry and trade areas as a Windev and web developer as well as technical advisor on new features.