I use trial version of ocx: wPDF_X04.ocx
and DLL: wPDFControlDemo04W.dll
The code I use:
Code
Dim SrcFile$, DestFile$, PDF As New wPDF_X01.PDFControl, DLLName$
SrcFile = "C:\1.rtf"
DestFile = "C:\1.pdf"
DLLName = "C:\wPDFControlDemo04W.dll"
' Initiate the OCX
' Set PDF = CreateObject("wPDF_X01.PDFControl")
' Start Engine, last param =LIC_CODE
If PDF.StartEngine(DLLName, "LIC_NAME", "LIC_KEY", 0) Then
' Start a PDF document
If PDF.BeginDoc(DestFile, 0) Then
' Before RTF2PDF V3.5 you would have used this commands:
PDF.ExecIntCommand 1000, 0 ' init RTF conversion
PDF.ExecStrCommand 1002, SrcFile ' load RTF file
PDF.ExecIntCommand 1100, 0 ' convert it
' Finish PDF creation
PDF.EndDoc
PDF.StopEngine
Else
MsgBox "Cannot start PDF file"
End If
Else
MsgBox "Cannot load RTF2PDF Engine from " + DLLName
End If
Alles anzeigen
It works and I get the pdf file, but it is wrong.
Instead of this:
[Blockierte Grafik: https://i.ibb.co/WcLSVQ2/1-rtf.jpg]
I see this:
[Blockierte Grafik: https://i.ibb.co/PNdqqWG/1-pdf.jpg]
What must I do to get proper pdf file?
PS:
I don't know why I see "blocked image" message but if I click on link I see the image I have posted.