LoadPDF - Error in VB6 IDE

Skip Navigation LinksHome  /  Support  /  Forums  /  DynamicPDF Merger for COM/ActiveX (v4)  /  LoadPDF - Error in VB6 IDE

DynamicPDF Merger for COM/ActiveX (v4) Forum

 Jul 16 2009 3:14 AM
Hi,

I'm using DynamicPDF Merger and Generator for COM V5.x.

When i start this VB6 sample (of course DynamicPDF lib is referenced in my VB project)

Dim SourceDocument As DynamicPDF.Document
Private Sub Form_Load()
   Source = "C:\Temp\TestDoc.pdf"
   Set SourceDocument = New Document
   SourceDocument.LoadPdf Source
end sub

i get a VB compiling error message in my IDE for the "SourceDocument.LoadPdf" statement (LoadPDF is highlighted by the IDE). It says "Compiling error" and "Error while loading a DLL".
All other DynamicPDF methods are working fine.

When i do the same in VB script even the LoadPDF statement works fine.
  Source = "C:\Temp\TestDoc.pdf"
  Set SourceDocument = CreateObject("DynamicPDF.Document")
  SourceDocument.LoadPdf Source

Do have any idea for the strange behaviour with VB6 ?

Thanks i advance, Olaf
 Jul 16 2009 5:25 AM
Posted by a ceTe Software moderator
Hello Olaf,

We are able to run the exact same code without any problem in VB6. Please make sure that you have the correct dlls registered in your system. Also try unregistering the dlls and register again, then make a new reference to the dll in your application. Below is the code we used.

Dim SourceDocument As DynamicPDF.Document
Private Sub Form_Load()
   Source = "C:\Temp\fw9AcroForm_03.pdf"
   Set SourceDocument = New Document
   SourceDocument.LoadPdf Source
   SourceDocument.DrawToFile "C:\Temp\vb6PDF.pdf"
End Sub

Thanks,
ceTe Software Support Team.
 Jul 17 2009 6:40 AM
Hello,

thanks !

Unregistering the dlls and register them again solved the problem.

Best regards, Olaf

All times are US Eastern Standard time. The time now is 6:04 AM.