export a PDF via an Classic ASP page

Knowledge exchange related to the VPE Report Engine and PDF Library

Moderator: IDEAL Software Support

export a PDF via an Classic ASP page

Postby jimlac » Wed May 20, 2015 3:05 pm

I try to create VPE object 6 or 4 (We have both) in a .asp page

Dim x
Set x = CreateObject("VpeControl.VpeControl.40")

and I get the following error:

error '80040112'

I browsed your documentation and I have found no example to achieve to export a PDF via an Classic ASP page. Just these two lines of code.

Thanks in advance
jimlac
 
Posts: 3
Joined: Fri Sep 19, 2014 1:51 pm

Re: export a PDF via an Classic ASP page

Postby IDEAL Software Support » Wed May 20, 2015 7:13 pm

Please read about COM licensing in the help file titled "Programmer's Manual", chapter "Redistributing VPE" - to get a basic idea of how COM licensing works. If you instantiate a COM object by code - ie if it is not placed on a form - your programming tool should care for the licensing. If old ASP does not provide some guidance or helper API, you need to take yourself care of providing the runtime-license key. This has to do with the COM licensing procedure, it is not VPE specific. The interna is also described in the help file titled "Control Reference" for the use with MFC. See the chapter "MFC: Using the VPE ActiveX with the MFC without placing it in a Dialog Resource". Maybe ASP provides some equivalent helper API - we are not ASP experts.

Here is some explanation with a maybe better wording, regarding how COM licensing basically works:

The COM Licensing mechanism knows two different modes of operation:
- Design-Time
- Runtime

This works as follows:
As you enter your License Key in the VPE setup software in order to install the VPE SDK (Software Develeopment Kit) on your machine, the design-time license key of the VPE ActiveX is installed on the development machine. The design-time license key is for software development, i.e. it allows to insert the VPE Control on forms while developing applications. It also allows to run your application, of course.

When you place the VPE ActiveX at design time on a form in your application - i.e. when you are developing your application - the client (your programming tool) requests the RUNTIME-KEY from the ActiveX server (VPE) and stores it together with the form. The runtime-key is different from the design-time key, and it is generated by VPE on-the-fly.

If you later build your executable or deliverable application for shipment to your clients, the runtime key is automatically stored by your development tool within your application. This means the ActiveX can not be used on the target machine for software development purposes, it can only be used to let the VPE ActiveX run. When the ActiveX is invoked, your application will provide the runtime key behind the scenes to the ActiveX.

If you get the demo banner in VPE or any OLE License error codes regarding VPE when running your application, then something with the COM Licensing goes wrong. If you are not placing the ActiveX on a form, your tool must provide other ways to assist you in performing the licensing.

Note: regsvr32.exe has nothing to do with design-time or runtime license keys. It allows the ActiveX to register its GUID in the system.
IDEAL Software Support
 
Posts: 1633
Joined: Thu Nov 18, 2004 4:03 pm

Re: export a PDF via an Classic ASP page

Postby simonlec » Wed May 27, 2015 3:49 am

Hi, there is anyway to export a pdf generate with Vpe using memory stream in classic asp page?
simonlec
 
Posts: 32
Joined: Wed Jul 30, 2008 6:50 pm

Re: export a PDF via an Classic ASP page

Postby IDEAL Software Support » Wed May 27, 2015 9:51 am

Yes, the VPE ActiveX supports memory streams. Please see the help files for documentation.

The installation of VPE includes VB 6 demo source code for using the memory streams provided by the ActiveX (in the directory "vb").

If you do not use VB 6, please look at the .NET demos. The API of the VPE components is identical or similar across all supported component models, i.e. the APIs of the ActiveX, the .NET component, the Delphi VCL and the Java classes are compatible. So demo sources for .NET can be used as a template for using the ActiveX, etc.
IDEAL Software Support
 
Posts: 1633
Joined: Thu Nov 18, 2004 4:03 pm


Return to VPE Open Forum

Who is online

Users browsing this forum: No registered users and 10 guests

cron