Aparajita
Thanks for the advice on the write blob. This is working great with on exception, for some reason every browser on Macs work fine and either download the pdf file, or if they have a plugin installed, display it in the browser window. On Windows, all browsers except IE work fine. I have tried all versions of 5 and 6 of IE and they first display a dialog asking if you want to save the file to disk or open it at its current location. No matter what you pick, you next get a dialog, saying that
"Internet Explorer cannot download the file form my website. Internet Explorer was not able to open this Internet site. The requested side is either unavailable or cannot be found, please try again later."
The file I am redirecting to in this case only has the the following on it.
<html> <% $E_TicketNumber:=get session("E_TicketNumber") $PDFSucess:=WebRes_GeneratePDFReceiptBlob($E_TicketNumber) if($PDFSucess) write blob(ptr_BlobReceipt->;"application/pdf") else redirect("creditcardresult.a4d") end if %> </html>
The 4D method generates the pdf blob and stores it in the variable pointed to by the pointer ptr_BlobReceipt.
It works fine, on Netscape, Mozilla, Opera, Safari and Camino on the MacOSX
On Mac OS9 it works with Netscape 4.X but does report an error while still opening the pdf sucessfully. Internet Explorer 5 gives a similar error to that seen on Windows.
On Windows(Win2000 and XP) I have tested it with Mozilla, Opera, Netscape 4.X and 7.X and they all open it just fine. Only versions of IE seem to have the problem.
I have noted that the filename that gets created ends up being something like pdfreceipt.a4d.pdf on windows and on Mac just pdfreceipt.pdf.
My configuration is 4D2003 standalone, using the builtin web server on port 8080, with WebStar 5.3 serving on the same machine with a 4D Rewrite proxy rule to direct the requests to Active4D.
Active4d is version 3.0MC1
suggestions??
gary
On Thursday, July 10, 2003, at 08:00 AM, [EMAIL PROTECTED] wrote:
Forget about the PreOnWebConnectionHook, there is a much, much better way through Active4D.
// Figure out the content to put in the receipt c_blob($pdf) $pdf:=GeneratePDF // GeneratePDF is your 4D method write blob($pdf; "application/pdf")
Pretty simple. The 'write blob' command is the equivalent of SEND HTML BLOB.
Do whatever setup you need before calling GeneratePDF, or pass it some parameters. This way you have full (and easy) access to the web environment, without wasting your time parsing the request yourself. That's why you are using Active4D in the first place!
Regards,
Aparajita Victory-Heart Productions
------------------------------------------------------------------------ Gary Pedretty /\ [EMAIL PROTECTED] Systems Manager / \ /\ www.frontierflying.com Frontier Flying Service, Inc. / /\ \ 907-450-7251 voice 5245 Airport Industrial Road / / \ /\ 907-450-7238 fax Fairbanks, Alaska 99709 / / America's Original Homeland Security Serving Alaska's Interior / / "Love your neighbor as Temperature +55 spring is here. yourself" Matt 22:39 ------------------------------------------------------------------------
