70001256 Multipage PDF export with VDF Wrapper ActiveX

Article 70001256
Type Wish
Product Engine
Version 7012
Date Added 1/23/2018
Fixed 7.7014.0.6 (1/23/2018)
Submitted by Sunil Kulkarni


Is it possible to export a single PDF file with multiple pages from VDF Wrapper ActiveX component?


In version 7.7014.0.6 a new property named ExportMultiPagePDF was exported to the vdDocument that can export an a array of vdPrint objects into a single PDF file.
Also a new vdPrintArray was exported in order to be used in this function.

See the VB6 Code below:

Private Sub Command1_Click()
Dim doc As VectorDraw_Professional.vdDocument
Dim res As Boolean
Dim printAr As New VectorDraw_Professional.vdPrintArray
Dim i As Integer

'VDraw1 is the name of the VDF Wrapper ActiveX component in the VB6 form

    VDraw1.ActiveDocument.Open "c:\test\lays1.vdml" 
' the drawing contains the Model and three vdLayouts

    Set doc = VDraw1.ActiveDocument.WrapperObject
    printAr.RemoveAll 'initialize the vdPrintArray

    printAr.Add doc.Model.Printer

'the 3 layouts
    For i = 1 To 3
        doc.LayOuts(i - 1).Printer.PrintExtents
        doc.LayOuts(i - 1).Printer.PrintScaleToFit
        printAr.Add doc.LayOuts(i - 1).Printer
    Next i

    'now export it into a single PDF file
    res = doc.ExportMultiPagePDF(printAr, "c:\test1.pdf")
End Sub

Send comments on this topic.