Writing a stream to a browser

Knowledge exchange related to the VPE Report Engine and PDF Library

Moderator: IDEAL Software Support

Writing a stream to a browser

Postby AndersOhrt » Thu Feb 12, 2009 5:17 pm

We have some reports that need to be accessed from the web. Currently we have a printing framework that creates a PDF on disk and we then read it using an ADODB.Stream object, and then send this to the browser.

Since VPE can write to memory streams, I'm trying to figure out if this is possible to do without writing anything to disk.

We call VPE from our framework which is written in Visual DataFlex, which is in turn called from ASP, so I'm pretty sure I need to do a MemCopy manually at some point. Or, is it possible to get a reference of the ADODB and give it to VPE for the streaming, or vice versa?

Any ideas how this might be possible?
AndersOhrt
 
Posts: 5
Joined: Mon Feb 02, 2009 3:35 pm

Postby IDEAL Software Support » Fri Feb 13, 2009 10:22 am

VPE can be used from ASP via the ActiveX and from ASP.NET via the .NET component. VPE provides a memory stream object. You can write a PDF document to such a memory stream and VPE provides an API to read portions of this data into your application. If it is an ASP or ASP.NET application, it can then stream this data via HTTP to the client's browser. There is sample source code in C# for an ASP.NET application shipped with VPE.

The question how to interface Visual DataFlex with ASP should be asked in a Visual DataFlex forum.
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 5 guests