- Offizieller Beitrag
The new interfaces do not provide the methods to load and convert the files, but also to work with the data, for example replace text or insert new text or tables.
This example uses the ActiveX version of wRTF2PDF:
Code
' Initiate the OCX (if it is not already on the form)
Set PDF = CreateObject('wPDF_X01.PDFControl')
' Start Engine, last param =LIC_CODE
If PDF.StartEngine(DLLNAME.Text, "LIC_NAME", "LIC_KEY", 0) Then
' Load the file, TRUE would insert/append it
If PDF.Memo.LoadFromFile(RTFFileName.Text, False, "AUTO") Then
PDF.PDFCreator.PDFFile = Replace(RTFFileName.Text, ".rtf", ".pdf")
' Convert it
' VB6 does not let us call PDF.PDFCretor.Print so we use a command instead
PDF.ExecIntCommand 1305, 0
' Finish PDF creation
Else
MsgBox "Cannot load RTF file " + RTFFileName.Text
End If
PDF.StopEngine
Else
MsgBox "Cannot load RTF2PDF Engine from " + DLLNAME.Text
End If
Alles anzeigen
Please read more here:
http://www.wpcubed.com/manuals/textdy…_conversion.htm
Regards,
Julian Ziersch