Active-x viewer and VB

PDF-XChange Viewer SDK for Developer's
(ActiveX and Simple DLL Versions)

Moderators: PDF-XChange Support, Daniel - PDF-XChange, Chris - PDF-XChange, Sean - PDF-XChange, Vasyl - PDF-XChange, Ivan - Tracker Software, Stefan - PDF-XChange

PaulT
User
Posts: 40
Joined: Tue Jun 01, 2010 9:03 pm

Active-x viewer and VB

Post by PaulT »

Trying to do a simple thing and can't get things initialised correctly.

I want to open a pdf, update the fields and print a copy. (I may optionally save it too ) NO UI is required! I think I have the complicated bits figured out, just not the simple one.

If I call opendocument (doverb or not), I get ... of object ipdfxcview2 faild error 8000ffff

What little step did I miss?

Paul
User avatar
Stefan - PDF-XChange
Site Admin
Posts: 19913
Joined: Mon Jan 12, 2009 8:07 am

Re: Active-x viewer and VB

Post by Stefan - PDF-XChange »

Hi Paul,

This is a standard COM-error - E_UNEXPECTED(Catastrophic failure).

You could receive this error code when the exe component in the ActiveX is not registered correctly.
Please run from the command line:
PDFXCview.exe /RegServer // registers the exe-part of our com-server
regsvr32 PDFXCviewAx.dll //registers the dll-part of our com-server

Best,
Stefan
PaulT
User
Posts: 40
Joined: Tue Jun 01, 2010 9:03 pm

Re: Active-x viewer and VB

Post by PaulT »

Stefan,

Actuall, I had already done that.

I have added a reference to Pdf-Xchange Viewer Controls v1.0 Type Library which has a location of the files I registered.

Boiled right down, the code is

Dim CoPDFXCview1 As PDFXCviewAxLib.CoPDFXCview
Set CoPDFXCview1 = New PDFXCviewAxLib.CoPDFXCview ' tried variations on this
Call CoPDFXCview1.OpenDocument("C:\pdf\test\myfile.pdf") ' also variations on the params.

?

Paul
User avatar
Vasyl - PDF-XChange
Site Admin
Posts: 2448
Joined: Thu Jun 30, 2005 4:11 pm

Re: Active-x viewer and VB

Post by Vasyl - PDF-XChange »

Hi, Paul.

Please see VB6-Examples in our PDF-XChange Viewer ActiveX SDK package.
Note: Viewer ActiveX is the ActiveX-Control (standard Microsoft ActiveX Control) - i.e it is not simple ActiveX and should be placed on the our VB-form before usage (may be hidden), it cannot work without any UI. So the code:

Code: Select all

Set CoPDFXCview1 = New PDFXCviewAxLib.CoPDFXCview
- is incorrect in this case.

Best
Regards.
PDF-XChange Co. LTD (Project Developer)

Please archive any files posted to a ZIP, 7z or RAR file or they will be removed and not posted.
PaulT
User
Posts: 40
Joined: Tue Jun 01, 2010 9:03 pm

Re: Active-x viewer and VB

Post by PaulT »

"it cannot work without any UI"

<sigh> Ok then.

Paul
User avatar
John - Tracker Supp
Site Admin
Posts: 5223
Joined: Tue Jun 29, 2004 10:34 am

Re: Active-x viewer and VB

Post by John - Tracker Supp »

Note -: Though it can be hidden !
If posting files to this forum - you must archive the files to a ZIP, RAR or 7z file or they will not be uploaded - thank you.

Best regards
Tracker Support
http://www.tracker-software.com
PaulT
User
Posts: 40
Joined: Tue Jun 01, 2010 9:03 pm

Re: Active-x viewer and VB

Post by PaulT »

I've settled on using VB code to use the viewerAX to populate a pdf form.

I now want the tester to try this out, but I don't want to install the viewer.

PDFXCview.exe /RegServer // registers the exe-part of our com-server
regsvr32 PDFXCviewAx.dll //registers the dll-part of our com-server

What can I do to just supply the .dll and the resource files?

Paul
PaulT
User
Posts: 40
Joined: Tue Jun 01, 2010 9:03 pm

Re: Active-x viewer and VB

Post by PaulT »

Let me clarify that - I don't mind registering the pdf-xviewer.exe if that's what I have to do, but in this case, I do not want it to change any settings on the user system related to pdf files.

Paul
User avatar
Vasyl - PDF-XChange
Site Admin
Posts: 2448
Joined: Thu Jun 30, 2005 4:11 pm

Re: Active-x viewer and VB

Post by Vasyl - PDF-XChange »

Hi, Paul.
What can I do to just supply the .dll and the resource files?
Unfortunately, but you cannot skip the "PDFXCview.exe /RegServer" - the PDFXCview.exe is main module of our ActiveX SDK.
In the next version (V3) we are planning to implement .dll-based SDK only, without any .exe servers. This .dll-based SDK can be used without any COM-registrations on the user's machine.

About calls:
PDFXCview.exe /RegServer // registers the exe-part of our com-server
regsvr32 PDFXCviewAx.dll //registers the dll-part of our com-server
- It registers some of our COM-objects on the user's system. It does not change any pdf-associations or other system-preferences on the user's machine.

Best
Regards.
PDF-XChange Co. LTD (Project Developer)

Please archive any files posted to a ZIP, 7z or RAR file or they will be removed and not posted.
PaulT
User
Posts: 40
Joined: Tue Jun 01, 2010 9:03 pm

Re: Active-x viewer and VB

Post by PaulT »

Thanks for the additional info. Sorry for the dobule post - I noticed after the other thread seemd the better place to post.

Paul
User avatar
John - Tracker Supp
Site Admin
Posts: 5223
Joined: Tue Jun 29, 2004 10:34 am

Re: Active-x viewer and VB

Post by John - Tracker Supp »

No Prob ;)
If posting files to this forum - you must archive the files to a ZIP, RAR or 7z file or they will not be uploaded - thank you.

Best regards
Tracker Support
http://www.tracker-software.com